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-25 23:51:59 +0400
committerMarek Safar <marek.safar@gmail.com>2008-04-25 23:51:59 +0400
commit5f98040c549d94da887d206675a218932d7e5b81 (patch)
tree6b8aaff164342d5f0046cda1fde64f60ab80397f /mcs/tests/gtest-389.cs
parent3c644ca17e6797bd8821f7d4a2cb24de1f863d2c (diff)
New tests, updated buggy test-99.cs
svn path=/trunk/mcs/; revision=101873
Diffstat (limited to 'mcs/tests/gtest-389.cs')
-rw-r--r--mcs/tests/gtest-389.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/mcs/tests/gtest-389.cs b/mcs/tests/gtest-389.cs
new file mode 100644
index 00000000000..7515bb74cef
--- /dev/null
+++ b/mcs/tests/gtest-389.cs
@@ -0,0 +1,36 @@
+using System;
+
+enum MyEnum : byte
+{
+ A = 1,
+ B = 2,
+ Z = 255
+}
+
+class C
+{
+ public static int Main ()
+ {
+ MyEnum? e = MyEnum.A;
+ byte? b = 255;
+ MyEnum? res = e + b;
+ if (res != 0)
+ return 1;
+
+ e = null;
+ b = 255;
+ res = e + b;
+ if (res != null)
+ return 2;
+
+ MyEnum e2 = MyEnum.A;
+ byte b2 = 1;
+ MyEnum res2 = e2 + b2;
+ if (res2 != MyEnum.B)
+ return 3;
+
+ Console.WriteLine ("OK");
+ return 0;
+ }
+}
+