Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenganal T <senga@mono-cvs.ximian.com>2006-02-11 13:03:26 +0300
committerSenganal T <senga@mono-cvs.ximian.com>2006-02-11 13:03:26 +0300
commitf66d6296f4a2730929ff0b17da858f2435a791cd (patch)
tree40f347b440308f272bbe09ba566f830ef0edd7bf /mcs/class/System.Data/Test
parentdf4807294d2cb5348c2c37eab10c25c8e67a55fe (diff)
2006-01-16 Boris Kirzner <borisk@mainsoft.com>
* Test/System.Data/DataColumnCollectionTest2.cs: added test case for index update on column removal 2006-01-18 Boris Kirzner <borisk@mainsoft.com> * Mono.Data.SqlExpressions/ColumnReference.cs: added column and relation lazy evaluation and caching. 2006-01-11 Boris Kirzner <borisk@mainsoft.com> * System.Data.Common/Index.cs: removed redundant call to RebuildIndex() in constructor. Backporting Boris Kirzner's fixes to 1_1_13 (r55374,55636,55710) svn path=/branches/mono-1-1-13/mcs/; revision=56788
Diffstat (limited to 'mcs/class/System.Data/Test')
-rw-r--r--mcs/class/System.Data/Test/System.Data/ChangeLog6
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs35
2 files changed, 40 insertions, 1 deletions
diff --git a/mcs/class/System.Data/Test/System.Data/ChangeLog b/mcs/class/System.Data/Test/System.Data/ChangeLog
index 52063cd1d80..bd773316b4a 100644
--- a/mcs/class/System.Data/Test/System.Data/ChangeLog
+++ b/mcs/class/System.Data/Test/System.Data/ChangeLog
@@ -1,7 +1,11 @@
2006-01-17 Senganal T <tsenganal@novell.com>
* DataRowTest2.cs : added testcase for bug #77267
-
+
+2006-01-16 Boris Kirzner <borisk@mainsoft.com>
+ * DataColumnCollectionTest2.cs: added test case for index update on
+ column removal
+
2006-01-10 Senganal T <tsenganal@novell.com>
* DataViewTest2.cs
- Added testcase for bug #77188
diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs b/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs
index 4458d473c8e..7f13c1a705e 100644
--- a/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs
@@ -763,6 +763,41 @@ namespace MonoTests.System.Data
}
}
+ [Test]
+ public void Test_Indexes ()
+ {
+ DataTable dt = new DataTable ();
+ DataColumn dc = new DataColumn("A");
+ dt.Columns.Add (dc);
+
+ dc = new DataColumn("B");
+ dt.Columns.Add (dc);
+
+ dc = new DataColumn("C");
+ dt.Columns.Add (dc);
+
+ for(int i=0; i < 10; i++) {
+ DataRow dr = dt.NewRow ();
+ dr ["A"] = i;
+ dr ["B"] = i + 1;
+ dr ["C"] = i + 2;
+ dt.Rows.Add (dr);
+ }
+
+ DataRow[] rows = dt.Select ("A=5");
+ Assert.AreEqual (1, rows.Length);
+
+ dt.Columns.Remove ("A");
+
+ dc = new DataColumn ("A");
+ dc.DefaultValue = 5;
+
+ dt.Columns.Add (dc);
+
+ rows = dt.Select ("A=5");
+ Assert.AreEqual (10, rows.Length);
+ }
+
private void Columns_CollectionChanged1(object sender, CollectionChangeEventArgs e)
{
eventOccured = true;