Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2008-04-29 14:01:58 +0400
committerMarek Safar <marek.safar@gmail.com>2008-04-29 14:01:58 +0400
commit0fd04277d3e80623c8168a21141b9cc836fa99f5 (patch)
treed3e0a2b2c39ecdd44572064d7ab29abe4be77ef1 /mcs/tests/test-640.cs
parent69fbecf121f04293a2b0bd151cc69d2d343b4c9a (diff)
New tests.
svn path=/trunk/mcs/; revision=102101
Diffstat (limited to 'mcs/tests/test-640.cs')
-rw-r--r--mcs/tests/test-640.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/mcs/tests/test-640.cs b/mcs/tests/test-640.cs
new file mode 100644
index 00000000000..705149a365c
--- /dev/null
+++ b/mcs/tests/test-640.cs
@@ -0,0 +1,34 @@
+enum MyEnum : byte
+{
+ Value_1 = 1
+}
+
+public class C
+{
+ public static int Main ()
+ {
+ MyEnum me = MyEnum.Value_1;
+ MyEnum b = ~me;
+
+ if (b != (MyEnum)254)
+ return 1;
+
+ byte r = b - me;
+ if (r != 253)
+ return 2;
+
+ b = b - 2;
+ if (b != (MyEnum)252)
+ return 3;
+
+ me -= MyEnum.Value_1;
+
+ b = (MyEnum)255;
+ b &= ~MyEnum.Value_1;
+ if (b != (MyEnum)254)
+ return 4;
+
+ System.Console.WriteLine ("OK");
+ return 0;
+ }
+}