Author: gonzalo
Date: 2005-09-28 01:20:36 -0400 (Wed, 28 Sep 2005)
New Revision: 50920
Modified:
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs
Log:
2005-09-28 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* DataGridTest.cs: fixed a test and added a commented out one that works
fine in mono but throws nullref with MS.
Modified: trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
2005-09-28 05:15:09 UTC (rev 50919)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
2005-09-28 05:20:36 UTC (rev 50920)
@@ -1,3 +1,8 @@
+2005-09-28 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * DataGridTest.cs: fixed a test and added a commented out one that works
+ fine in mono but throws nullref with MS.
+
2005-09-27 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* DataGridTest.cs: more tests that add a TemplateColumn.
Modified:
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs
2005-09-28 05:15:09 UTC (rev 50919)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs
2005-09-28 05:20:36 UTC (rev 50920)
@@ -55,11 +55,6 @@
return TagName;
}
- public void CreateCH (bool use_ds)
- {
- CreateControlHierarchy (use_ds);
- }
-
public void PrepareCH ()
{
PrepareControlHierarchy ();
@@ -1348,9 +1343,10 @@
TemplateColumn tc = new TemplateColumn ();
tc.ItemTemplate = new MyTemplate ("hola");
p.Columns.Add (tc);
+ ControlCollection controls = p.Controls;
p.CreateControls (true);
Assert.AreEqual (1, p.Columns.Count, "columns");
- Assert.AreEqual (0, p.Controls.Count, "controls");
+ Assert.AreEqual (0, controls.Count, "controls");
string render = p.Render ();
// no items, even with a templated column.
// The table is not added if DataSource == null
@@ -1370,7 +1366,7 @@
p.Columns.Add (tc);
Assert.AreEqual (1, p.Columns.Count, "columns-1");
Assert.AreEqual (0, p.Controls.Count, "controls-1");
- p.CreateCH (true);
+ p.CreateControls (true);
// This time we have the table there. Thanks to the
empty ArrayList
Assert.AreEqual (1, p.Columns.Count, "columns-2");
Assert.AreEqual (1, p.Controls.Count, "controls-2");
@@ -1401,6 +1397,25 @@
Assert.IsTrue (-1 != render.IndexOf ("hola"),
"template");
}
+ /* This one throw nullref on MS and works with mono
+ * [Test]
+ * public void OneTemplateColumn4 ()
+ {
+ DataGridPoker p = new DataGridPoker ();
+ TemplateColumn tc = new TemplateColumn ();
+ tc.ItemTemplate = new MyTemplate ("hola");
+ p.Columns.Add (tc);
+ p.DataSource = new ArrayList ();
+ p.CreateControls (false);
+ Assert.AreEqual (1, p.Columns.Count, "columns");
+ // Table added because useDataSource == false...
+ Assert.AreEqual (1, p.Controls.Count, "controls");
+ string render = p.Render ();
+ // ... but no template rendered.
+ Assert.IsTrue (-1 == render.IndexOf ("hola"),
"template");
+ }
+ */
+
[Test]
public void CreateControls ()
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches