diff options
author | Marek Safar <marek.safar@gmail.com> | 2007-11-20 15:50:58 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2007-11-20 15:50:58 +0300 |
commit | 8c1e0eda12c5e677f46d3aa10eefd717cefb304c (patch) | |
tree | 334133357fe19545f4aa74bb47b44aa4e0abd1e2 /mcs/tests/test-600.cs | |
parent | 9a4b0104b23ebe65e7b556be3cb4c454027e380e (diff) |
2007-11-20 Marek Safar <marek.safar@gmail.com>
A test for bug #342584
svn path=/trunk/mcs/; revision=89973
Diffstat (limited to 'mcs/tests/test-600.cs')
-rw-r--r-- | mcs/tests/test-600.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mcs/tests/test-600.cs b/mcs/tests/test-600.cs new file mode 100644 index 00000000000..608c588a4e0 --- /dev/null +++ b/mcs/tests/test-600.cs @@ -0,0 +1,35 @@ +using System; + +namespace Test +{ + enum Key_byte : byte { A = 1} + enum Key_ulong : ulong { A = 1} + + class Regression + { + public static int Main() + { + IntPtr a = new IntPtr (1); + UIntPtr b = new UIntPtr (1); + Key_byte k1 = (Key_byte)a; + Key_byte k2 = (Key_byte)b; + + if (k1 != Key_byte.A) + return 1; + + if (k2 != Key_byte.A) + return 2; + + Key_ulong k1_u = (Key_ulong)a; + Key_ulong k2_u = (Key_ulong)b; + + if (k1_u != Key_ulong.A) + return 1; + + if (k2_u != Key_ulong.A) + return 2; + + return 0; + } + } +} |