Imported Upstream version 3.10.0

Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
Jo Shields
2014-10-04 11:27:48 +01:00
parent fe777c5c82
commit 8b9b85e7f5
970 changed files with 20242 additions and 31308 deletions

View File

@@ -60,9 +60,7 @@ namespace MonoTests.System.Data.Common
public void Default ()
{
DBDataPermissionAttribute a = new NonAbstractDBDataPermissionAttribute (SecurityAction.Assert);
#if !TARGET_JVM
Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId");
#endif
Assert.IsFalse (a.Unrestricted, "Unrestricted");
Assert.IsFalse (a.AllowBlankPassword, "AllowBlankPassword");
Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString");

View File

@@ -376,9 +376,6 @@ namespace MonoTests.System.Data.Common
}
[Test]
#if TARGET_JVM
[Ignore ("Does not work with TARGET_JVM")]
#endif
public void ToStringTest()
{
Assert.AreEqual ("System.Data.Common.DataColumnMappingCollection", columnMapCollection.ToString(), "test1");

View File

@@ -360,9 +360,6 @@ namespace MonoTests.System.Data.Common
}
[Test]
#if TARGET_JVM
[Ignore ("Does not work with TARGET_JVM")]
#endif
public void ToStringTest()
{
Assert.AreEqual("System.Data.Common.DataTableMappingCollection", tableMapCollection.ToString(), "test1");

View File

@@ -223,6 +223,41 @@ sqliteDataAdapter.Update (dataSet, "Primus");
dbConnection.Close();
dbConnection = null;
}
[Test]
[Category ("NotWorking")] // Requires newer sqlite than is on wrench
public void UpdateResetRowErrorCorrectly ()
{
const string connectionString = "URI = file::memory:; Version = 3";
using (var dbConnection = new SqliteConnection (connectionString)) {
dbConnection.Open ();
using (var cmd = dbConnection.CreateCommand ()) {
cmd.CommandText = "CREATE TABLE data (id PRIMARY KEY, name TEXT)";
cmd.ExecuteNonQuery ();
}
var ts = dbConnection.BeginTransaction ();
var da = new SqliteDataAdapter ("SELECT * FROM data", dbConnection);
var builder = new SqliteCommandBuilder (da);
da.UpdateCommand = builder.GetUpdateCommand ();
da.UpdateCommand.Transaction = ts;
var ds1 = new DataSet ();
da.Fill (ds1, "data");
var table = ds1.Tables [0];
var row = table.NewRow ();
row ["id"] = 10;
row ["name"] = "Bart";
table.Rows.Add (row);
var ds2 = ds1.GetChanges ();
da.Update (ds2, "data");
Assert.IsFalse (ds2.HasErrors);
}
}
#endif
#endif

View File

