From 8e2c0158473d1b82d3247296454a086642c05bb6 Mon Sep 17 00:00:00 2001 From: Marek Safar Date: Fri, 29 May 2009 19:44:21 +0000 Subject: [PATCH] New tests. svn path=/trunk/mcs/; revision=135080 --- mcs/tests/Makefile | 7 +- mcs/tests/gtest-variance-6.cs | 32 +++ mcs/tests/gtest-variance-7.cs | 26 +++ mcs/tests/known-issues-gmcs | 4 +- mcs/tests/ver-il-gmcs.xml | 356 ++++++++++++++++++++++++++++++++++ 5 files changed, 422 insertions(+), 3 deletions(-) create mode 100644 mcs/tests/gtest-variance-6.cs create mode 100644 mcs/tests/gtest-variance-7.cs diff --git a/mcs/tests/Makefile b/mcs/tests/Makefile index c8a74872436..37973b672f3 100644 --- a/mcs/tests/Makefile +++ b/mcs/tests/Makefile @@ -91,11 +91,16 @@ check: run-test run-test-local: $(TEST_ILS:.il=.dll) eval-test $(TESTER) -mode:pos -files:$(TEST_PATTERN) -compiler:$(COMPILER) -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log $(TOPTIONS) -# Temporary testing target +# Temporary testing targets cecil: rm -f *.mdb $(TESTER) -mode:pos -files:'test-*.cs' -compiler:gmcs.exe -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log -verbose +cecil2: + rm -f *.mdb + $(TESTER) -mode:pos -files:'*test-*.cs' -compiler:gmcs.exe -issues:known-issues-$(COMPILER_NAME) -log:$(COMPILER_NAME).log -verbose +# End + test-everything: $(MAKE) PROFILE=net_1_1 run-test $(MAKE) PROFILE=net_2_0 run-test diff --git a/mcs/tests/gtest-variance-6.cs b/mcs/tests/gtest-variance-6.cs new file mode 100644 index 00000000000..d153f00720c --- /dev/null +++ b/mcs/tests/gtest-variance-6.cs @@ -0,0 +1,32 @@ +// Compiler options: -langversion:future + +interface ICovariant { } +interface IContravariant { } + +delegate ICovariant Cov1 (IContravariant x); +delegate ICovariant Cov2 (IContravariant> x); +delegate ICovariant>> Cov3 (IContravariant>>> x); +delegate ICovariant Cov4 (); +delegate IContravariant Cov5 (); + +delegate IContravariant Contra5 (U u, ICovariant x); +delegate IContravariant Contra6 (); +delegate IContravariant Contra7 (U u, ICovariant x); +delegate IContravariant> Contra8 (U u, ICovariant x); + +interface ITest_1 +{ + ICovariant CovariantHandler (IContravariant x); +} + +interface ITest_2 +{ + IContravariant CovariantHandler (ICovariant x); +} + +class Program +{ + static void Main () + { + } +} diff --git a/mcs/tests/gtest-variance-7.cs b/mcs/tests/gtest-variance-7.cs new file mode 100644 index 00000000000..3c075bd2e69 --- /dev/null +++ b/mcs/tests/gtest-variance-7.cs @@ -0,0 +1,26 @@ +// Compiler options: -langversion:future + +delegate T Covariant (); +delegate void Contra (T t); +delegate TR CoContra (T t); +delegate void None (T t); + +delegate Covariant>>>>>>> Test (); +delegate Contra>>>>>>>> Test2 (); +delegate Contra>>>>>>> Test3 (); +delegate Contra>>>>>>> Test4 (); +delegate Contra>>>>>> Test5 (); +delegate void Test6 (Covariant>>>>>>> t); + +delegate void Both (CoContra p); +delegate void Both2 (CoContra> p); +delegate void Both3 (CoContra> p); +delegate void Both4 (Both b); +delegate void Both5 (Both b); + +class C +{ + public static void Main () + { + } +} \ No newline at end of file diff --git a/mcs/tests/known-issues-gmcs b/mcs/tests/known-issues-gmcs index 77dc3395876..0d3ad8cde1d 100644 --- a/mcs/tests/known-issues-gmcs +++ b/mcs/tests/known-issues-gmcs @@ -13,8 +13,8 @@ gtest-443.cs # see #487738. This is expected to fail until the generated IL is gtest-variance-1.cs IGNORE # Runtime support for variance is not yet in place gtest-variance-2.cs IGNORE -gtest-variance-3.cs IGNORE -gtest-variance-4.cs IGNORE +gtest-variance-3.cs +gtest-variance-4.cs gtest-variance-5.cs IGNORE test-704.cs IGNORE #472845 diff --git a/mcs/tests/ver-il-gmcs.xml b/mcs/tests/ver-il-gmcs.xml index c16f66a65a0..3be66cef590 100644 --- a/mcs/tests/ver-il-gmcs.xml +++ b/mcs/tests/ver-il-gmcs.xml @@ -19022,6 +19022,362 @@ + + + + 7 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + 7 + + + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + -- 2.25.1