Selaa lähdekoodia

tabs instead of spaces

svn path=/trunk/mcs/; revision=92515
Jb Evain 18 vuotta sitten
vanhempi
sitoutus
7f427bc15a
24 muutettua tiedostoa jossa 1876 lisäystä ja 1876 poistoa
  1. 74 74
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Add.cs
  2. 89 89
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_AddChecked.cs
  3. 71 71
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_And.cs
  4. 67 67
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_AndAlso.cs
  5. 115 115
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ArrayIndex.cs
  6. 116 116
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Bind.cs
  7. 92 92
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Constant.cs
  8. 74 74
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Divide.cs
  9. 71 71
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ExclusiveOr.cs
  10. 56 56
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Field.cs
  11. 80 80
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_LeftShift.cs
  12. 83 83
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Modulo.cs
  13. 74 74
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Multiply.cs
  14. 89 89
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_MultiplyChecked.cs
  15. 71 71
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Or.cs
  16. 67 67
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_OrElse.cs
  17. 92 92
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Property.cs
  18. 34 34
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_PropertyOrField.cs
  19. 22 22
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Quote.cs
  20. 80 80
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_RightShift.cs
  21. 73 73
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Subtract.cs
  22. 89 89
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_SubtractChecked.cs
  23. 44 44
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_TypeIs.cs
  24. 153 153
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Utils.cs

+ 74 - 74
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Add.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,82 +26,82 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Add
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Add (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Add
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Add (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Add (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.Add (Expression.Constant (1), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Add (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.Add (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.Add (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.Add (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.Add (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.Add (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.Add, expr.NodeType, "Add#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Add#02");
+			Assert.IsNull (expr.Method, "Add#03");
+			Assert.AreEqual ("(1 + 2)", expr.ToString(), "Add#04");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.Add (Expression.Constant (true), Expression.Constant (false));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.Add (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.Add, expr.NodeType, "Add#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Add#02");
-            Assert.IsNull (expr.Method, "Add#03");
-            Assert.AreEqual ("(1 + 2)", expr.ToString(), "Add#04");
-        }
+			BinaryExpression expr = Expression.Add (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.Add, expr.NodeType, "Add#05");
+			Assert.AreEqual (typeof (int), expr.Type, "Add#06");
+			Assert.IsNull (expr.Method, "Add#07");
+			Assert.AreEqual ("(1 + 2)", expr.ToString(), "Add#08");
+		}
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.Add (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.Add, expr.NodeType, "Add#05");
-            Assert.AreEqual (typeof (int), expr.Type, "Add#06");
-            Assert.IsNull (expr.Method, "Add#07");
-            Assert.AreEqual ("(1 + 2)", expr.ToString(), "Add#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Addition");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Addition");
-            
-            BinaryExpression expr = Expression.Add (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.Add, expr.NodeType, "Add#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "Add#10");
-            Assert.AreEqual (mi, expr.Method, "Add#11");
-            Assert.AreEqual ("op_Addition", expr.Method.Name, "Add#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) + value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "Add#13");
-        }
-    }
+			BinaryExpression expr = Expression.Add (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.Add, expr.NodeType, "Add#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "Add#10");
+			Assert.AreEqual (mi, expr.Method, "Add#11");
+			Assert.AreEqual ("op_Addition", expr.Method.Name, "Add#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) + value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "Add#13");
+		}
+	}
 }

+ 89 - 89
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_AddChecked.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,99 +26,99 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_AddChecked
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.AddChecked (null, Expression.Constant(1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_AddChecked
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.AddChecked (null, Expression.Constant(1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.AddChecked (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.AndAlso (Expression.Constant (1), Expression.Constant (2.0));
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.AddChecked (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.AddChecked (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.AddChecked (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.AndAlso (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.AddChecked (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#01");
+			Assert.AreEqual (typeof (int), expr.Type, "AddChecked#02");
+			Assert.IsNull (expr.Method, "AddChecked#03");
+			Assert.AreEqual ("(1 + 2)", expr.ToString(), "AddChecked#15");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.AddChecked (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.AddChecked (Expression.Constant (true), Expression.Constant (false));
-        }
+			BinaryExpression expr = Expression.AddChecked (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#04");
+			Assert.AreEqual (typeof (int), expr.Type, "AddChecked#05");
+			Assert.IsNull (expr.Method, null, "AddChecked#06");
+			Assert.AreEqual ("(1 + 2)", expr.ToString(), "AddChecked#16");
+		}
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.AddChecked (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#01");
-            Assert.AreEqual (typeof (int), expr.Type, "AddChecked#02");
-            Assert.IsNull (expr.Method, "AddChecked#03");
-            Assert.AreEqual ("(1 + 2)", expr.ToString(), "AddChecked#15");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Addition");
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.AddChecked (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#04");
-            Assert.AreEqual (typeof (int), expr.Type, "AddChecked#05");
-            Assert.IsNull (expr.Method, null, "AddChecked#06");
-            Assert.AreEqual ("(1 + 2)", expr.ToString(), "AddChecked#16");
-        }
+			BinaryExpression expr = Expression.AddChecked (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#07");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "AddChecked#08");
+			Assert.AreEqual (mi, expr.Method, "AddChecked#09");
+			Assert.AreEqual ("op_Addition", expr.Method.Name, "AddChecked#10");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) + value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "AddChecked#17");
+		}
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Addition");
-            
-            BinaryExpression expr = Expression.AddChecked (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#07");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "AddChecked#08");
-            Assert.AreEqual (mi, expr.Method, "AddChecked#09");
-            Assert.AreEqual ("op_Addition", expr.Method.Name, "AddChecked#10");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) + value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "AddChecked#17");
-        }
+		[Test]
+		public void UserDefinedStruct ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpStruct).GetMethod ("op_Addition");
 
-        [Test]
-        public void UserDefinedStruct ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpStruct).GetMethod ("op_Addition");
-            
-            BinaryExpression expr = Expression.AddChecked (Expression.Constant (new OpStruct ()), Expression.Constant (new OpStruct ()));
-            Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#11");
-            Assert.AreEqual (typeof (OpStruct), expr.Type, "AddChecked#12");
-            Assert.AreEqual (mi, expr.Method, "AddChecked#13");
-            Assert.AreEqual ("op_Addition", expr.Method.Name, "AddChecked#14");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpStruct) + value(MonoTests.System.Linq.Expressions.OpStruct))",
-                expr.ToString(), "AddChecked#18");
-        }
+			BinaryExpression expr = Expression.AddChecked (Expression.Constant (new OpStruct ()), Expression.Constant (new OpStruct ()));
+			Assert.AreEqual (ExpressionType.AddChecked, expr.NodeType, "AddChecked#11");
+			Assert.AreEqual (typeof (OpStruct), expr.Type, "AddChecked#12");
+			Assert.AreEqual (mi, expr.Method, "AddChecked#13");
+			Assert.AreEqual ("op_Addition", expr.Method.Name, "AddChecked#14");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpStruct) + value(MonoTests.System.Linq.Expressions.OpStruct))",
+				expr.ToString(), "AddChecked#18");
+		}
 
-    }
+	}
 }

