diff options
author | Senganal T <senga@mono-cvs.ximian.com> | 2006-03-07 13:22:01 +0300 |
---|---|---|
committer | Senganal T <senga@mono-cvs.ximian.com> | 2006-03-07 13:22:01 +0300 |
commit | d915d0690b15653b9920a267d00b8e641d8c56a8 (patch) | |
tree | 50a7b85c73048ba7dcdcc6a95246d385ca635589 /mcs | |
parent | 0c4a5bf0c85ae912e50763cb1d961679f445ce5c (diff) |
2006-03-07 Senganal T <tsenganal@novell.com>
* Test/System.Data/DataRowCollectionTest2.cs :
* Test/System.Data/DataTableTest2.cs :
- Added failing testcases as NotWorking tests.
* System.Data.Common/Key.cs :
Reverted the changes from the prev patch.
svn path=/trunk/mcs/; revision=57653
Diffstat (limited to 'mcs')
5 files changed, 58 insertions, 6 deletions
diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog index 6f16c2a223c..38985fae201 100644 --- a/mcs/class/System.Data/System.Data.Common/ChangeLog +++ b/mcs/class/System.Data/System.Data.Common/ChangeLog @@ -1,3 +1,8 @@ +2006-03-07 Senganal T <tsenganal@novell.com> + + * Key.cs : + Reverted the changes from the earlier patch. + 2006-02-22 Senganal T <tsenganal@novell.com> * DbDataAdapter.cs : diff --git a/mcs/class/System.Data/System.Data.Common/Key.cs b/mcs/class/System.Data/System.Data.Common/Key.cs index 362860a28ee..ce733456306 100644 --- a/mcs/class/System.Data/System.Data.Common/Key.cs +++ b/mcs/class/System.Data/System.Data.Common/Key.cs @@ -47,7 +47,6 @@ namespace System.Data.Common // and always uses the _current version
//so need a temp row for Eval calls
DataRow _tmpRow;
- static DataViewRowState DefaultRowStateFilter = (DataViewRowState.CurrentRows | DataViewRowState.OriginalRows);
#endregion //Fields
@@ -74,7 +73,7 @@ namespace System.Data.Common _rowStateFilter = rowState;
else
// FIXME : what is the correct value ?
- _rowStateFilter = DefaultRowStateFilter;
+ _rowStateFilter = DataViewRowState.CurrentRows;
}
#endregion // Constructors
@@ -178,9 +177,6 @@ namespace System.Data.Common return (version == DataRowVersion.Original);
break;
default:
- // If _rowStateFilter has the default value, return true
- if (_rowStateFilter == DefaultRowStateFilter)
- return true;
if ((_rowStateFilter & DataViewRowState.ModifiedCurrent) != DataViewRowState.None)
return ((version & DataRowVersion.Default) != 0);
if ((_rowStateFilter & DataViewRowState.ModifiedOriginal) != DataViewRowState.None)
diff --git a/mcs/class/System.Data/Test/System.Data/ChangeLog b/mcs/class/System.Data/Test/System.Data/ChangeLog index 129b949eb1d..b185f05526e 100644 --- a/mcs/class/System.Data/Test/System.Data/ChangeLog +++ b/mcs/class/System.Data/Test/System.Data/ChangeLog @@ -1,3 +1,9 @@ +2006-03-07 Senganal T <tsenganal@novell.com> + + * DataRowCollectionTest2.cs : + * DataTableTest2.cs : + - Added failing testcases as NotWorking tests. + 2006-03-05 Senganal T <tsenganal@novell.com> * DataSetTest2.cs diff --git a/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest2.cs b/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest2.cs index 8a512a7ddd3..058d8326204 100644 --- a/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest2.cs @@ -184,6 +184,7 @@ namespace MonoTests.System.Data } [Test] + [NUnit.Framework.Category ("NotWorking")] public void FindByKey () { DataTable table = new DataTable (); @@ -191,12 +192,55 @@ namespace MonoTests.System.Data table.PrimaryKey = new DataColumn[] {table.Columns [0]}; table.Rows.Add (new object[] {1}); + table.Rows.Add (new object[] {2}); + table.Rows.Add (new object[] {3}); table.AcceptChanges (); + Assert.IsNotNull (table.Rows.Find (new object[] {1}), "#1"); table.Rows[0].Delete (); + Assert.IsNull (table.Rows.Find (new object[] {1}), "#2"); + + table.Rows [1][0] = 1; + Assert.IsNotNull (table.Rows.Find (new object[] {1}), "#3"); + table.RejectChanges (); - Assert.IsNotNull (table.Rows.Find (new object[] {1}), "#2"); + Assert.IsNotNull (table.Rows.Find (new object[] {1}), "#4"); + } + + [Test] + [NUnit.Framework.Category ("NotWorking")] + public void FindByKey_VerifyOrder () + { + DataTable table = new DataTable (); + table.Columns.Add ("col1", typeof (int)); + table.PrimaryKey = new DataColumn[] {table.Columns [0]}; + + table.Rows.Add (new object[] {1}); + table.Rows.Add (new object[] {2}); + table.Rows.Add (new object[] {1000}); + table.Rows [1][0] = 100; + Assert.IsNotNull (table.Rows.Find (100), "#1"); + } + + [Test] + [NUnit.Framework.Category ("NotWorking")] + public void FindByKey_DuringDataLoad () + { + DataTable table = new DataTable (); + table.Columns.Add ("col1", typeof (int)); + table.PrimaryKey = new DataColumn[] {table.Columns [0]}; + + table.Rows.Add (new object[] {1}); + table.Rows.Add (new object[] {2}); + table.AcceptChanges (); + + table.BeginLoadData (); + table.LoadDataRow (new object[] {1000}, false); + Assert.IsNotNull (table.Rows.Find (1), "#1"); + Assert.IsNotNull (table.Rows.Find (1000), "#2"); + table.EndLoadData (); + Assert.IsNotNull (table.Rows.Find (1000), "#3"); } [Test]
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs index 343d31a90d6..69a60e30c6f 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs @@ -1950,6 +1950,7 @@ namespace MonoTests_System.Data } [Test] + [Category ("NotWorking")] public void LoadDataRow_ExistingData () { DataSet ds = new DataSet (); |