4 // Tests for assembly loading
8 using System
.Reflection
;
9 using System
.Reflection
.Emit
;
13 public static int Main (string[] args
)
15 return TestDriver
.RunTests (typeof (Tests
), args
);
18 public static int test_0_load_partial_name ()
20 if (Assembly
.LoadWithPartialName ("mscorlib") == null)
26 public static int test_0_load_dynamic ()
28 // Check that dynamic assemblies are not loaded by Assembly.Load
29 AssemblyName an
= new AssemblyName();
30 an
.Name
= "NOT.EXISTS";
33 AppDomain
.CurrentDomain
.DefineDynamicAssembly(an
,
34 AssemblyBuilderAccess
.RunAndSave
);
36 ModuleBuilder mb
= ab
.DefineDynamicModule("NOT.EXISTS");
38 Assembly b
= Assembly
.LoadWithPartialName ("NOT.EXISTS");