@@ -38,9 +38,6 @@ using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
#if TARGET_JVM
using DivideByZeroException = System.ArithmeticException;
#endif
namespace MonoTests.System.Data.SqlTypes
{

View File

@@ -35,9 +35,6 @@ using NUnit.Framework;
using System;
using System.Xml;
using System.Data.SqlTypes;
#if TARGET_JVM
using DivideByZeroException = System.ArithmeticException;
#endif
#if NET_2_0
using System.Xml.Serialization;
using System.IO;

View File

@@ -34,9 +34,6 @@
using System;
using System.Xml;
using System.Data.SqlTypes;
#if TARGET_JVM
using DivideByZeroException = System.ArithmeticException;
#endif
#if NET_2_0
using System.Xml.Serialization;

View File

@@ -191,9 +191,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
#if TARGET_JVM
[Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
#endif
public void CompareTo()
{
SqlByte Test = new SqlByte (1);
@@ -271,9 +268,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
#if TARGET_JVM
[Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
#endif
public void Greaters()
{
// GreateThan ()
@@ -288,9 +282,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
#if TARGET_JVM
[Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
#endif
public void Lessers()
{
// LessThan()
@@ -377,11 +368,7 @@ namespace MonoTests.System.Data.SqlTypes
byte test = Test1.GetUnicodeBytes () [105];
Assert.Fail ("#N05");
} catch (Exception e) {
#if TARGET_JVM
Assert.IsTrue (typeof (IndexOutOfRangeException).IsAssignableFrom(e.GetType()), "#N06");
#else
Assert.AreEqual (typeof (IndexOutOfRangeException), e.GetType(), "#N06");
#endif
}
}
@@ -545,9 +532,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
#if TARGET_JVM
[Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
#endif
public void ThanOrEqualOperators()
{
// == -operator

View File

@@ -132,9 +132,6 @@ public class BinarySerializationTest
dt.Rows[1].RejectChanges();
}
[Test]
#if TARGET_JVM
[Ignore ("Net Binary formatting is not supported for DataSet")]
#endif
public void DataTableSerializationTest2 ()
{
//Serialize Table
@@ -274,9 +271,6 @@ public class BinarySerializationTest
}
[Test]
#if TARGET_JVM
[Ignore ("Net Binary formatting is not supported for DataSet")]
#endif
public void Test_With_Null_Values2 ()
{
//Serialize Table
@@ -454,9 +448,6 @@ public class BinarySerializationTest
}
[Test]
#if TARGET_JVM
[Ignore ("Net Binary formatting is not supported for DataSet")]
#endif
public void DataSetSerializationTest2 ()
{
DataSet ds = new DataSet ();
@@ -653,9 +644,6 @@ public class BinarySerializationTest
Assert.AreEqual (ds.Relations [i].RelationName, ds.Relations [i].RelationName, "#9 Relation : {0} differs", ds.Relations [i]);
}
[Test]
#if TARGET_JVM
[Ignore ("Net Binary formatting is not supported for DataSet")]
#endif
public void Constraint_Relations_Test2 ()
{
//Serialize DataSet

View File

@@ -638,9 +638,6 @@ namespace MonoTests.System.Data
}
[Test]
#if TARGET_JVM
[Ignore ("Does not work with TARGET_JVM")]
#endif
public void ToStringTest ()
{
DataTable Table = new DataTable ("test_table");

View File

@@ -112,9 +112,7 @@ namespace MonoTests.System.Data
Assert.AreEqual (1, Rows.Count, "test#01");
Assert.IsFalse (Rows.IsReadOnly, "test#02");
Assert.IsFalse (Rows.IsSynchronized, "test#03");
#if !TARGET_JVM
Assert.AreEqual ("System.Data.DataRowCollection", Rows.ToString (), "test#04");
#endif
string [] cols = new string [2];
cols [0] = "first";
@@ -126,9 +124,7 @@ namespace MonoTests.System.Data
Rows.Add (cols);
Assert.AreEqual (3, Rows.Count, "test#05");
#if !TARGET_JVM
Assert.AreEqual ("System.Data.DataRow", Rows [0].ToString (), "test#06");
#endif
Assert.AreEqual (DBNull.Value, Rows [0] [0], "test#07");
Assert.AreEqual (DBNull.Value, Rows [0] [1], "test#08");
Assert.AreEqual ("first", Rows [1] [0], "test#09");

View File

@@ -348,9 +348,6 @@ namespace MonoTests.System.Data
}
[Test]
#if TARGET_JVM
[Ignore ("Does not work with TARGET_JVM")]
#endif
public void ToStringTest()
{
DataTableCollection tbcol = _dataset[0].Tables;

View File

@@ -295,9 +295,6 @@ namespace MonoTests.System.Data
}
[Test]
#if TARGET_JVM
[Ignore ("Should review the test")]
#endif
public void TestReadXml()
{
// For reading, DataTable.ReadXml only supports reading in xml with

View File

@@ -1 +1 @@
d752df4f1ac2c291267ff18e0a7ff3f7c12aaaee
86dd5e737e6ed2882418e50afc78df88bf0ae4b9

View File

@@ -511,9 +511,6 @@ namespace MonoTests.System.Data
[Test]
[ExpectedException (typeof (ArgumentException))]
#if TARGET_JVM
[NUnit.Framework.Category ("NotWorking")] // defect 5446
#endif
public void Find_3 ()
{
dataView.Sort = "itemID, itemName";