diff options
author | Senganal T <senga@mono-cvs.ximian.com> | 2005-10-21 17:18:49 +0400 |
---|---|---|
committer | Senganal T <senga@mono-cvs.ximian.com> | 2005-10-21 17:18:49 +0400 |
commit | dd5d2acb92769af5a45e05a431bccdc51200337f (patch) | |
tree | 1d7a090ca148408ae4d9c5188f06e5933833da6c /mcs/class/System.Data/Test | |
parent | d19e86cbb9394bcee506802bf939a4093f92caae (diff) |
2005-10-21 Senganal T <tsenganal@novell.com>
* Test/System.Data/DataTableTest2.cs : addded test for #76213
* Mono.Data.SqlExpressions/Numeric.cs :
- Modified the Max and Min functions to convert strings(numeric) to
double. Fixes bug #76213.
svn path=/trunk/mcs/; revision=52023
Diffstat (limited to 'mcs/class/System.Data/Test')
-rw-r--r-- | mcs/class/System.Data/Test/System.Data/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.Data/Test/System.Data/DataTableTest2.cs | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/mcs/class/System.Data/Test/System.Data/ChangeLog b/mcs/class/System.Data/Test/System.Data/ChangeLog index 04a7d1449f0..65d8566c8b5 100644 --- a/mcs/class/System.Data/Test/System.Data/ChangeLog +++ b/mcs/class/System.Data/Test/System.Data/ChangeLog @@ -1,3 +1,7 @@ +2005-10-21 Senganal T <tsenganal@novell.com> + + * DataTableTest2.cs : addded test for #76213 + 2005-10-20 Atsushi Enomoto <atsushi@ximian.com> * DataSetTest.cs : added test for #76480. diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs index b342921537d..9dc709bb630 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs @@ -1617,5 +1617,30 @@ namespace MonoTests_System.Data ds.Tables[0].PrimaryKey = new DataColumn[] {ds.Tables[0].Columns[0],ds.Tables[0].Columns[1]}; Assert.AreEqual(2, ds.Tables[0].PrimaryKey.Length , "DT170"); } + + // Test for bug #76213 + [Test] + public void Compute_WithoutSchemaData_Test() + { + DataSet ds = new DataSet ("TestData"); + DataTable table = ds.Tables.Add ("TestTable"); + + table.Columns.Add ("Id"); + table.Columns.Add ("Value"); + + table.Rows.Add (new object[] {"1","4.5"}); + table.Rows.Add (new object[] {"2","7.5"}); + table.Rows.Add (new object[] {"3","2.5"}); + table.Rows.Add (new object[] {"4","3.5"}); + + Assert.AreEqual ("1", + table.Compute ("Min(Id)",String.Empty),"#1"); + Assert.AreEqual ("4", + table.Compute ("Max(Id)",String.Empty),"#2"); + Assert.AreEqual ("2.5", + table.Compute ("Min(Value)",String.Empty),"#3"); + Assert.AreEqual ("7.5", + table.Compute ("Max(Value)",String.Empty),"#4"); + } } } |