Author: jbevain
Date: 2008-02-02 08:42:33 -0500 (Sat, 02 Feb 2008)
New Revision: 94621

Modified:
   trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ChangeLog
   
trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ListBind.cs
Log:
fix

Modified: trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ChangeLog
===================================================================
--- trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ChangeLog  
2008-02-02 13:33:51 UTC (rev 94620)
+++ trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ChangeLog  
2008-02-02 13:42:33 UTC (rev 94621)
@@ -1,3 +1,7 @@
+2008-02-02  Jb Evain  <[EMAIL PROTECTED]>
+
+       * ExpressionTest_ListBind.cs: fix MemberTypeImplementIEnumerable test.
+
 2008-02-01  Olivier Dufour  <[EMAIL PROTECTED]>
 
        * ExpressionTest_ListBind.cs:Add test for ListBind

Modified: 
trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ListBind.cs
===================================================================
--- 
trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ListBind.cs
 2008-02-02 13:33:51 UTC (rev 94620)
+++ 
trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ListBind.cs
 2008-02-02 13:42:33 UTC (rev 94621)
@@ -1,129 +1,132 @@
-//
-// ExpressionTest_ListBind.cs
-//
-// Author:
-//   olivier Dufour ([EMAIL PROTECTED])
-//
-// (C) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Reflection;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using NUnit.Framework;
-
-namespace MonoTests.System.Linq.Expressions {
-
-       [TestFixture]
-       public class ExpressionTest_ListBind {
+//
+// ExpressionTest_ListBind.cs
+//
+// Author:
+//   olivier Dufour ([EMAIL PROTECTED])
+//
+// (C) 2008 Novell, Inc. (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
+using System;
+using System.Reflection;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using NUnit.Framework;
+
+namespace MonoTests.System.Linq.Expressions {
+
+       [TestFixture]
+       public class ExpressionTest_ListBind {
+
                private List<ElementInit> list;
-               
+
                [SetUp]
                public void init()
                {
                        list= new List<ElementInit> ();
                }
-               
-               [Test]
-               [ExpectedException (typeof (ArgumentNullException))]
-               public void MemberNull ()
-               {
-                       Expression.ListBind (null as MemberInfo, list);
+
+               [Test]
+               [ExpectedException (typeof (ArgumentNullException))]
+               public void MemberNull ()
+               {
+                       Expression.ListBind (null as MemberInfo, list);
                }
-               
-               [Test]
-               [ExpectedException (typeof (ArgumentNullException))]
-               public void PropertyAccessorNull ()
-               {
-                       Expression.ListBind (null as MethodInfo, list);
+
+               [Test]
+               [ExpectedException (typeof (ArgumentNullException))]
+               public void PropertyAccessorNull ()
+               {
+                       Expression.ListBind (null as MethodInfo, list);
                }
-               
-               [Test]
-               [ExpectedException (typeof (ArgumentNullException))]
-               public void ArgNull ()
+
+               [Test]
+               [ExpectedException (typeof (ArgumentNullException))]
+               public void ArgNull ()
                {
-                       list.Add(null);
-                       Expression.ListBind (typeof (Foo).GetProperty 
("Bar").GetSetMethod (), list);
+                       list.Add(null);
+                       Expression.ListBind (typeof (Foo).GetProperty 
("Bar").GetSetMethod (), list);
                }
-               
-               [Test]
-               [ExpectedException (typeof (ArgumentNullException))]
-               public void ArgNull2 ()
+
+               [Test]
+               [ExpectedException (typeof (ArgumentNullException))]
+               public void ArgNull2 ()
                {
-                       list.Add(null);
-                       Expression.ListBind (typeof (Foo).GetMember ("foo")[0], 
list);
+                       list.Add(null);
+                       Expression.ListBind (typeof (Foo).GetMember ("foo")[0], 
list);
                }
-               
-               [Test]
-               [ExpectedException (typeof (ArgumentException))]
-               public void MemberTypeImplementIEnumerable ()
-               {
-                       Expression.ListBind (typeof (Foo).GetMember ("str")[0], 
list);
+
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void MemberTypeImplementIEnumerable ()
+               {
+                       Expression.ListBind (typeof (Foo).GetMember ("baz")[0], 
list);
                }
                //TODO test for other than fielf and property...
-               
-               [Test]
-               [ExpectedException (typeof (ArgumentException))]
-               public void MethodeGetImplementIEnumerable2 ()
+
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void MethodeGetImplementIEnumerable2 ()
                {
-                       Expression.ListBind (typeof (Foo).GetProperty 
("BarBar").GetGetMethod (), list);
+                       Expression.ListBind (typeof (Foo).GetProperty 
("BarBar").GetGetMethod (), list);
                }
-               
-               [Test]
-               [ExpectedException (typeof (ArgumentException))]
-               public void MethodMustBeAnAccessor ()
+
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void MethodMustBeAnAccessor ()
                {
-                       Expression.ListBind (typeof (Foo).GetMethod ("test"), 
list);
-               }               
-               
-               /*[Test]
-               public void ListBindToString ()
+                       Expression.ListBind (typeof (Foo).GetMethod ("test"), 
list);
+               }
+
+               /*[Test]
+               public void ListBindToString ()
                {
-                       //TODO list add or do with a lambda expression
-                       var ListBind = Expression.ListBind (typeof 
(Foo).GetMember ("Bar"), list);
-
-                       Assert.AreEqual ("Bar.Add(\"\")", ListBind.ToString ());
-               }*/
-
-               public class Foo {
-       
+                       //TODO list add or do with a lambda expression
+                       var ListBind = Expression.ListBind (typeof 
(Foo).GetMember ("Bar"), list);
+
+                       Assert.AreEqual ("Bar.Add(\"\")", ListBind.ToString ());
+               }*/
+
+               public class Foo {
+
                        public string [] Bar
                        {
                                get {return foo;}
-                               set {foo = value;}
+                               set {foo = value;}
                        }
                        public string [] foo;
                        public string str;
+
+                       public int baz;
+
                        public string [] test ()
                        {
                                return null;
                        }
                        public int BarBar
                        {
-                               get {return 0;}
-                       }
-               }
-       }
-}
+                               get {return 0;}
+                       }
+               }
+       }
+}


Property changes on: 
trunk/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ListBind.cs
___________________________________________________________________
Name: svn:eol-style
   + native

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to