bug-29585.cs \
priority.cs \
abort-cctor.cs \
- reference-loader.cs \
namedmutex-destroy-race.cs
if INSTALL_MOBILE_STATIC
# but that need to be compiled
PREREQ_IL_SRC=event-il.il module-cctor.il
PREREQ_CS_SRC=
-PREREQ_IL_DLL_SRC=
-PREREQ_CS_DLL_SRC=TestingReferenceAssembly.cs TestingReferenceReferenceAssembly.cs
+PREREQ_IL_DLL_SRC=event-il.il module-cctor.il
+PREREQ_CS_DLL_SRC=
-PREREQSI_IL=$(PREREQ_IL_SRC:.il=.exe) \
- $(PREREQ_IL_DLL_SRC:.il=.dll)
-PREREQSI_CS=$(PREREQ_CS_SRC:.cs=.exe) \
- $(PREREQ_CS_DLL_SRC:.cs=.dll)
+PREREQSI_IL=$(PREREQ_IL_SRC:.il=.exe)
+PREREQSI_CS=$(PREREQ_CS_SRC:.cs=.exe)
TESTSI_CS=$(TEST_CS_SRC:.cs=.exe)
TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
TESTBS=$(BENCHSRC:.cs=.exe)
STRESS_TESTS=$(STRESS_TESTS_SRC:.cs=.exe)
-PREREQSI_IL_AOT=$(PREREQ_IL_SRC:.il=.exe$(PLATFORM_AOT_SUFFIX)) \
- $(PREREQ_IL_DLL_SRC:.il=.dll$(PLATFORM_AOT_SUFFIX))
-PREREQSI_CS_AOT=$(PREREQ_CS_SRC:.cs=.exe$(PLATFORM_AOT_SUFFIX)) \
- $(PREREQ_CS_DLL_SRC:.cs=.dll$(PLATFORM_AOT_SUFFIX))
+PREREQSI_IL_AOT=$(PREREQ_IL_SRC:.il=.exe$(PLATFORM_AOT_SUFFIX))
+PREREQSI_CS_AOT=$(PREREQ_CS_SRC:.cs=.exe$(PLATFORM_AOT_SUFFIX))
EXTRA_DIST=test-driver test-runner.cs $(TEST_CS_SRC_DIST) $(TEST_IL_SRC) \
$(BENCHSRC) $(STRESS_TESTS_SRC) stress-runner.pl $(PREREQ_IL_SRC) $(PREREQ_CS_SRC)
%.exe: %.cs $(TEST_DRIVER_DEPEND)
$(MCS) -r:System.dll -r:System.Xml.dll -r:System.Core.dll -r:TestDriver.dll $(TEST_DRIVER_HARD_KILL_FEATURE) -out:$@ $<
-%.dll: %.cs
- $(MCS) -r:System.dll -target:library -out:$@ $<
-
-TestingReferenceReferenceAssembly.dll: TestingReferenceReferenceAssembly.cs TestingReferenceAssembly.dll
- $(MCS) -r:TestingReferenceAssembly.dll -target:library -out:$@ $<
-
%.exe$(PLATFORM_AOT_SUFFIX): %.exe
$(RUNTIME) $(AOT_BUILD_FLAGS) $<
+++ /dev/null
-//
-// reference-loader.cs:
-//
-// Test for reference assembly loading
-
-using System;
-using System.IO;
-using System.Reflection;
-
-public class Tests {
- public static int Main (string[] args)
- {
- return TestDriver.RunTests (typeof (Tests), args);
- }
-
- public static int test_0_loadFrom_reference ()
- {
- // Check that loading a reference assembly by filename for execution is an error
- try {
- var a = Assembly.LoadFrom ("./TestingReferenceAssembly.dll");
- } catch (BadImageFormatException exn) {
- // Console.Error.WriteLine ("exn was {0}", exn);
- return 0;
- }
- return 1;
- }
-
- public static int test_0_load_reference ()
- {
- // Check that loading a reference assembly for execution is an error
- try {
- var an = new AssemblyName ("TestingReferenceAssembly");
- var a = Assembly.Load (an);
- } catch (BadImageFormatException exn) {
- //Console.Error.WriteLine ("exn was {0}", exn);
- return 0;
- } catch (FileNotFoundException exn) {
- Console.Error.WriteLine ("incorrect exn was {0}", exn);
- return 2;
- }
- return 1;
- }
-
- public static int test_0_reflection_load_reference ()
- {
- // Check that reflection-only loading a reference assembly is okay
- var an = new AssemblyName ("TestingReferenceAssembly");
- var a = Assembly.ReflectionOnlyLoad (an.FullName);
- var t = a.GetType ("X");
- var f = t.GetField ("Y");
- if (f.FieldType.Equals (typeof (Int32)))
- return 0;
- return 1;
- }
-
- public static int test_0_load_reference_asm_via_reference ()
- {
- // Check that loading an assembly that references a reference assembly doesn't succeed.
- var an = new AssemblyName ("TestingReferenceReferenceAssembly");
- try {
- var a = Assembly.Load (an);
- var t = a.GetType ("Z");
- } catch (FileNotFoundException){
- return 0;
- }
- return 1;
- }
-
- public static int test_0_reflection_load_reference_asm_via_reference ()
- {
- // Check that reflection-only loading an assembly that
- // references a reference assembly is okay.
- var an = new AssemblyName ("TestingReferenceReferenceAssembly");
- var a = Assembly.ReflectionOnlyLoad (an.FullName);
- var t = a.GetType ("Z");
- var f = t.GetField ("Y");
- if (f.FieldType.Equals (typeof (Int32)))
- return 0;
- return 1;
- }
-
-
- public static int test_0_load_reference_bytes ()
- {
- // Check that loading a reference assembly from a byte array for execution is an error
- byte[] bs = File.ReadAllBytes ("./TestingReferenceAssembly.dll");
- try {
- var a = Assembly.Load (bs);
- } catch (BadImageFormatException) {
- return 0;
- } catch (FileNotFoundException exn) {
- Console.Error.WriteLine ("incorrect exn was {0}", exn);
- return 2;
- }
- return 1;
- }
-
- public static int test_0_reflection_load_reference_bytes ()
- {
- // Check that loading a reference assembly from a byte
- // array for reflection only is okay.
- byte[] bs = File.ReadAllBytes ("./TestingReferenceAssembly.dll");
- var a = Assembly.ReflectionOnlyLoad (bs);
- var t = a.GetType ("X");
- var f = t.GetField ("Y");
- if (f.FieldType.Equals (typeof (Int32)))
- return 0;
- return 1;
- }
-
-}