Added:
trunk/mcs/tests/test-523.cs
trunk/mcs/tests/test-525.cs
trunk/mcs/tests/test-574.cs
trunk/mcs/tests/test-592.cs
trunk/mcs/tests/test-608.cs
trunk/mcs/tests/test-618.cs
trunk/mcs/tests/test-619.cs
Removed:
trunk/mcs/tests/verify-1.cs
trunk/mcs/tests/verify-2.cs
trunk/mcs/tests/verify-3.cs
trunk/mcs/tests/verify-4.cs
trunk/mcs/tests/verify-5.cs
trunk/mcs/tests/verify-6.cs
trunk/mcs/tests/verify-7.cs
trunk/mcs/tests/verify-8.cs
Modified:
trunk/mcs/tests/gtest-etree-01.cs
Log:
New tests, renamed verify-*.cs
Modified: trunk/mcs/tests/gtest-etree-01.cs
===================================================================
--- trunk/mcs/tests/gtest-etree-01.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/gtest-etree-01.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -697,15 +697,16 @@
void RightShiftTest ()
{
- Expression<Func<ulong, sbyte, ulong>> e = (ulong a, sbyte b) => a >> b;
+ Expression<Func<ulong, short, ulong>> e = (ulong a, short b) => a >> b;
AssertNodeType (e, ExpressionType.RightShift);
Assert ((ulong)0x1FD940L, e.Compile ().Invoke (0xFECA0000, 11));
+ Assert ((ulong)0, e.Compile ().Invoke (0xFFFFFFFF, 0xA01));
Expression<Func<MyType, MyType, int>> e2 = (MyType a, MyType b) => a >> b;
AssertNodeType (e2, ExpressionType.RightShift);
var c2 = e2.Compile ();
Assert (64, c2 (new MyType (256), new MyType (2)));
-/*
+
Expression<Func<long?, sbyte, long?>> e3 = (long? a, sbyte b) => a >> b;
AssertNodeType (e3, ExpressionType.RightShift);
Assert (null, e3.Compile ().Invoke (null, 11));
@@ -717,7 +718,6 @@
Assert (null, c4 (new MyType (8), null));
Assert (null, c4 (null, new MyType (8)));
Assert (64, c4 (new MyType (256), new MyType (2)));
-*/
}
//
Copied: trunk/mcs/tests/test-523.cs (from rev 98577, trunk/mcs/tests/verify-1.cs)
Copied: trunk/mcs/tests/test-525.cs (from rev 98577, trunk/mcs/tests/verify-2.cs)
Copied: trunk/mcs/tests/test-574.cs (from rev 98577, trunk/mcs/tests/verify-4.cs)
===================================================================
--- trunk/mcs/tests/verify-4.cs 2008-03-19 09:42:34 UTC (rev 98577)
+++ trunk/mcs/tests/test-574.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -0,0 +1,25 @@
+using System;
+using System.Threading;
+
+enum A {
+ Hello,
+ Bye
+}
+
+class X {
+
+ static int Main () {
+ try {
+ switch (0) {
+ default:
+ throw new Exception("FOO");
+ break;
+ }
+ } catch (Exception) {
+ return 0;
+ }
+
+ return 1;
+ }
+}
+
Copied: trunk/mcs/tests/test-592.cs (from rev 98577, trunk/mcs/tests/verify-5.cs)
Copied: trunk/mcs/tests/test-608.cs (from rev 98577, trunk/mcs/tests/verify-6.cs)
Added: trunk/mcs/tests/test-618.cs
===================================================================
--- trunk/mcs/tests/test-618.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/test-618.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -0,0 +1,23 @@
+using System;
+
+class C
+{
+ //
+ // All the operations should be reduced
+ //
+ public void ZeroBasedReductions ()
+ {
+ int a = 1;
+
+ a = a + 0;
+ a = a - 0;
+
+ a = a >> 0x40;
+ }
+
+ public static void Main ()
+ {
+ }
+}
+
+
Property changes on: trunk/mcs/tests/test-618.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Copied: trunk/mcs/tests/test-619.cs (from rev 98577, trunk/mcs/tests/verify-8.cs)
Deleted: trunk/mcs/tests/verify-1.cs
===================================================================
--- trunk/mcs/tests/verify-1.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-1.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,47 +0,0 @@
-using System;
-class T {
- int stuff () {
- try {
- throw new Exception ();
- } finally {
- stuff_finally ();
- }
- }
- int stuff2 () {
- try {
- throw new Exception ();
- } catch {
- try {
- throw new Exception ();
- } finally {
- stuff_finally ();
- }
- } finally {
- stuff_finally ();
- }
- }
- int stuff3 () {
- try {
- throw new Exception ();
- } catch {
- try {
- throw new Exception ();
- } finally {
- stuff_finally ();
- }
- } finally {
- stuff_finally ();
- }
- }
- void stuff4 () {
- try {
- throw new Exception();
- } catch {
- throw;
- }
- }
- void stuff_finally () {
- }
- static void Main() {
- }
-}
Deleted: trunk/mcs/tests/verify-2.cs
===================================================================
--- trunk/mcs/tests/verify-2.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-2.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,41 +0,0 @@
-using System;
-
-class X {
- ~X ()
- {
- Console.WriteLine ("DESTRUCTOR!");
- }
-
- public static int Test1()
- {
- try {
- return 8;
- } catch (Exception) {}
- System.Console.WriteLine("Shouldn't get here");
- return 9;
- }
-
- public static void Test2()
- {
- int[] vars = { 3, 4, 5 };
-
- foreach (int a in vars) {
- try {
- continue;
- } catch (Exception) {
- break;
- }
- }
- }
-
- public static void Main() {
- Test1 ();
- Test2 ();
-
- try {
- return;
- } catch (Exception) {}
- System.Console.WriteLine("Shouldn't get here");
- return;
- }
-}
Deleted: trunk/mcs/tests/verify-3.cs
===================================================================
--- trunk/mcs/tests/verify-3.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-3.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,12 +0,0 @@
-using System;
-
-public delegate void MyEventHandler (int a);
-
-public class X
-{
- public static event MyEventHandler TestEvent;
-
- public static void Main ()
- {
- }
-}
Deleted: trunk/mcs/tests/verify-4.cs
===================================================================
--- trunk/mcs/tests/verify-4.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-4.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,19 +0,0 @@
-using System;
-using System.Threading;
-
-enum A {
- Hello,
- Bye
-}
-
-class X {
-
- static void Main () {
- switch (0) {
- default:
- throw new Exception("FOO");
- break;
- }
- }
-}
-
Deleted: trunk/mcs/tests/verify-5.cs
===================================================================
--- trunk/mcs/tests/verify-5.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-5.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,65 +0,0 @@
-class T {
- static int fib (int n) {
- int f0 = 0, f1 = 1, f2 = 0, i;
-
- if (n <= 1) goto L3;
- i = 2;
- L1:
- if (i <= n) goto L2;
- return f2;
- L2:
- f2 = f0 + f1;
- f0 = f1;
- f1 = f2;
- i++;
- goto L1;
- L3:
- return n;
- }
-
- static int xx (int n) {
- if (n <= 1) goto L3;
- L1:
- if (1 <= n) goto L2;
- return n;
- L2:
- goto L1;
- L3:
- return n;
- }
-
- // This is from System.Text.RegularExpressions.Syntax.Parser::ParseGroup.
- void foo (int a)
- {
- bool b = false;
-
- while (true) {
- switch (a) {
- case 3:
- break;
- }
-
- if (b)
- goto EndOfGroup;
- }
-
- EndOfGroup:
- ;
- }
-
- // Another case of goto that we did not handle properly
- static void XXXA () {
- goto each_logic_expr;
-
- int j;
- bool x = true;
- try {
- }
- catch {}
- int dd;
- each_logic_expr:
- ;
- }
-
- static void Main() {}
-}
Deleted: trunk/mcs/tests/verify-6.cs
===================================================================
--- trunk/mcs/tests/verify-6.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-6.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,28 +0,0 @@
-using System;
-
-class X
-{
- enum Foo {
- A, B
- }
-
- enum Bar {
- C, D
- }
-
- public static void Main ()
- {
- Foo foo = Foo.A;
- Enum se = (Enum) foo;
- Enum sc = (Enum) Foo.A;
- object obj1 = (object) foo;
- object obj2 = (object) Foo.A;
-
- Bar bar = (Bar) se;
- Foo blah = (Foo) obj1;
-
- Enum Ea = Foo.A;
-
- IConvertible iconv = Ea;
- }
-}
Deleted: trunk/mcs/tests/verify-7.cs
===================================================================
--- trunk/mcs/tests/verify-7.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-7.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,27 +0,0 @@
-using System;
-
-public class TestClass : IDisposable
-{
- public static void Main()
- {
- TestClass test = new TestClass();
- test.MyMethod();
- }
-
- public void Dispose()
- {
-
- }
-
- public void MyMethod()
- {
- byte[] buffer = new byte[1500];
-
- using(TestClass test = new TestClass())
- {
- while(true)
- {
- }
- }
- }
-}
Deleted: trunk/mcs/tests/verify-8.cs
===================================================================
--- trunk/mcs/tests/verify-8.cs 2008-03-19 10:37:02 UTC (rev 98580)
+++ trunk/mcs/tests/verify-8.cs 2008-03-19 10:40:04 UTC (rev 98581)
@@ -1,12 +0,0 @@
-class X
-{
- static void Main ()
- {
- while (true) {
- if (true)
- break;
-
- continue;
- }
- }
-}