diff options
author | Martin Baulig <martin@novell.com> | 2002-06-09 19:14:34 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2002-06-09 19:14:34 +0400 |
commit | cca67ab78c340546ba23b24a1f6ef941896a563a (patch) | |
tree | f9a6a3a66b5fed9fac9fd1897c6b96c0d513a082 /mcs/tests/test-130.cs | |
parent | 6415ca79e7bea24a3e76400b5acfff7896b4f323 (diff) |
2002-06-09 Martin Baulig <martin@gnome.org>
* test-130.cs: New test for constants and casts.
svn path=/trunk/mcs/; revision=5188
Diffstat (limited to 'mcs/tests/test-130.cs')
-rwxr-xr-x | mcs/tests/test-130.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mcs/tests/test-130.cs b/mcs/tests/test-130.cs new file mode 100755 index 00000000000..be7b70df86c --- /dev/null +++ b/mcs/tests/test-130.cs @@ -0,0 +1,30 @@ +// +// Check casts. +// +using System; + +class X { + + public const short a = 128; + public const int b = 0xffff; + public const double c = 123.4; + + public const long d = 5; + // public const int e = 2147483648; + + public const byte f = 127; + + public const char c1 = (char) 0xffff; + public const char c2 = (char) 123.4; + public const char c3 = (char) a; + public const char c4 = (char) b; + public const char c5 = (char) c; + + public const short s1 = (short) b; + public const short s2 = (short) c; + + static int Main () + { + return 0; + } +} |