+ 71 - 71
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_And.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,79 +26,79 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_And
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.And (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_And
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.And (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.And (Expression.Constant (1), null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.And (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.And (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.And (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.And (Expression.Constant (1), Expression.Constant (true));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.And (Expression.Constant (1), Expression.Constant (true));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Double ()
+		{
+			Expression.And (Expression.Constant (1.0), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Double ()
-        {
-            Expression.And (Expression.Constant (1.0), Expression.Constant (2.0));
-        }
+		[Test]
+		public void Integer ()
+		{
+			BinaryExpression expr = Expression.And (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.And, expr.NodeType, "And#01");
+			Assert.AreEqual (typeof (int), expr.Type, "And#02");
+			Assert.IsNull (expr.Method, "And#03");
+			Assert.AreEqual ("(1 & 2)", expr.ToString(), "And#04");
+		}
 
-        [Test]
-        public void Integer ()
-        {
-            BinaryExpression expr = Expression.And (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.And, expr.NodeType, "And#01");
-            Assert.AreEqual (typeof (int), expr.Type, "And#02");
-            Assert.IsNull (expr.Method, "And#03");
-            Assert.AreEqual ("(1 & 2)", expr.ToString(), "And#04");
-        }
+		[Test]
+		public void Boolean ()
+		{
+			BinaryExpression expr = Expression.And (Expression.Constant (true), Expression.Constant (false));
+			Assert.AreEqual (ExpressionType.And, expr.NodeType, "And#05");
+			Assert.AreEqual (typeof (bool), expr.Type, "And#06");
+			Assert.IsNull (expr.Method, "And#07");
+			Assert.AreEqual ("(True And False)", expr.ToString(), "And#08");
+		}
 
-        [Test]
-        public void Boolean ()
-        {
-            BinaryExpression expr = Expression.And (Expression.Constant (true), Expression.Constant (false));
-            Assert.AreEqual (ExpressionType.And, expr.NodeType, "And#05");
-            Assert.AreEqual (typeof (bool), expr.Type, "And#06");
-            Assert.IsNull (expr.Method, "And#07");
-            Assert.AreEqual ("(True And False)", expr.ToString(), "And#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseAnd");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseAnd");
-            
-            BinaryExpression expr = Expression.And (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.And, expr.NodeType, "And#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "And#10");
-            Assert.AreEqual (mi, expr.Method, "And#11");
-            Assert.AreEqual ("op_BitwiseAnd", expr.Method.Name, "And#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) & value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "And#13");
-        }
-    }
+			BinaryExpression expr = Expression.And (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.And, expr.NodeType, "And#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "And#10");
+			Assert.AreEqual (mi, expr.Method, "And#11");
+			Assert.AreEqual ("op_BitwiseAnd", expr.Method.Name, "And#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) & value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "And#13");
+		}
+	}
 }

+ 67 - 67
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_AndAlso.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,76 +26,76 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_AndAlso
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.AndAlso (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_AndAlso
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.AndAlso (null, Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.AndAlso (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.AndAlso (Expression.Constant (1), null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.AndAlso (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.AndAlso (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Double ()
-        {
-            Expression.AndAlso (Expression.Constant (1.0), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Double ()
+		{
+			Expression.AndAlso (Expression.Constant (1.0), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Integer ()
-        {
-            Expression.AndAlso (Expression.Constant (1), Expression.Constant (2));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Integer ()
+		{
+			Expression.AndAlso (Expression.Constant (1), Expression.Constant (2));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void MismatchedTypes ()
-        {
-            Expression.AndAlso (Expression.Constant (new OpClass ()), Expression.Constant (true));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void MismatchedTypes ()
+		{
+			Expression.AndAlso (Expression.Constant (new OpClass ()), Expression.Constant (true));
+		}
 
-        [Test]
-        public void Boolean ()
-        {
-            BinaryExpression expr = Expression.AndAlso (Expression.Constant (true), Expression.Constant (false));
-            Assert.AreEqual (ExpressionType.AndAlso, expr.NodeType, "AndAlso#01");
-            Assert.AreEqual (typeof (bool), expr.Type, "AndAlso#02");
-            Assert.IsNull (expr.Method, "AndAlso#03");
-            Assert.AreEqual ("(True && False)", expr.ToString(), "AndAlso#04");
-        }
+		[Test]
+		public void Boolean ()
+		{
+			BinaryExpression expr = Expression.AndAlso (Expression.Constant (true), Expression.Constant (false));
+			Assert.AreEqual (ExpressionType.AndAlso, expr.NodeType, "AndAlso#01");
+			Assert.AreEqual (typeof (bool), expr.Type, "AndAlso#02");
+			Assert.IsNull (expr.Method, "AndAlso#03");
+			Assert.AreEqual ("(True && False)", expr.ToString(), "AndAlso#04");
+		}
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseAnd");
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseAnd");
 
-            BinaryExpression expr = Expression.AndAlso (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.AndAlso, expr.NodeType, "AndAlso#05");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "AndAlso#06");
-            Assert.AreEqual (mi, expr.Method, "AndAlso#07");
-            Assert.AreEqual ("op_BitwiseAnd", expr.Method.Name, "AndAlso#08");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) && value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "AndAlso#09");
-        }
-    }
+			BinaryExpression expr = Expression.AndAlso (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.AndAlso, expr.NodeType, "AndAlso#05");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "AndAlso#06");
+			Assert.AreEqual (mi, expr.Method, "AndAlso#07");
+			Assert.AreEqual ("op_BitwiseAnd", expr.Method.Name, "AndAlso#08");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) && value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "AndAlso#09");
+		}
+	}
 }

+ 115 - 115
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ArrayIndex.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -27,116 +27,116 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_ArrayIndex
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.ArrayIndex (null, Expression.Constant (1));
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null1 ()
-        {
-            Expression.ArrayIndex (Expression.Constant (new int[1]), (Expression)null);
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null2 ()
-        {
-            Expression.ArrayIndex (Expression.Constant (new int[1]), (IEnumerable<Expression>)null);
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null3 ()
-        {
-            Expression.ArrayIndex (Expression.Constant (new int[1]), (Expression[])null);
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Arg2WrongType1 ()
-        {
-            Expression.ArrayIndex (Expression.Constant (new int[1]), Expression.Constant (true));
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Arg1NotArray ()
-        {
-            Expression.ArrayIndex (Expression.Constant ("This is not an array!"), Expression.Constant (1));
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Arg2WrongType2 ()
-        {
-            Expression[] indexes = { Expression.Constant (1), Expression.Constant (1L) };
-
-            Expression.ArrayIndex (Expression.Constant (new int[1,1]), indexes);
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Arg2WrongNumber1 ()
-        {
-            Expression[] indexes = { Expression.Constant (1), Expression.Constant (0) };
-
-            Expression.ArrayIndex (Expression.Constant (new int[1]), indexes);
-        }
-
-        [Test]
-        public void Rank1Struct ()
-        {
-            int[] array = { 42 };
-            
-            BinaryExpression expr = Expression.ArrayIndex (Expression.Constant (array), Expression.Constant(0));
-            Assert.AreEqual (ExpressionType.ArrayIndex, expr.NodeType, "ArrayIndex#01");
-            Assert.AreEqual (typeof (int), expr.Type, "ArrayIndex#02");
-            Assert.IsNull (expr.Method, "ArrayIndex#03");
-            Assert.AreEqual ("value(System.Int32[])[0]", expr.ToString(), "ArrayIndex#04");
-        }
-
-        [Test]
-        public void Rank1UserDefinedClass ()
-        {
-            NoOpClass[] array = { new NoOpClass() };
-            
-            BinaryExpression expr = Expression.ArrayIndex (Expression.Constant (array), Expression.Constant(0));
-            Assert.AreEqual (ExpressionType.ArrayIndex, expr.NodeType, "ArrayIndex#05");
-            Assert.AreEqual (typeof (NoOpClass), expr.Type, "ArrayIndex#06");
-            Assert.IsNull (expr.Method, "ArrayIndex#07");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.NoOpClass[])[0]", expr.ToString(), "ArrayIndex#08");
-        }
-
-        [Test]
-        public void Rank2Struct ()
-        {
-            int[,] array = { {42}, {42} };
-            Expression[] indexes = { Expression.Constant (1), Expression.Constant (0) };
-            
-            MethodCallExpression expr = Expression.ArrayIndex (Expression.Constant (array), indexes);
-            Assert.AreEqual (ExpressionType.Call, expr.NodeType, "ArrayIndex#09");
-            Assert.AreEqual (typeof (int), expr.Type, "ArrayIndex#10");
-            Assert.AreEqual ("value(System.Int32[,]).Get(1, 0)", expr.ToString(), "ArrayIndex#12");
-        }
-
-        [Test]
-        public void Rank2UserDefinedClass ()
-        {
-            NoOpClass[,] array = { {new NoOpClass()}, {new NoOpClass()} };
-            Expression[] indexes = { Expression.Constant (1), Expression.Constant (0) };
-            
-            MethodCallExpression expr = Expression.ArrayIndex (Expression.Constant (array), indexes);
-            Assert.AreEqual (ExpressionType.Call, expr.NodeType, "ArrayIndex#13");
-            Assert.AreEqual (typeof (NoOpClass), expr.Type, "ArrayIndex#14");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.NoOpClass[,]).Get(1, 0)", expr.ToString(), "ArrayIndex#16");
-        }
-    }
+{
+	[TestFixture]
+	public class ExpressionTest_ArrayIndex
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.ArrayIndex (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null1 ()
+		{
+			Expression.ArrayIndex (Expression.Constant (new int[1]), (Expression)null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null2 ()
+		{
+			Expression.ArrayIndex (Expression.Constant (new int[1]), (IEnumerable<Expression>)null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null3 ()
+		{
+			Expression.ArrayIndex (Expression.Constant (new int[1]), (Expression[])null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Arg2WrongType1 ()
+		{
+			Expression.ArrayIndex (Expression.Constant (new int[1]), Expression.Constant (true));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Arg1NotArray ()
+		{
+			Expression.ArrayIndex (Expression.Constant ("This is not an array!"), Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Arg2WrongType2 ()
+		{
+			Expression[] indexes = { Expression.Constant (1), Expression.Constant (1L) };
+
+			Expression.ArrayIndex (Expression.Constant (new int[1,1]), indexes);
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Arg2WrongNumber1 ()
+		{
+			Expression[] indexes = { Expression.Constant (1), Expression.Constant (0) };
+
+			Expression.ArrayIndex (Expression.Constant (new int[1]), indexes);
+		}
+
+		[Test]
+		public void Rank1Struct ()
+		{
+			int[] array = { 42 };
+
+			BinaryExpression expr = Expression.ArrayIndex (Expression.Constant (array), Expression.Constant(0));
+			Assert.AreEqual (ExpressionType.ArrayIndex, expr.NodeType, "ArrayIndex#01");
+			Assert.AreEqual (typeof (int), expr.Type, "ArrayIndex#02");
+			Assert.IsNull (expr.Method, "ArrayIndex#03");
+			Assert.AreEqual ("value(System.Int32[])[0]", expr.ToString(), "ArrayIndex#04");
+		}
+
+		[Test]
+		public void Rank1UserDefinedClass ()
+		{
+			NoOpClass[] array = { new NoOpClass() };
+
+			BinaryExpression expr = Expression.ArrayIndex (Expression.Constant (array), Expression.Constant(0));
+			Assert.AreEqual (ExpressionType.ArrayIndex, expr.NodeType, "ArrayIndex#05");
+			Assert.AreEqual (typeof (NoOpClass), expr.Type, "ArrayIndex#06");
+			Assert.IsNull (expr.Method, "ArrayIndex#07");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.NoOpClass[])[0]", expr.ToString(), "ArrayIndex#08");
+		}
+
+		[Test]
+		public void Rank2Struct ()
+		{
+			int[,] array = { {42}, {42} };
+			Expression[] indexes = { Expression.Constant (1), Expression.Constant (0) };
+
+			MethodCallExpression expr = Expression.ArrayIndex (Expression.Constant (array), indexes);
+			Assert.AreEqual (ExpressionType.Call, expr.NodeType, "ArrayIndex#09");
+			Assert.AreEqual (typeof (int), expr.Type, "ArrayIndex#10");
+			Assert.AreEqual ("value(System.Int32[,]).Get(1, 0)", expr.ToString(), "ArrayIndex#12");
+		}
+
+		[Test]
+		public void Rank2UserDefinedClass ()
+		{
+			NoOpClass[,] array = { {new NoOpClass()}, {new NoOpClass()} };
+			Expression[] indexes = { Expression.Constant (1), Expression.Constant (0) };
+
+			MethodCallExpression expr = Expression.ArrayIndex (Expression.Constant (array), indexes);
+			Assert.AreEqual (ExpressionType.Call, expr.NodeType, "ArrayIndex#13");
+			Assert.AreEqual (typeof (NoOpClass), expr.Type, "ArrayIndex#14");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.NoOpClass[,]).Get(1, 0)", expr.ToString(), "ArrayIndex#16");
+		}
+	}
 }

+ 116 - 116
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Bind.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -27,117 +27,117 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_Bind
-    {        
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Bind (null, Expression.Constant (1));
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Bind (MemberClass.GetRwFieldInfo (), null);
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Method1 ()
-        {
-            // This tests the MethodInfo version of Bind(): should raise an exception
-            // because the method is not an accessor.
-            Expression.Bind (MemberClass.GetMethodInfo (), Expression.Constant (1));
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Method2 ()
-        {
-            // This tests the MemberInfo version of Bind(): should raise an exception
-            // because the argument is not a field or property accessor.
-            Expression.Bind ((MemberInfo)MemberClass.GetMethodInfo (), Expression.Constant (1));
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Event ()
-        {
-            Expression.Bind (MemberClass.GetEventInfo (), Expression.Constant (1));
-        }
-
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void PropertyRo ()
-        {
-            Expression.Bind (MemberClass.GetRoPropertyInfo (), Expression.Constant (1));
-        }
-
-        [Test]
-        public void FieldRo ()
-        {
-            MemberAssignment expr = Expression.Bind (MemberClass.GetRoFieldInfo (), Expression.Constant (1));
-            Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#01");
-            Assert.AreEqual ("TestField1 = 1", expr.ToString(), "Bind#02");
-        }
-
-        [Test]
-        public void FieldRw ()
-        {
-            MemberAssignment expr = Expression.Bind (MemberClass.GetRwFieldInfo (), Expression.Constant (1));
-            Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#03");
-            Assert.AreEqual ("TestField2 = 1", expr.ToString(), "Bind#04");
-        }
-
-        [Test]
-        public void FieldStatic ()
-        {
-            MemberAssignment expr = Expression.Bind (MemberClass.GetStaticFieldInfo (), Expression.Constant (1));
-            Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#05");
-            Assert.AreEqual ("StaticField = 1", expr.ToString(), "Bind#06");
-        }
-
-        [Test]
-        public void PropertyRw ()
-        {
-            MemberAssignment expr = Expression.Bind (MemberClass.GetRwPropertyInfo (), Expression.Constant (1));
-            Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#07");
-            Assert.AreEqual ("TestProperty2 = 1", expr.ToString(), "Bind#08");
-        }
-
-        [Test]
-        public void PropertyStatic ()
-        {
-            MemberAssignment expr = Expression.Bind (MemberClass.GetStaticPropertyInfo (), Expression.Constant (1));
-            Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#09");
-            Assert.AreEqual ("StaticProperty = 1", expr.ToString(), "Bind#10");
-        }
-
-        [Test]
-        public void PropertyAccessor ()
-        {
-            MethodInfo mi = typeof(MemberClass).GetMethod("get_TestProperty2");
-            
-            MemberAssignment expr = Expression.Bind (mi, Expression.Constant (1));
-            Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#11");
-            Assert.AreEqual ("TestProperty2 = 1", expr.ToString(), "Bind#12");
-            Assert.AreEqual (MemberClass.GetRwPropertyInfo(), expr.Member, "Bind#13");
-        }
-
-        [Test]
-        public void PropertyAccessorStatic ()
-        {
-            MethodInfo mi = typeof(MemberClass).GetMethod("get_StaticProperty");
-            
-            MemberAssignment expr = Expression.Bind (mi, Expression.Constant (1));
-            Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#14");
-            Assert.AreEqual ("StaticProperty = 1", expr.ToString(), "Bind#15");
-            Assert.AreEqual (MemberClass.GetStaticPropertyInfo(), expr.Member, "Bind#16");
-        }
-
-    }
+{
+	[TestFixture]
+	public class ExpressionTest_Bind
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Bind (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Bind (MemberClass.GetRwFieldInfo (), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Method1 ()
+		{
+			// This tests the MethodInfo version of Bind(): should raise an exception
+			// because the method is not an accessor.
+			Expression.Bind (MemberClass.GetMethodInfo (), Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Method2 ()
+		{
+			// This tests the MemberInfo version of Bind(): should raise an exception
+			// because the argument is not a field or property accessor.
+			Expression.Bind ((MemberInfo)MemberClass.GetMethodInfo (), Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Event ()
+		{
+			Expression.Bind (MemberClass.GetEventInfo (), Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void PropertyRo ()
+		{
+			Expression.Bind (MemberClass.GetRoPropertyInfo (), Expression.Constant (1));
+		}
+
+		[Test]
+		public void FieldRo ()
+		{
+			MemberAssignment expr = Expression.Bind (MemberClass.GetRoFieldInfo (), Expression.Constant (1));
+			Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#01");
+			Assert.AreEqual ("TestField1 = 1", expr.ToString(), "Bind#02");
+		}
+
+		[Test]
+		public void FieldRw ()
+		{
+			MemberAssignment expr = Expression.Bind (MemberClass.GetRwFieldInfo (), Expression.Constant (1));
+			Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#03");
+			Assert.AreEqual ("TestField2 = 1", expr.ToString(), "Bind#04");
+		}
+
+		[Test]
+		public void FieldStatic ()
+		{
+			MemberAssignment expr = Expression.Bind (MemberClass.GetStaticFieldInfo (), Expression.Constant (1));
+			Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#05");
+			Assert.AreEqual ("StaticField = 1", expr.ToString(), "Bind#06");
+		}
+
+		[Test]
+		public void PropertyRw ()
+		{
+			MemberAssignment expr = Expression.Bind (MemberClass.GetRwPropertyInfo (), Expression.Constant (1));
+			Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#07");
+			Assert.AreEqual ("TestProperty2 = 1", expr.ToString(), "Bind#08");
+		}
+
+		[Test]
+		public void PropertyStatic ()
+		{
+			MemberAssignment expr = Expression.Bind (MemberClass.GetStaticPropertyInfo (), Expression.Constant (1));
+			Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#09");
+			Assert.AreEqual ("StaticProperty = 1", expr.ToString(), "Bind#10");
+		}
+
+		[Test]
+		public void PropertyAccessor ()
+		{
+			MethodInfo mi = typeof(MemberClass).GetMethod("get_TestProperty2");
+
+			MemberAssignment expr = Expression.Bind (mi, Expression.Constant (1));
+			Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#11");
+			Assert.AreEqual ("TestProperty2 = 1", expr.ToString(), "Bind#12");
+			Assert.AreEqual (MemberClass.GetRwPropertyInfo(), expr.Member, "Bind#13");
+		}
+
+		[Test]
+		public void PropertyAccessorStatic ()
+		{
+			MethodInfo mi = typeof(MemberClass).GetMethod("get_StaticProperty");
+
+			MemberAssignment expr = Expression.Bind (mi, Expression.Constant (1));
+			Assert.AreEqual (MemberBindingType.Assignment, expr.BindingType, "Bind#14");
+			Assert.AreEqual ("StaticProperty = 1", expr.ToString(), "Bind#15");
+			Assert.AreEqual (MemberClass.GetStaticPropertyInfo(), expr.Member, "Bind#16");
+		}
+
+	}
 }

+ 92 - 92
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Constant.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Linq;
@@ -26,102 +26,102 @@ using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
 {
-    [TestFixture]
-    public class ExpressionTest_Constant
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void Arg2NotNullable ()
-        {
-            Expression.Constant(null, typeof(int));
-        }
+	[TestFixture]
+	public class ExpressionTest_Constant
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void Arg2NotNullable ()
+		{
+			Expression.Constant(null, typeof(int));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Constant (1, null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Constant (1, null);
+		}
 
-        [Test]
-        public void NullValue ()
-        {
-            ConstantExpression expr = Expression.Constant (null);
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#01");
-            Assert.IsNull (expr.Value, "Constant#02");
-            Assert.AreEqual (typeof (object), expr.Type, "Constant#03");
-            Assert.AreEqual ("null", expr.ToString(), "Constant#04");
-        }
+		[Test]
+		public void NullValue ()
+		{
+			ConstantExpression expr = Expression.Constant (null);
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#01");
+			Assert.IsNull (expr.Value, "Constant#02");
+			Assert.AreEqual (typeof (object), expr.Type, "Constant#03");
+			Assert.AreEqual ("null", expr.ToString(), "Constant#04");
+		}
 
-        [Test]
-        public void NullableValue1 ()
-        {
-            ConstantExpression expr = Expression.Constant (null, typeof(int?));
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#05");
-            Assert.IsNull (expr.Value, "Constant#06");
-            Assert.AreEqual (typeof (int?), expr.Type, "Constant#07");
-            Assert.AreEqual ("null", expr.ToString(), "Constant#08");
-        }
+		[Test]
+		public void NullableValue1 ()
+		{
+			ConstantExpression expr = Expression.Constant (null, typeof(int?));
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#05");
+			Assert.IsNull (expr.Value, "Constant#06");
+			Assert.AreEqual (typeof (int?), expr.Type, "Constant#07");
+			Assert.AreEqual ("null", expr.ToString(), "Constant#08");
+		}
 
-        [Test]
-        public void NullableValue2 ()
-        {
-            ConstantExpression expr = Expression.Constant (1, typeof (int?));
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#09");
-            Assert.AreEqual (1, expr.Value, "Constant#10");
-            Assert.AreEqual (typeof (int?), expr.Type, "Constant#11");
-            Assert.AreEqual ("1", expr.ToString(), "Constant#12");
-        }
+		[Test]
+		public void NullableValue2 ()
+		{
+			ConstantExpression expr = Expression.Constant (1, typeof (int?));
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#09");
+			Assert.AreEqual (1, expr.Value, "Constant#10");
+			Assert.AreEqual (typeof (int?), expr.Type, "Constant#11");
+			Assert.AreEqual ("1", expr.ToString(), "Constant#12");
+		}
 
-        [Test]
-        public void NullableValue3 ()
-        {
-            ConstantExpression expr = Expression.Constant ((int?)1);
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#13");
-            Assert.AreEqual (1, expr.Value, "Constant#14");
-            Assert.AreEqual (typeof (int), expr.Type, "Constant#15");
-            Assert.AreEqual ("1", expr.ToString(), "Constant#16");
-        }
+		[Test]
+		public void NullableValue3 ()
+		{
+			ConstantExpression expr = Expression.Constant ((int?)1);
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#13");
+			Assert.AreEqual (1, expr.Value, "Constant#14");
+			Assert.AreEqual (typeof (int), expr.Type, "Constant#15");
+			Assert.AreEqual ("1", expr.ToString(), "Constant#16");
+		}
 
-        [Test]
-        public void IntegerValue ()
-        {
-            ConstantExpression expr = Expression.Constant (0);
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#17");
-            Assert.AreEqual (0, expr.Value, "Constant#18");
-            Assert.AreEqual (typeof (int), expr.Type, "Constant#19");
-            Assert.AreEqual ("0", expr.ToString(), "Constant#20");
-        }
+		[Test]
+		public void IntegerValue ()
+		{
+			ConstantExpression expr = Expression.Constant (0);
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#17");
+			Assert.AreEqual (0, expr.Value, "Constant#18");
+			Assert.AreEqual (typeof (int), expr.Type, "Constant#19");
+			Assert.AreEqual ("0", expr.ToString(), "Constant#20");
+		}
 
-        [Test]
-        public void StringValue ()
-        {
-            ConstantExpression expr = Expression.Constant ("a string");
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#21");
-            Assert.AreEqual ("a string", expr.Value, "Constant#22");
-            Assert.AreEqual (typeof (string), expr.Type, "Constant#23");
-            Assert.AreEqual ("\"a string\"", expr.ToString(), "Constant#24");
-        }
+		[Test]
+		public void StringValue ()
+		{
+			ConstantExpression expr = Expression.Constant ("a string");
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#21");
+			Assert.AreEqual ("a string", expr.Value, "Constant#22");
+			Assert.AreEqual (typeof (string), expr.Type, "Constant#23");
+			Assert.AreEqual ("\"a string\"", expr.ToString(), "Constant#24");
+		}
 
-        [Test]
-        public void DateTimeValue ()
-        {
-            ConstantExpression expr = Expression.Constant (new DateTime(1971, 10, 19));
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#25");
-            Assert.AreEqual (new DateTime(1971, 10, 19), expr.Value, "Constant#26");
-            Assert.AreEqual (typeof (DateTime), expr.Type, "Constant#27");
-            Assert.AreEqual (new DateTime(1971, 10, 19).ToString(), expr.ToString(), "Constant#28");
-        }
+		[Test]
+		public void DateTimeValue ()
+		{
+			ConstantExpression expr = Expression.Constant (new DateTime(1971, 10, 19));
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#25");
+			Assert.AreEqual (new DateTime(1971, 10, 19), expr.Value, "Constant#26");
+			Assert.AreEqual (typeof (DateTime), expr.Type, "Constant#27");
+			Assert.AreEqual (new DateTime(1971, 10, 19).ToString(), expr.ToString(), "Constant#28");
+		}
 
-        [Test]
-        public void UserClassValue ()
-        {
-            OpClass oc = new OpClass ();
-            ConstantExpression expr = Expression.Constant (oc);
-            Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#29");
-            Assert.AreEqual (oc, expr.Value, "Constant#30");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "Constant#31");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.OpClass)", expr.ToString(), "Constant#32");
-        }
-    }
+		[Test]
+		public void UserClassValue ()
+		{
+			OpClass oc = new OpClass ();
+			ConstantExpression expr = Expression.Constant (oc);
+			Assert.AreEqual (ExpressionType.Constant, expr.NodeType, "Constant#29");
+			Assert.AreEqual (oc, expr.Value, "Constant#30");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "Constant#31");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.OpClass)", expr.ToString(), "Constant#32");
+		}
+	}
 }

+ 74 - 74
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Divide.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,82 +26,82 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Divide
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Divide (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Divide
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Divide (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Divide (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.Divide (Expression.Constant (1), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Divide (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.Divide (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.Divide (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.Divide (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.Divide (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.Divide (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.Divide, expr.NodeType, "Divide#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Divide#02");
+			Assert.IsNull (expr.Method, "Divide#03");
+			Assert.AreEqual ("(1 / 2)", expr.ToString(), "Divide#04");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.Divide (Expression.Constant (true), Expression.Constant (false));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.Divide (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.Divide, expr.NodeType, "Divide#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Divide#02");
-            Assert.IsNull (expr.Method, "Divide#03");
-            Assert.AreEqual ("(1 / 2)", expr.ToString(), "Divide#04");
-        }
+			BinaryExpression expr = Expression.Divide (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.Divide, expr.NodeType, "Divide#05");
+			Assert.AreEqual (typeof (int), expr.Type, "Divide#06");
+			Assert.IsNull (expr.Method, "Divide#07");
+			Assert.AreEqual ("(1 / 2)", expr.ToString(), "Divide#08");
+		}
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.Divide (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.Divide, expr.NodeType, "Divide#05");
-            Assert.AreEqual (typeof (int), expr.Type, "Divide#06");
-            Assert.IsNull (expr.Method, "Divide#07");
-            Assert.AreEqual ("(1 / 2)", expr.ToString(), "Divide#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Division");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Division");
-            
-            BinaryExpression expr = Expression.Divide (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.Divide, expr.NodeType, "Divide#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "Divide#10");
-            Assert.AreEqual (mi, expr.Method, "Divide#11");
-            Assert.AreEqual ("op_Division", expr.Method.Name, "Divide#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) / value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "Divide#13");
-        }
-    }
+			BinaryExpression expr = Expression.Divide (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.Divide, expr.NodeType, "Divide#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "Divide#10");
+			Assert.AreEqual (mi, expr.Method, "Divide#11");
+			Assert.AreEqual ("op_Division", expr.Method.Name, "Divide#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) / value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "Divide#13");
+		}
+	}
 }

+ 71 - 71
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_ExclusiveOr.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,79 +26,79 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_ExclusiveOr
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.ExclusiveOr (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_ExclusiveOr
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.ExclusiveOr (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.ExclusiveOr (Expression.Constant (1), null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.ExclusiveOr (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.ExclusiveOr (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.ExclusiveOr (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.ExclusiveOr (Expression.Constant (1), Expression.Constant (true));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.ExclusiveOr (Expression.Constant (1), Expression.Constant (true));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Double ()
+		{
+			Expression.ExclusiveOr (Expression.Constant (1.0), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Double ()
-        {
-            Expression.ExclusiveOr (Expression.Constant (1.0), Expression.Constant (2.0));
-        }
+		[Test]
+		public void Integer ()
+		{
+			BinaryExpression expr = Expression.ExclusiveOr (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.ExclusiveOr, expr.NodeType, "ExclusiveOr#01");
+			Assert.AreEqual (typeof (int), expr.Type, "ExclusiveOr#02");
+			Assert.IsNull (expr.Method, "ExclusiveOr#03");
+			Assert.AreEqual ("(1 ^ 2)", expr.ToString(), "ExclusiveOr#04");
+		}
 
-        [Test]
-        public void Integer ()
-        {
-            BinaryExpression expr = Expression.ExclusiveOr (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.ExclusiveOr, expr.NodeType, "ExclusiveOr#01");
-            Assert.AreEqual (typeof (int), expr.Type, "ExclusiveOr#02");
-            Assert.IsNull (expr.Method, "ExclusiveOr#03");
-            Assert.AreEqual ("(1 ^ 2)", expr.ToString(), "ExclusiveOr#04");
-        }
+		[Test]
+		public void Boolean ()
+		{
+			BinaryExpression expr = Expression.ExclusiveOr (Expression.Constant (true), Expression.Constant (false));
+			Assert.AreEqual (ExpressionType.ExclusiveOr, expr.NodeType, "ExclusiveOr#05");
+			Assert.AreEqual (typeof (bool), expr.Type, "ExclusiveOr#06");
+			Assert.IsNull (expr.Method, "ExclusiveOr#07");
+			Assert.AreEqual ("(True ^ False)", expr.ToString(), "ExclusiveOr#08");
+		}
 
-        [Test]
-        public void Boolean ()
-        {
-            BinaryExpression expr = Expression.ExclusiveOr (Expression.Constant (true), Expression.Constant (false));
-            Assert.AreEqual (ExpressionType.ExclusiveOr, expr.NodeType, "ExclusiveOr#05");
-            Assert.AreEqual (typeof (bool), expr.Type, "ExclusiveOr#06");
-            Assert.IsNull (expr.Method, "ExclusiveOr#07");
-            Assert.AreEqual ("(True ^ False)", expr.ToString(), "ExclusiveOr#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_ExclusiveOr");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_ExclusiveOr");
-            
-            BinaryExpression expr = Expression.ExclusiveOr (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.ExclusiveOr, expr.NodeType, "ExclusiveOr#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "ExclusiveOr#10");
-            Assert.AreEqual (mi, expr.Method, "ExclusiveOr#11");
-            Assert.AreEqual ("op_ExclusiveOr", expr.Method.Name, "ExclusiveOr#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) ^ value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "ExclusiveOr#13");
-        }
-    }
+			BinaryExpression expr = Expression.ExclusiveOr (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.ExclusiveOr, expr.NodeType, "ExclusiveOr#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "ExclusiveOr#10");
+			Assert.AreEqual (mi, expr.Method, "ExclusiveOr#11");
+			Assert.AreEqual ("op_ExclusiveOr", expr.Method.Name, "ExclusiveOr#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) ^ value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "ExclusiveOr#13");
+		}
+	}
 }

+ 56 - 56
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Field.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,64 +26,64 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Field
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Field (null, "NoField");
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Field
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Field (null, "NoField");
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null1 ()
-        {
-            Expression.Field (Expression.Constant (new MemberClass()), (string)null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null1 ()
+		{
+			Expression.Field (Expression.Constant (new MemberClass()), (string)null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null2 ()
-        {
-            Expression.Field (Expression.Constant (new MemberClass()), (FieldInfo)null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null2 ()
+		{
+			Expression.Field (Expression.Constant (new MemberClass()), (FieldInfo)null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void NoField ()
-        {
-            Expression.Field (Expression.Constant (new MemberClass()), "NoField");
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void NoField ()
+		{
+			Expression.Field (Expression.Constant (new MemberClass()), "NoField");
+		}
 
-        [Test]
-        public void InstanceField ()
-        {
-            MemberExpression expr = Expression.Field (Expression.Constant (new MemberClass()), "TestField1");
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Field#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Field#02");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestField1", expr.ToString(), "Field#03");
-        }
+		[Test]
+		public void InstanceField ()
+		{
+			MemberExpression expr = Expression.Field (Expression.Constant (new MemberClass()), "TestField1");
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Field#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Field#02");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestField1", expr.ToString(), "Field#03");
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void StaticField1 ()
-        {
-            // This will fail because access to a static field should be created using a FieldInfo and
-            // not an instance plus the field name.
-            Expression.Field (Expression.Constant (new MemberClass()), "StaticField");
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void StaticField1 ()
+		{
+			// This will fail because access to a static field should be created using a FieldInfo and
+			// not an instance plus the field name.
+			Expression.Field (Expression.Constant (new MemberClass()), "StaticField");
+		}
 
-        [Test]
-        public void StaticField2 ()
-        {
-            MemberExpression expr = Expression.Field (null, MemberClass.GetStaticFieldInfo());
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Field#07");
-            Assert.AreEqual (typeof (int), expr.Type, "Field#08");
-            Assert.AreEqual ("MemberClass.StaticField", expr.ToString(), "Field#09");
-        }
+		[Test]
+		public void StaticField2 ()
+		{
+			MemberExpression expr = Expression.Field (null, MemberClass.GetStaticFieldInfo());
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Field#07");
+			Assert.AreEqual (typeof (int), expr.Type, "Field#08");
+			Assert.AreEqual ("MemberClass.StaticField", expr.ToString(), "Field#09");
+		}
 
-    }
+	}
 }

+ 80 - 80
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_LeftShift.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,89 +26,89 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_LeftShift
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.LeftShift (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_LeftShift
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.LeftShift (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.LeftShift (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Arg2WrongType ()
+		{
+			Expression.LeftShift (Expression.Constant (1), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.LeftShift (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.LeftShift (Expression.Constant (new NoOpClass ()), Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Arg2WrongType ()
-        {
-            Expression.LeftShift (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.LeftShift (Expression.Constant (true), Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.LeftShift (Expression.Constant (new NoOpClass ()), Expression.Constant (1));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Double ()
+		{
+			Expression.LeftShift (Expression.Constant (2.0), Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.LeftShift (Expression.Constant (true), Expression.Constant (1));
-        }
+		[Test]
+		public void Integer ()
+		{
+			BinaryExpression expr = Expression.LeftShift (Expression.Constant (2), Expression.Constant (1));
+			Assert.AreEqual (ExpressionType.LeftShift, expr.NodeType, "LeftShift#01");
+			Assert.AreEqual (typeof (int), expr.Type, "LeftShift#02");
+			Assert.IsNull (expr.Method, "LeftShift#03");
+			Assert.AreEqual ("(2 << 1)", expr.ToString(), "LeftShift#04");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Double ()
-        {
-            Expression.LeftShift (Expression.Constant (2.0), Expression.Constant (1));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        public void Integer ()
-        {
-            BinaryExpression expr = Expression.LeftShift (Expression.Constant (2), Expression.Constant (1));
-            Assert.AreEqual (ExpressionType.LeftShift, expr.NodeType, "LeftShift#01");
-            Assert.AreEqual (typeof (int), expr.Type, "LeftShift#02");
-            Assert.IsNull (expr.Method, "LeftShift#03");
-            Assert.AreEqual ("(2 << 1)", expr.ToString(), "LeftShift#04");
-        }
+			BinaryExpression expr = Expression.LeftShift (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.LeftShift, expr.NodeType, "LeftShift#05");
+			Assert.AreEqual (typeof (int), expr.Type, "LeftShift#06");
+			Assert.IsNull (expr.Method, "LeftShift#07");
+			Assert.AreEqual ("(1 << 2)", expr.ToString(), "LeftShift#08");
+		}
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.LeftShift (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.LeftShift, expr.NodeType, "LeftShift#05");
-            Assert.AreEqual (typeof (int), expr.Type, "LeftShift#06");
-            Assert.IsNull (expr.Method, "LeftShift#07");
-            Assert.AreEqual ("(1 << 2)", expr.ToString(), "LeftShift#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_LeftShift");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_LeftShift");
-            
-            BinaryExpression expr = Expression.LeftShift (Expression.Constant (new OpClass ()), Expression.Constant (1));
-            Assert.AreEqual (ExpressionType.LeftShift, expr.NodeType, "LeftShift#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "LeftShift#10");
-            Assert.AreEqual (mi, expr.Method, "LeftShift#11");
-            Assert.AreEqual ("op_LeftShift", expr.Method.Name, "LeftShift#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) << 1)",
-                expr.ToString(), "LeftShift#13");
-        }
-    }
+			BinaryExpression expr = Expression.LeftShift (Expression.Constant (new OpClass ()), Expression.Constant (1));
+			Assert.AreEqual (ExpressionType.LeftShift, expr.NodeType, "LeftShift#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "LeftShift#10");
+			Assert.AreEqual (mi, expr.Method, "LeftShift#11");
+			Assert.AreEqual ("op_LeftShift", expr.Method.Name, "LeftShift#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) << 1)",
+				expr.ToString(), "LeftShift#13");
+		}
+	}
 }

+ 83 - 83
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Modulo.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,92 +26,92 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Modulo
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Modulo (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Modulo
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Modulo (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Modulo (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.Modulo (Expression.Constant (1), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Modulo (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.Modulo (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.Modulo (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.Modulo (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.Modulo (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Double ()
+		{
+			BinaryExpression expr = Expression.Modulo (Expression.Constant (1.0), Expression.Constant (2.0));
+			Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#14");
+			Assert.AreEqual (typeof (double), expr.Type, "Modulo#15");
+			Assert.IsNull (expr.Method, "Modulo#16");
+			Assert.AreEqual ("(1 % 2)", expr.ToString(), "Modulo#17");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.Modulo (Expression.Constant (true), Expression.Constant (false));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.Modulo (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Modulo#02");
+			Assert.IsNull (expr.Method, "Modulo#03");
+			Assert.AreEqual ("(1 % 2)", expr.ToString(), "Modulo#04");
+		}
 
-        [Test]
-        public void Double ()
-        {
-            BinaryExpression expr = Expression.Modulo (Expression.Constant (1.0), Expression.Constant (2.0));
-            Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#14");
-            Assert.AreEqual (typeof (double), expr.Type, "Modulo#15");
-            Assert.IsNull (expr.Method, "Modulo#16");
-            Assert.AreEqual ("(1 % 2)", expr.ToString(), "Modulo#17");
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.Modulo (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Modulo#02");
-            Assert.IsNull (expr.Method, "Modulo#03");
-            Assert.AreEqual ("(1 % 2)", expr.ToString(), "Modulo#04");
-        }
+			BinaryExpression expr = Expression.Modulo (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#05");
+			Assert.AreEqual (typeof (int), expr.Type, "Modulo#06");
+			Assert.IsNull (expr.Method, "Modulo#07");
+			Assert.AreEqual ("(1 % 2)", expr.ToString(), "Modulo#08");
+		}
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.Modulo (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#05");
-            Assert.AreEqual (typeof (int), expr.Type, "Modulo#06");
-            Assert.IsNull (expr.Method, "Modulo#07");
-            Assert.AreEqual ("(1 % 2)", expr.ToString(), "Modulo#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Modulus");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Modulus");
-            
-            BinaryExpression expr = Expression.Modulo (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "Modulo#10");
-            Assert.AreEqual (mi, expr.Method, "Modulo#11");
-            Assert.AreEqual ("op_Modulus", expr.Method.Name, "Modulo#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) % value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "Modulo#13");
-        }
-    }
+			BinaryExpression expr = Expression.Modulo (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.Modulo, expr.NodeType, "Modulo#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "Modulo#10");
+			Assert.AreEqual (mi, expr.Method, "Modulo#11");
+			Assert.AreEqual ("op_Modulus", expr.Method.Name, "Modulo#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) % value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "Modulo#13");
+		}
+	}
 }

+ 74 - 74
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Multiply.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,82 +26,82 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Multiply
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Multiply (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Multiply
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Multiply (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Multiply (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.Multiply (Expression.Constant (1), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Multiply (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.Multiply (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.Multiply (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.Multiply (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.Multiply (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.Multiply (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.Multiply, expr.NodeType, "Multiply#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Multiply#02");
+			Assert.IsNull (expr.Method, "Multiply#03");
+			Assert.AreEqual ("(1 * 2)", expr.ToString(), "Multiply#04");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.Multiply (Expression.Constant (true), Expression.Constant (false));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.Multiply (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.Multiply, expr.NodeType, "Multiply#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Multiply#02");
-            Assert.IsNull (expr.Method, "Multiply#03");
-            Assert.AreEqual ("(1 * 2)", expr.ToString(), "Multiply#04");
-        }
+			BinaryExpression expr = Expression.Multiply (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.Multiply, expr.NodeType, "Multiply#05");
+			Assert.AreEqual (typeof (int), expr.Type, "Multiply#06");
+			Assert.IsNull (expr.Method, "Multiply#07");
+			Assert.AreEqual ("(1 * 2)", expr.ToString(), "Multiply#08");
+		}
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.Multiply (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.Multiply, expr.NodeType, "Multiply#05");
-            Assert.AreEqual (typeof (int), expr.Type, "Multiply#06");
-            Assert.IsNull (expr.Method, "Multiply#07");
-            Assert.AreEqual ("(1 * 2)", expr.ToString(), "Multiply#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Multiply");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Multiply");
-            
-            BinaryExpression expr = Expression.Multiply (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.Multiply, expr.NodeType, "Multiply#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "Multiply#10");
-            Assert.AreEqual (mi, expr.Method, "Multiply#11");
-            Assert.AreEqual ("op_Multiply", expr.Method.Name, "Multiply#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) * value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "Multiply#13");
-        }
-    }
+			BinaryExpression expr = Expression.Multiply (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.Multiply, expr.NodeType, "Multiply#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "Multiply#10");
+			Assert.AreEqual (mi, expr.Method, "Multiply#11");
+			Assert.AreEqual ("op_Multiply", expr.Method.Name, "Multiply#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) * value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "Multiply#13");
+		}
+	}
 }

+ 89 - 89
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_MultiplyChecked.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,99 +26,99 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_MultiplyChecked
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.MultiplyChecked (null, Expression.Constant(1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_MultiplyChecked
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.MultiplyChecked (null, Expression.Constant(1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.MultiplyChecked (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.AndAlso (Expression.Constant (1), Expression.Constant (2.0));
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.MultiplyChecked (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.MultiplyChecked (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.MultiplyChecked (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.AndAlso (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#01");
+			Assert.AreEqual (typeof (int), expr.Type, "MultiplyChecked#02");
+			Assert.IsNull (expr.Method, "MultiplyChecked#03");
+			Assert.AreEqual ("(1 * 2)", expr.ToString(), "MultiplyChecked#15");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.MultiplyChecked (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.MultiplyChecked (Expression.Constant (true), Expression.Constant (false));
-        }
+			BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#04");
+			Assert.AreEqual (typeof (int), expr.Type, "MultiplyChecked#05");
+			Assert.IsNull (expr.Method, null, "MultiplyChecked#06");
+			Assert.AreEqual ("(1 * 2)", expr.ToString(), "MultiplyChecked#16");
+		}
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#01");
-            Assert.AreEqual (typeof (int), expr.Type, "MultiplyChecked#02");
-            Assert.IsNull (expr.Method, "MultiplyChecked#03");
-            Assert.AreEqual ("(1 * 2)", expr.ToString(), "MultiplyChecked#15");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Multiply");
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#04");
-            Assert.AreEqual (typeof (int), expr.Type, "MultiplyChecked#05");
-            Assert.IsNull (expr.Method, null, "MultiplyChecked#06");
-            Assert.AreEqual ("(1 * 2)", expr.ToString(), "MultiplyChecked#16");
-        }
+			BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#07");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "MultiplyChecked#08");
+			Assert.AreEqual (mi, expr.Method, "MultiplyChecked#09");
+			Assert.AreEqual ("op_Multiply", expr.Method.Name, "MultiplyChecked#10");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) * value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "MultiplyChecked#17");
+		}
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Multiply");
-            
-            BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#07");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "MultiplyChecked#08");
-            Assert.AreEqual (mi, expr.Method, "MultiplyChecked#09");
-            Assert.AreEqual ("op_Multiply", expr.Method.Name, "MultiplyChecked#10");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) * value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "MultiplyChecked#17");
-        }
+		[Test]
+		public void UserDefinedStruct ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpStruct).GetMethod ("op_Multiply");
 
-        [Test]
-        public void UserDefinedStruct ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpStruct).GetMethod ("op_Multiply");
-            
-            BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (new OpStruct ()), Expression.Constant (new OpStruct ()));
-            Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#11");
-            Assert.AreEqual (typeof (OpStruct), expr.Type, "MultiplyChecked#12");
-            Assert.AreEqual (mi, expr.Method, "MultiplyChecked#13");
-            Assert.AreEqual ("op_Multiply", expr.Method.Name, "MultiplyChecked#14");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpStruct) * value(MonoTests.System.Linq.Expressions.OpStruct))",
-                expr.ToString(), "MultiplyChecked#18");
-        }
+			BinaryExpression expr = Expression.MultiplyChecked (Expression.Constant (new OpStruct ()), Expression.Constant (new OpStruct ()));
+			Assert.AreEqual (ExpressionType.MultiplyChecked, expr.NodeType, "MultiplyChecked#11");
+			Assert.AreEqual (typeof (OpStruct), expr.Type, "MultiplyChecked#12");
+			Assert.AreEqual (mi, expr.Method, "MultiplyChecked#13");
+			Assert.AreEqual ("op_Multiply", expr.Method.Name, "MultiplyChecked#14");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpStruct) * value(MonoTests.System.Linq.Expressions.OpStruct))",
+				expr.ToString(), "MultiplyChecked#18");
+		}
 
-    }
+	}
 }

+ 71 - 71
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Or.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,79 +26,79 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_Or
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Or (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Or
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Or (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Or (Expression.Constant (1), null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Or (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.Or (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.Or (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.Or (Expression.Constant (1), Expression.Constant (true));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.Or (Expression.Constant (1), Expression.Constant (true));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Double ()
+		{
+			Expression.Or (Expression.Constant (1.0), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Double ()
-        {
-            Expression.Or (Expression.Constant (1.0), Expression.Constant (2.0));
-        }
+		[Test]
+		public void Integer ()
+		{
+			BinaryExpression expr = Expression.Or (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.Or, expr.NodeType, "Or#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Or#02");
+			Assert.IsNull (expr.Method, "Or#03");
+			Assert.AreEqual ("(1 | 2)", expr.ToString(), "Or#04");
+		}
 
-        [Test]
-        public void Integer ()
-        {
-            BinaryExpression expr = Expression.Or (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.Or, expr.NodeType, "Or#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Or#02");
-            Assert.IsNull (expr.Method, "Or#03");
-            Assert.AreEqual ("(1 | 2)", expr.ToString(), "Or#04");
-        }
+		[Test]
+		public void Boolean ()
+		{
+			BinaryExpression expr = Expression.Or (Expression.Constant (true), Expression.Constant (false));
+			Assert.AreEqual (ExpressionType.Or, expr.NodeType, "Or#05");
+			Assert.AreEqual (typeof (bool), expr.Type, "Or#06");
+			Assert.IsNull (expr.Method, "Or#07");
+			Assert.AreEqual ("(True Or False)", expr.ToString(), "Or#08");
+		}
 
-        [Test]
-        public void Boolean ()
-        {
-            BinaryExpression expr = Expression.Or (Expression.Constant (true), Expression.Constant (false));
-            Assert.AreEqual (ExpressionType.Or, expr.NodeType, "Or#05");
-            Assert.AreEqual (typeof (bool), expr.Type, "Or#06");
-            Assert.IsNull (expr.Method, "Or#07");
-            Assert.AreEqual ("(True Or False)", expr.ToString(), "Or#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseOr");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseOr");
-            
-            BinaryExpression expr = Expression.Or (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.Or, expr.NodeType, "Or#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "Or#10");
-            Assert.AreEqual (mi, expr.Method, "Or#11");
-            Assert.AreEqual ("op_BitwiseOr", expr.Method.Name, "Or#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) | value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "Or#13");
-        }
-    }
+			BinaryExpression expr = Expression.Or (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.Or, expr.NodeType, "Or#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "Or#10");
+			Assert.AreEqual (mi, expr.Method, "Or#11");
+			Assert.AreEqual ("op_BitwiseOr", expr.Method.Name, "Or#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) | value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "Or#13");
+		}
+	}
 }

+ 67 - 67
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_OrElse.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,76 +26,76 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_OrElse
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.OrElse (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_OrElse
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.OrElse (null, Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.OrElse (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.OrElse (Expression.Constant (1), null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.OrElse (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.OrElse (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Double ()
-        {
-            Expression.OrElse (Expression.Constant (1.0), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Double ()
+		{
+			Expression.OrElse (Expression.Constant (1.0), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Integer ()
-        {
-            Expression.OrElse (Expression.Constant (1), Expression.Constant (2));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Integer ()
+		{
+			Expression.OrElse (Expression.Constant (1), Expression.Constant (2));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void MismatchedTypes ()
-        {
-            Expression.OrElse (Expression.Constant (new OpClass ()), Expression.Constant (true));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void MismatchedTypes ()
+		{
+			Expression.OrElse (Expression.Constant (new OpClass ()), Expression.Constant (true));
+		}
 
-        [Test]
-        public void Boolean ()
-        {
-            BinaryExpression expr = Expression.OrElse (Expression.Constant (true), Expression.Constant (false));
-            Assert.AreEqual (ExpressionType.OrElse, expr.NodeType, "OrElse#01");
-            Assert.AreEqual (typeof (bool), expr.Type, "OrElse#02");
-            Assert.IsNull (expr.Method, "OrElse#03");
-            Assert.AreEqual ("(True || False)", expr.ToString(), "OrElse#04");
-        }
+		[Test]
+		public void Boolean ()
+		{
+			BinaryExpression expr = Expression.OrElse (Expression.Constant (true), Expression.Constant (false));
+			Assert.AreEqual (ExpressionType.OrElse, expr.NodeType, "OrElse#01");
+			Assert.AreEqual (typeof (bool), expr.Type, "OrElse#02");
+			Assert.IsNull (expr.Method, "OrElse#03");
+			Assert.AreEqual ("(True || False)", expr.ToString(), "OrElse#04");
+		}
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseOr");
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_BitwiseOr");
 
-            BinaryExpression expr = Expression.OrElse (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.OrElse, expr.NodeType, "OrElse#05");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "OrElse#06");
-            Assert.AreEqual (mi, expr.Method, "OrElse#07");
-            Assert.AreEqual ("op_BitwiseOr", expr.Method.Name, "OrElse#08");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) || value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "OrElse#09");
-        }
-    }
+			BinaryExpression expr = Expression.OrElse (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.OrElse, expr.NodeType, "OrElse#05");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "OrElse#06");
+			Assert.AreEqual (mi, expr.Method, "OrElse#07");
+			Assert.AreEqual ("op_BitwiseOr", expr.Method.Name, "OrElse#08");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) || value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "OrElse#09");
+		}
+	}
 }

+ 92 - 92
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Property.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,103 +26,103 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Property
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Property (null, "NoProperty");
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Property
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Property (null, "NoProperty");
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null1 ()
+		{
+			Expression.Property (Expression.Constant (new MemberClass()), (string)null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null2 ()
+		{
+			Expression.Property (Expression.Constant (new MemberClass()), (PropertyInfo)null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null1 ()
-        {
-            Expression.Property (Expression.Constant (new MemberClass()), (string)null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null3 ()
+		{
+			Expression.Property (Expression.Constant (new MemberClass()), (MethodInfo)null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null2 ()
-        {
-            Expression.Property (Expression.Constant (new MemberClass()), (PropertyInfo)null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void NoProperty ()
+		{
+			Expression.Property (Expression.Constant (new MemberClass()), "NoProperty");
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null3 ()
-        {
-            Expression.Property (Expression.Constant (new MemberClass()), (MethodInfo)null);
-        }
+		[Test]
+		public void InstanceProperty1 ()
+		{
+			MemberExpression expr = Expression.Property (Expression.Constant (new MemberClass()), "TestProperty1");
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Property#02");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "Property#03");
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void NoProperty ()
-        {
-            Expression.Property (Expression.Constant (new MemberClass()), "NoProperty");
-        }
+		[Test]
+		public void InstanceProperty2 ()
+		{
+			MemberExpression expr = Expression.Property (Expression.Constant (new MemberClass()), MemberClass.GetRoPropertyInfo());
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#04");
+			Assert.AreEqual (typeof (int), expr.Type, "Property#05");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "Property#06");
+		}
 
-        [Test]
-        public void InstanceProperty1 ()
-        {
-            MemberExpression expr = Expression.Property (Expression.Constant (new MemberClass()), "TestProperty1");
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Property#02");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "Property#03");
-        }
+		[Test]
+		public void InstanceProperty3 ()
+		{
+			MethodInfo mi = typeof(MemberClass).GetMethod("get_TestProperty1");
 
-        [Test]
-        public void InstanceProperty2 ()
-        {
-            MemberExpression expr = Expression.Property (Expression.Constant (new MemberClass()), MemberClass.GetRoPropertyInfo());
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#04");
-            Assert.AreEqual (typeof (int), expr.Type, "Property#05");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "Property#06");
-        }
+			MemberExpression expr = Expression.Property (Expression.Constant (new MemberClass()), mi);
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#07");
+			Assert.AreEqual (typeof (int), expr.Type, "Property#08");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "Property#09");
+			Assert.AreEqual (MemberClass.GetRoPropertyInfo(), expr.Member, "Property#10");
+		}
 
-        [Test]
-        public void InstanceProperty3 ()
-        {
-            MethodInfo mi = typeof(MemberClass).GetMethod("get_TestProperty1");
-            
-            MemberExpression expr = Expression.Property (Expression.Constant (new MemberClass()), mi);
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#07");
-            Assert.AreEqual (typeof (int), expr.Type, "Property#08");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "Property#09");
-            Assert.AreEqual (MemberClass.GetRoPropertyInfo(), expr.Member, "Property#10");
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void StaticProperty1 ()
+		{
+			// This will fail because access to a static field should be created using a PropertyInfo and
+			// not an instance plus the field name.
+			Expression.Property (Expression.Constant (new MemberClass()), "StaticProperty");
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void StaticProperty1 ()
-        {
-            // This will fail because access to a static field should be created using a PropertyInfo and
-            // not an instance plus the field name.
-            Expression.Property (Expression.Constant (new MemberClass()), "StaticProperty");
-        }
+		[Test]
+		public void StaticProperty2 ()
+		{
+			MemberExpression expr = Expression.Property (null, MemberClass.GetStaticPropertyInfo());
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#11");
+			Assert.AreEqual (typeof (int), expr.Type, "Property#12");
+			Assert.AreEqual ("MemberClass.StaticProperty", expr.ToString(), "Property#13");
+		}
 
-        [Test]
-        public void StaticProperty2 ()
-        {
-            MemberExpression expr = Expression.Property (null, MemberClass.GetStaticPropertyInfo());
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#11");
-            Assert.AreEqual (typeof (int), expr.Type, "Property#12");
-            Assert.AreEqual ("MemberClass.StaticProperty", expr.ToString(), "Property#13");
-        }
+		[Test]
+		public void StaticProperty3 ()
+		{
+			MethodInfo mi = typeof(MemberClass).GetMethod("get_StaticProperty");
 
-        [Test]
-        public void StaticProperty3 ()
-        {
-            MethodInfo mi = typeof(MemberClass).GetMethod("get_StaticProperty");
-            
-            MemberExpression expr = Expression.Property (null, mi);
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#14");
-            Assert.AreEqual (typeof (int), expr.Type, "Property#15");
-            Assert.AreEqual ("MemberClass.StaticProperty", expr.ToString(), "Property#16");
-            Assert.AreEqual (MemberClass.GetStaticPropertyInfo(), expr.Member, "Property#17");
-        }
-    }
+			MemberExpression expr = Expression.Property (null, mi);
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "Property#14");
+			Assert.AreEqual (typeof (int), expr.Type, "Property#15");
+			Assert.AreEqual ("MemberClass.StaticProperty", expr.ToString(), "Property#16");
+			Assert.AreEqual (MemberClass.GetStaticPropertyInfo(), expr.Member, "Property#17");
+		}
+	}
 }

+ 34 - 34
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_PropertyOrField.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,38 +26,38 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_PropertyOrField
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.PropertyOrField (null, "NoPropertyOrField");
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_PropertyOrField
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.PropertyOrField (null, "NoPropertyOrField");
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.PropertyOrField (Expression.Constant (new MemberClass()), null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.PropertyOrField (Expression.Constant (new MemberClass()), null);
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentException))]
-        public void NoPropertyOrField ()
-        {
-            Expression.PropertyOrField (Expression.Constant (new MemberClass()), "NoPropertyOrField");
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentException))]
+		public void NoPropertyOrField ()
+		{
+			Expression.PropertyOrField (Expression.Constant (new MemberClass()), "NoPropertyOrField");
+		}
 
-        [Test]
-        public void InstanceProperty ()
-        {
-            MemberExpression expr = Expression.PropertyOrField (Expression.Constant (new MemberClass()), "TestProperty1");
-            Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "PropertyOrField#01");
-            Assert.AreEqual (typeof (int), expr.Type, "PropertyOrField#02");
-            Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "PropertyOrField#04");
-        }
-    }
+		[Test]
+		public void InstanceProperty ()
+		{
+			MemberExpression expr = Expression.PropertyOrField (Expression.Constant (new MemberClass()), "TestProperty1");
+			Assert.AreEqual (ExpressionType.MemberAccess, expr.NodeType, "PropertyOrField#01");
+			Assert.AreEqual (typeof (int), expr.Type, "PropertyOrField#02");
+			Assert.AreEqual ("value(MonoTests.System.Linq.Expressions.MemberClass).TestProperty1", expr.ToString(), "PropertyOrField#04");
+		}
+	}
 }

+ 22 - 22
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Quote.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,24 +26,24 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Quote
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Quote (null);
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Quote
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Quote (null);
+		}
 
-        [Test]
-        public void Constant ()
-        {
-            UnaryExpression expr = Expression.Quote (Expression.Constant (1));
-            Assert.AreEqual (ExpressionType.Quote, expr.NodeType, "Quote#01");
-            Assert.AreEqual (typeof (ConstantExpression), expr.Type, "Quote#02");
-            Assert.AreEqual ("1", expr.ToString(), "Quote#03");
-        }
-    }
+		[Test]
+		public void Constant ()
+		{
+			UnaryExpression expr = Expression.Quote (Expression.Constant (1));
+			Assert.AreEqual (ExpressionType.Quote, expr.NodeType, "Quote#01");
+			Assert.AreEqual (typeof (ConstantExpression), expr.Type, "Quote#02");
+			Assert.AreEqual ("1", expr.ToString(), "Quote#03");
+		}
+	}
 }

+ 80 - 80
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_RightShift.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,89 +26,89 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_RightShift
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.RightShift (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_RightShift
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.RightShift (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.RightShift (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Arg2WrongType ()
+		{
+			Expression.RightShift (Expression.Constant (1), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.RightShift (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.RightShift (Expression.Constant (new NoOpClass ()), Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Arg2WrongType ()
-        {
-            Expression.RightShift (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.RightShift (Expression.Constant (true), Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.RightShift (Expression.Constant (new NoOpClass ()), Expression.Constant (1));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Double ()
+		{
+			Expression.RightShift (Expression.Constant (2.0), Expression.Constant (1));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.RightShift (Expression.Constant (true), Expression.Constant (1));
-        }
+		[Test]
+		public void Integer ()
+		{
+			BinaryExpression expr = Expression.RightShift (Expression.Constant (2), Expression.Constant (1));
+			Assert.AreEqual (ExpressionType.RightShift, expr.NodeType, "RightShift#01");
+			Assert.AreEqual (typeof (int), expr.Type, "RightShift#02");
+			Assert.IsNull (expr.Method, "RightShift#03");
+			Assert.AreEqual ("(2 >> 1)", expr.ToString(), "RightShift#04");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Double ()
-        {
-            Expression.RightShift (Expression.Constant (2.0), Expression.Constant (1));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        public void Integer ()
-        {
-            BinaryExpression expr = Expression.RightShift (Expression.Constant (2), Expression.Constant (1));
-            Assert.AreEqual (ExpressionType.RightShift, expr.NodeType, "RightShift#01");
-            Assert.AreEqual (typeof (int), expr.Type, "RightShift#02");
-            Assert.IsNull (expr.Method, "RightShift#03");
-            Assert.AreEqual ("(2 >> 1)", expr.ToString(), "RightShift#04");
-        }
+			BinaryExpression expr = Expression.RightShift (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.RightShift, expr.NodeType, "RightShift#05");
+			Assert.AreEqual (typeof (int), expr.Type, "RightShift#06");
+			Assert.IsNull (expr.Method, "RightShift#07");
+			Assert.AreEqual ("(1 >> 2)", expr.ToString(), "RightShift#08");
+		}
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.RightShift (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.RightShift, expr.NodeType, "RightShift#05");
-            Assert.AreEqual (typeof (int), expr.Type, "RightShift#06");
-            Assert.IsNull (expr.Method, "RightShift#07");
-            Assert.AreEqual ("(1 >> 2)", expr.ToString(), "RightShift#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_RightShift");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_RightShift");
-            
-            BinaryExpression expr = Expression.RightShift (Expression.Constant (new OpClass ()), Expression.Constant (1));
-            Assert.AreEqual (ExpressionType.RightShift, expr.NodeType, "RightShift#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "RightShift#10");
-            Assert.AreEqual (mi, expr.Method, "RightShift#11");
-            Assert.AreEqual ("op_RightShift", expr.Method.Name, "RightShift#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) >> 1)",
-                expr.ToString(), "RightShift#13");
-        }
-    }
+			BinaryExpression expr = Expression.RightShift (Expression.Constant (new OpClass ()), Expression.Constant (1));
+			Assert.AreEqual (ExpressionType.RightShift, expr.NodeType, "RightShift#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "RightShift#10");
+			Assert.AreEqual (mi, expr.Method, "RightShift#11");
+			Assert.AreEqual ("op_RightShift", expr.Method.Name, "RightShift#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) >> 1)",
+				expr.ToString(), "RightShift#13");
+		}
+	}
 }

+ 73 - 73
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Subtract.cs

@@ -5,7 +5,7 @@
 // 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.
 // Ad
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,82 +26,82 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_Subtract
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.Subtract (null, Expression.Constant (1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_Subtract
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.Subtract (null, Expression.Constant (1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.Subtract (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.Subtract (Expression.Constant (1), Expression.Constant (2.0));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.Subtract (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.Subtract (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.Subtract (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.Subtract (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.Subtract (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.Subtract (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.Subtract, expr.NodeType, "Subtract#01");
+			Assert.AreEqual (typeof (int), expr.Type, "Subtract#02");
+			Assert.IsNull (expr.Method, "Subtract#03");
+			Assert.AreEqual ("(1 - 2)", expr.ToString(), "Subtract#04");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.Subtract (Expression.Constant (true), Expression.Constant (false));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.Subtract (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.Subtract, expr.NodeType, "Subtract#01");
-            Assert.AreEqual (typeof (int), expr.Type, "Subtract#02");
-            Assert.IsNull (expr.Method, "Subtract#03");
-            Assert.AreEqual ("(1 - 2)", expr.ToString(), "Subtract#04");
-        }
+			BinaryExpression expr = Expression.Subtract (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.Subtract, expr.NodeType, "Subtract#05");
+			Assert.AreEqual (typeof (int), expr.Type, "Subtract#06");
+			Assert.IsNull (expr.Method, "Subtract#07");
+			Assert.AreEqual ("(1 - 2)", expr.ToString(), "Subtract#08");
+		}
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.Subtract (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.Subtract, expr.NodeType, "Subtract#05");
-            Assert.AreEqual (typeof (int), expr.Type, "Subtract#06");
-            Assert.IsNull (expr.Method, "Subtract#07");
-            Assert.AreEqual ("(1 - 2)", expr.ToString(), "Subtract#08");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Subtraction");
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Subtraction");
-            
-            BinaryExpression expr = Expression.Subtract (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.Subtract, expr.NodeType, "Subtract#09");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "Subtract#10");
-            Assert.AreEqual (mi, expr.Method, "Subtract#11");
-            Assert.AreEqual ("op_Subtraction", expr.Method.Name, "Subtract#12");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) - value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "Subtract#13");
-        }
-    }
+			BinaryExpression expr = Expression.Subtract (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.Subtract, expr.NodeType, "Subtract#09");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "Subtract#10");
+			Assert.AreEqual (mi, expr.Method, "Subtract#11");
+			Assert.AreEqual ("op_Subtraction", expr.Method.Name, "Subtract#12");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) - value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "Subtract#13");
+		}
+	}
 }

+ 89 - 89
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_SubtractChecked.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,99 +26,99 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    [TestFixture]
-    public class ExpressionTest_SubtractChecked
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.SubtractChecked (null, Expression.Constant(1));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_SubtractChecked
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.SubtractChecked (null, Expression.Constant(1));
+		}
+
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.SubtractChecked (Expression.Constant (1), null);
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void ArgTypesDifferent ()
+		{
+			Expression.AndAlso (Expression.Constant (1), Expression.Constant (2.0));
+		}
+
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void NoOperatorClass ()
+		{
+			Expression.SubtractChecked (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.SubtractChecked (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (InvalidOperationException))]
+		public void Boolean ()
+		{
+			Expression.SubtractChecked (Expression.Constant (true), Expression.Constant (false));
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void ArgTypesDifferent ()
-        {
-            Expression.AndAlso (Expression.Constant (1), Expression.Constant (2.0));
-        }
+		[Test]
+		public void Numeric ()
+		{
+			BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (1), Expression.Constant (2));
+			Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#01");
+			Assert.AreEqual (typeof (int), expr.Type, "SubtractChecked#02");
+			Assert.IsNull (expr.Method, "SubtractChecked#03");
+			Assert.AreEqual ("(1 - 2)", expr.ToString(), "SubtractChecked#15");
+		}
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void NoOperatorClass ()
-        {
-            Expression.SubtractChecked (Expression.Constant (new NoOpClass ()), Expression.Constant (new NoOpClass ()));
-        }
+		[Test]
+		public void Nullable ()
+		{
+			int? a = 1;
+			int? b = 2;
 
-        [Test]
-        [ExpectedException (typeof (InvalidOperationException))]
-        public void Boolean ()
-        {
-            Expression.SubtractChecked (Expression.Constant (true), Expression.Constant (false));
-        }
+			BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (a), Expression.Constant (b));
+			Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#04");
+			Assert.AreEqual (typeof (int), expr.Type, "SubtractChecked#05");
+			Assert.IsNull (expr.Method, null, "SubtractChecked#06");
+			Assert.AreEqual ("(1 - 2)", expr.ToString(), "SubtractChecked#16");
+		}
 
-        [Test]
-        public void Numeric ()
-        {
-            BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (1), Expression.Constant (2));
-            Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#01");
-            Assert.AreEqual (typeof (int), expr.Type, "SubtractChecked#02");
-            Assert.IsNull (expr.Method, "SubtractChecked#03");
-            Assert.AreEqual ("(1 - 2)", expr.ToString(), "SubtractChecked#15");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpClass).GetMethod ("op_Subtraction");
 
-        [Test]
-        public void Nullable ()
-        {
-            int? a = 1;
-            int? b = 2;
-            
-            BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (a), Expression.Constant (b));
-            Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#04");
-            Assert.AreEqual (typeof (int), expr.Type, "SubtractChecked#05");
-            Assert.IsNull (expr.Method, null, "SubtractChecked#06");
-            Assert.AreEqual ("(1 - 2)", expr.ToString(), "SubtractChecked#16");
-        }
+			BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
+			Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#07");
+			Assert.AreEqual (typeof (OpClass), expr.Type, "SubtractChecked#08");
+			Assert.AreEqual (mi, expr.Method, "SubtractChecked#09");
+			Assert.AreEqual ("op_Subtraction", expr.Method.Name, "SubtractChecked#10");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) - value(MonoTests.System.Linq.Expressions.OpClass))",
+				expr.ToString(), "SubtractChecked#17");
+		}
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpClass).GetMethod ("op_Subtraction");
-            
-            BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (new OpClass ()), Expression.Constant (new OpClass ()));
-            Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#07");
-            Assert.AreEqual (typeof (OpClass), expr.Type, "SubtractChecked#08");
-            Assert.AreEqual (mi, expr.Method, "SubtractChecked#09");
-            Assert.AreEqual ("op_Subtraction", expr.Method.Name, "SubtractChecked#10");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) - value(MonoTests.System.Linq.Expressions.OpClass))",
-                expr.ToString(), "SubtractChecked#17");
-        }
+		[Test]
+		public void UserDefinedStruct ()
+		{
+			// We can use the simplest version of GetMethod because we already know only one
+			// exists in the very simple class we're using for the tests.
+			MethodInfo mi = typeof (OpStruct).GetMethod ("op_Subtraction");
 
-        [Test]
-        public void UserDefinedStruct ()
-        {
-            // We can use the simplest version of GetMethod because we already know only one
-            // exists in the very simple class we're using for the tests.
-            MethodInfo mi = typeof (OpStruct).GetMethod ("op_Subtraction");
-            
-            BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (new OpStruct ()), Expression.Constant (new OpStruct ()));
-            Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#11");
-            Assert.AreEqual (typeof (OpStruct), expr.Type, "SubtractChecked#12");
-            Assert.AreEqual (mi, expr.Method, "SubtractChecked#13");
-            Assert.AreEqual ("op_Subtraction", expr.Method.Name, "SubtractChecked#14");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpStruct) - value(MonoTests.System.Linq.Expressions.OpStruct))",
-                expr.ToString(), "SubtractChecked#18");
-        }
+			BinaryExpression expr = Expression.SubtractChecked (Expression.Constant (new OpStruct ()), Expression.Constant (new OpStruct ()));
+			Assert.AreEqual (ExpressionType.SubtractChecked, expr.NodeType, "SubtractChecked#11");
+			Assert.AreEqual (typeof (OpStruct), expr.Type, "SubtractChecked#12");
+			Assert.AreEqual (mi, expr.Method, "SubtractChecked#13");
+			Assert.AreEqual ("op_Subtraction", expr.Method.Name, "SubtractChecked#14");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpStruct) - value(MonoTests.System.Linq.Expressions.OpStruct))",
+				expr.ToString(), "SubtractChecked#18");
+		}
 
-    }
+	}
 }

+ 44 - 44
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_TypeIs.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,50 +26,50 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{        
-    [TestFixture]
-    public class ExpressionTest_TypeIs
-    {
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg1Null ()
-        {
-            Expression.TypeIs (null, typeof (int));
-        }
+{
+	[TestFixture]
+	public class ExpressionTest_TypeIs
+	{
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg1Null ()
+		{
+			Expression.TypeIs (null, typeof (int));
+		}
 
-        [Test]
-        [ExpectedException (typeof (ArgumentNullException))]
-        public void Arg2Null ()
-        {
-            Expression.TypeIs (Expression.Constant (1), null);
-        }
+		[Test]
+		[ExpectedException (typeof (ArgumentNullException))]
+		public void Arg2Null ()
+		{
+			Expression.TypeIs (Expression.Constant (1), null);
+		}
 
-        [Test]
-        public void Numeric ()
-        {
-            TypeBinaryExpression expr = Expression.TypeIs (Expression.Constant (1), typeof (int));
-            Assert.AreEqual (ExpressionType.TypeIs, expr.NodeType, "TypeIs#01");
-            Assert.AreEqual (typeof (bool), expr.Type, "TypeIs#02");
-            Assert.AreEqual ("(1 Is Int32)", expr.ToString(), "TypeIs#03");
-        }
+		[Test]
+		public void Numeric ()
+		{
+			TypeBinaryExpression expr = Expression.TypeIs (Expression.Constant (1), typeof (int));
+			Assert.AreEqual (ExpressionType.TypeIs, expr.NodeType, "TypeIs#01");
+			Assert.AreEqual (typeof (bool), expr.Type, "TypeIs#02");
+			Assert.AreEqual ("(1 Is Int32)", expr.ToString(), "TypeIs#03");
+		}
 
-        [Test]
-        public void String ()
-        {
-            TypeBinaryExpression expr = Expression.TypeIs (Expression.Constant (1), typeof (string));
-            Assert.AreEqual (ExpressionType.TypeIs, expr.NodeType, "TypeIs#04");
-            Assert.AreEqual (typeof (bool), expr.Type, "TypeIs#05");
-            Assert.AreEqual ("(1 Is String)", expr.ToString(), "TypeIs#06");
-        }
+		[Test]
+		public void String ()
+		{
+			TypeBinaryExpression expr = Expression.TypeIs (Expression.Constant (1), typeof (string));
+			Assert.AreEqual (ExpressionType.TypeIs, expr.NodeType, "TypeIs#04");
+			Assert.AreEqual (typeof (bool), expr.Type, "TypeIs#05");
+			Assert.AreEqual ("(1 Is String)", expr.ToString(), "TypeIs#06");
+		}
 
-        [Test]
-        public void UserDefinedClass ()
-        {
-            TypeBinaryExpression expr = Expression.TypeIs (Expression.Constant (new OpClass()), typeof (OpClass));
-            Assert.AreEqual (ExpressionType.TypeIs, expr.NodeType, "TypeIs#07");
-            Assert.AreEqual (typeof (bool), expr.Type, "TypeIs#08");
-            Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) Is OpClass)", expr.ToString(), "TypeIs#09");
-        }
+		[Test]
+		public void UserDefinedClass ()
+		{
+			TypeBinaryExpression expr = Expression.TypeIs (Expression.Constant (new OpClass()), typeof (OpClass));
+			Assert.AreEqual (ExpressionType.TypeIs, expr.NodeType, "TypeIs#07");
+			Assert.AreEqual (typeof (bool), expr.Type, "TypeIs#08");
+			Assert.AreEqual ("(value(MonoTests.System.Linq.Expressions.OpClass) Is OpClass)", expr.ToString(), "TypeIs#09");
+		}
 
-    }
+	}
 }

+ 153 - 153
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Utils.cs

@@ -5,10 +5,10 @@
 // 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
@@ -17,7 +17,7 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 //
 // Authors:
-//        Federico Di Gregorio <[email protected]>
+//		Federico Di Gregorio <[email protected]>
 
 using System;
 using System.Reflection;
@@ -26,154 +26,154 @@ using System.Linq.Expressions;
 using NUnit.Framework;
 
 namespace MonoTests.System.Linq.Expressions
-{    
-    public class OpClass
-    {
-        public static OpClass operator + (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator - (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator * (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator / (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator % (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator & (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator | (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator ^ (OpClass a, OpClass b)
-        {
-            return a;
-        }
-
-        public static OpClass operator >> (OpClass a, int b)
-        {
-            return a;
-        }
-
-        public static OpClass operator << (OpClass a, int b)
-        {
-            return a;
-        }
-        
-        public static bool operator true (OpClass a)
-        {
-            return false;
-        }
-
-        public static bool operator false (OpClass a)
-        {
-            return false;
-        }
-    }
-
-    public class NoOpClass
-    {
-        // No user-defined operators here (we use this class to test for exceptions.)
-    }
-    
-    public class MemberClass
-    {
-        public int TestField1 = 0;
-        public readonly int TestField2 = 1;
-        public int TestProperty1 { get { return TestField1; }}
-        public int TestProperty2 { get { return TestField1; } set { TestField1 = value; }}
-        public int TestMethod (int i) { return TestField1 + i; }
-        public T TestGenericMethod<T> (T arg) { return arg; }
-
-        public delegate int TestDelegate(int i);
-        public event TestDelegate TestEvent;
-        
-        public static int StaticField = 0;
-        public static int StaticProperty { get { return StaticField; } set { StaticField = value; }}
-        public static int StaticMethod (int i) { return 1 + i; }
-        public static T StaticGenericMethod<T> (T arg) { return arg; }
-        
-        public static MethodInfo GetMethodInfo ()
-        {
-            return typeof (MemberClass).GetMethod ("TestMethod");
-        }
-
-        public static FieldInfo GetRoFieldInfo ()
-        {
-            return typeof (MemberClass).GetField ("TestField1");
-        }
-
-        public static FieldInfo GetRwFieldInfo ()
-        {
-            return typeof (MemberClass).GetField ("TestField2");
-        }
-
-        public static PropertyInfo GetRoPropertyInfo ()
-        {
-            return typeof (MemberClass).GetProperty ("TestProperty1");
-        }
-
-        public static PropertyInfo GetRwPropertyInfo ()
-        {
-            return typeof (MemberClass).GetProperty ("TestProperty2");
-        }
-
-        public static EventInfo GetEventInfo ()
-        {
-            return typeof (MemberClass).GetEvent ("TestEvent");
-        }
-
-        public static FieldInfo GetStaticFieldInfo ()
-        {
-            return typeof (MemberClass).GetField ("StaticField");
-        }
-
-        public static PropertyInfo GetStaticPropertyInfo ()
-        {
-            return typeof (MemberClass).GetProperty ("StaticProperty");
-        }
-
-    }
-
-    public struct OpStruct
-    {
-        public static OpStruct operator + (OpStruct a, OpStruct b)
-        {
-            return a;
-        }
-
-        public static OpStruct operator - (OpStruct a, OpStruct b)
-        {
-            return a;
-        }
-
-        public static OpStruct operator * (OpStruct a, OpStruct b)
-        {
-            return a;
-        }
-
-        public static OpStruct operator & (OpStruct a, OpStruct b)
-        {
-            return a;
-        }
-    }
+{
+	public class OpClass
+	{
+		public static OpClass operator + (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator - (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator * (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator / (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator % (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator & (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator | (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator ^ (OpClass a, OpClass b)
+		{
+			return a;
+		}
+
+		public static OpClass operator >> (OpClass a, int b)
+		{
+			return a;
+		}
+
+		public static OpClass operator << (OpClass a, int b)
+		{
+			return a;
+		}
+
+		public static bool operator true (OpClass a)
+		{
+			return false;
+		}
+
+		public static bool operator false (OpClass a)
+		{
+			return false;
+		}
+	}
+
+	public class NoOpClass
+	{
+		// No user-defined operators here (we use this class to test for exceptions.)
+	}
+
+	public class MemberClass
+	{
+		public int TestField1 = 0;
+		public readonly int TestField2 = 1;
+		public int TestProperty1 { get { return TestField1; }}
+		public int TestProperty2 { get { return TestField1; } set { TestField1 = value; }}
+		public int TestMethod (int i) { return TestField1 + i; }
+		public T TestGenericMethod<T> (T arg) { return arg; }
+
+		public delegate int TestDelegate(int i);
+		public event TestDelegate TestEvent;
+
+		public static int StaticField = 0;
+		public static int StaticProperty { get { return StaticField; } set { StaticField = value; }}
+		public static int StaticMethod (int i) { return 1 + i; }
+		public static T StaticGenericMethod<T> (T arg) { return arg; }
+
+		public static MethodInfo GetMethodInfo ()
+		{
+			return typeof (MemberClass).GetMethod ("TestMethod");
+		}
+
+		public static FieldInfo GetRoFieldInfo ()
+		{
+			return typeof (MemberClass).GetField ("TestField1");
+		}
+
+		public static FieldInfo GetRwFieldInfo ()
+		{
+			return typeof (MemberClass).GetField ("TestField2");
+		}
+
+		public static PropertyInfo GetRoPropertyInfo ()
+		{
+			return typeof (MemberClass).GetProperty ("TestProperty1");
+		}
+
+		public static PropertyInfo GetRwPropertyInfo ()
+		{
+			return typeof (MemberClass).GetProperty ("TestProperty2");
+		}
+
+		public static EventInfo GetEventInfo ()
+		{
+			return typeof (MemberClass).GetEvent ("TestEvent");
+		}
+
+		public static FieldInfo GetStaticFieldInfo ()
+		{
+			return typeof (MemberClass).GetField ("StaticField");
+		}
+
+		public static PropertyInfo GetStaticPropertyInfo ()
+		{
+			return typeof (MemberClass).GetProperty ("StaticProperty");
+		}
+
+	}
+
+	public struct OpStruct
+	{
+		public static OpStruct operator + (OpStruct a, OpStruct b)
+		{
+			return a;
+		}
+
+		public static OpStruct operator - (OpStruct a, OpStruct b)
+		{
+			return a;
+		}
+
+		public static OpStruct operator * (OpStruct a, OpStruct b)
+		{
+			return a;
+		}
+
+		public static OpStruct operator & (OpStruct a, OpStruct b)
+		{
+			return a;
+		}
+	}
 }