diff options
author | Miguel de Icaza <miguel@gnome.org> | 2002-05-18 00:25:15 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2002-05-18 00:25:15 +0400 |
commit | cfc4b4b32a89c078cd03a343ba576c35b51fd7d7 (patch) | |
tree | 041fc2bc54372592f96d4ba569e77be25a7d20f1 | |
parent | 3cd86625e7059cfea0f4ca7505b33a53131d53e2 (diff) |
Add more tests
svn path=/trunk/mcs/; revision=4725
-rwxr-xr-x | mcs/errors/cs0019-5.cs | 16 | ||||
-rwxr-xr-x | mcs/errors/cs0193.cs | 13 | ||||
-rwxr-xr-x | mcs/errors/cs0214-2.cs | 7 | ||||
-rwxr-xr-x | mcs/errors/cs0214-3.cs | 12 |
4 files changed, 48 insertions, 0 deletions
diff --git a/mcs/errors/cs0019-5.cs b/mcs/errors/cs0019-5.cs new file mode 100755 index 00000000000..6b8da99ef80 --- /dev/null +++ b/mcs/errors/cs0019-5.cs @@ -0,0 +1,16 @@ +class X { +} + +class Y { +} + +class T { + static void Main () + { + X x = new X (); + Y y = new Y (); + + if (x == y){ + } + } +} diff --git a/mcs/errors/cs0193.cs b/mcs/errors/cs0193.cs new file mode 100755 index 00000000000..2d412139eef --- /dev/null +++ b/mcs/errors/cs0193.cs @@ -0,0 +1,13 @@ +// cs0193.cs: * or -> operator can only be applied to pointer types. +// Line: 8 + +unsafe class X { + static void Main () + { + int a; + if (*a == 0) + return 1; + + return 0; + } +} diff --git a/mcs/errors/cs0214-2.cs b/mcs/errors/cs0214-2.cs new file mode 100755 index 00000000000..364a9b5a9a1 --- /dev/null +++ b/mcs/errors/cs0214-2.cs @@ -0,0 +1,7 @@ +class X { + static void Main () + { + int b; + int a = (int *) b; + } +} diff --git a/mcs/errors/cs0214-3.cs b/mcs/errors/cs0214-3.cs new file mode 100755 index 00000000000..e40bbfb7247 --- /dev/null +++ b/mcs/errors/cs0214-3.cs @@ -0,0 +1,12 @@ +struct X { + static unsafe void *a () + { + return null; + } + + static void Main () + { + a (); + } + +} |