+2004-04-29 Atsushi Enomoto <atsushi@ximian.com>
+
+ * DataRowTest.cs : Added a test for auto increment column and item
+ integrity (it caused index out of range exception).
+
2004-04-27 Atsushi Enomoto <atsushi@ximian.com>
* ConstraintCollectionTest.cs,
ValueTest("DR46: array smaller value test", table, 6, 0, abc);
ValueTest("DR47: array smaller value test", table, 6, 1, 14);
}
+
+ [Test]
+ public void AutoIncrementColumnIntegrity ()
+ {
+ // AutoIncrement-column shouldn't raise index out of range
+ // exception because of size mismatch of internal itemarray.
+ DataTable dt = new DataTable ();\r
+ dt.Columns.Add ("foo");\r
+ dt.Rows.Add (new object [] {"value"});\r
+ DataColumn col = new DataColumn ("bar");\r
+ col.AutoIncrement = true;\r
+ dt.Columns.Add (col);\r
+ dt.Rows [0] [0] = "test";
+ }
}
}