Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -80,13 +80,11 @@ namespace MonoTests.Microsoft.CSharp
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.StaticConstructors), "#20");
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.TryCatchStatements), "#21");
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.Win32Resources), "#22");
#if NET_2_0
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.DeclareIndexerProperties), "#23");
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.GenericTypeDeclaration), "#24");
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.GenericTypeReference), "#25");
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.PartialTypes), "#26");
Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.Resources), "#27");
#endif
}
[Test]
@ -106,9 +104,7 @@ namespace MonoTests.Microsoft.CSharp
options.GenerateExecutable = false;
options.GenerateInMemory = true;
options.TempFiles = new TempFileCollection (_tempDir);
#if NET_2_0
options.EmbeddedResources.Add (sourceFile);
#endif
ICodeCompiler compiler = _codeProvider.CreateCompiler ();
CompilerResults results = compiler.CompileAssemblyFromFile (options,
@ -129,7 +125,6 @@ namespace MonoTests.Microsoft.CSharp
Assert.AreEqual (1, tempFiles.Length, "#5");
Assert.AreEqual (sourceFile, tempFiles[0], "#6");
#if NET_2_0
string[] resources = compiledAssembly.GetManifestResourceNames();
Assert.IsNotNull (resources, "#7");
Assert.AreEqual (1, resources.Length, "#8");
@ -141,7 +136,6 @@ namespace MonoTests.Microsoft.CSharp
Assert.IsNull (info.FileName, "#13");
Assert.IsNull (info.ReferencedAssembly, "#14");
Assert.AreEqual ((ResourceLocation.Embedded | ResourceLocation.ContainedInManifestFile), info.ResourceLocation, "#15");
#endif
}
[Test]
@ -171,10 +165,8 @@ namespace MonoTests.Microsoft.CSharp
options.GenerateInMemory = true;
options.OutputAssembly = string.Empty;
options.TempFiles = new TempFileCollection (_tempDir);
#if NET_2_0
options.EmbeddedResources.Add (sourceFile1);
options.LinkedResources.Add (sourceFile2);
#endif
ICodeCompiler compiler = _codeProvider.CreateCompiler ();
CompilerResults results = compiler.CompileAssemblyFromFileBatch (options,
@ -202,7 +194,6 @@ namespace MonoTests.Microsoft.CSharp
Assert.IsTrue (File.Exists (sourceFile1), "#C2");
Assert.IsTrue (File.Exists (sourceFile2), "#C3");
#if NET_2_0
string[] resources = compiledAssembly.GetManifestResourceNames();
Assert.IsNotNull (resources, "#D1");
Assert.AreEqual (2, resources.Length, "#D2");
@ -233,7 +224,6 @@ namespace MonoTests.Microsoft.CSharp
Assert.AreEqual ("file2.cs", info.FileName, "#F6");
Assert.IsNull (info.ReferencedAssembly, "#F7");
Assert.AreEqual ((ResourceLocation) 0, info.ResourceLocation, "#F8");
#endif
}
[Test]
@ -262,10 +252,8 @@ namespace MonoTests.Microsoft.CSharp
options.GenerateExecutable = false;
options.GenerateInMemory = true;
options.TempFiles = new TempFileCollection (_tempDir);
#if NET_2_0
options.EmbeddedResources.Add (sourceFile1);
options.LinkedResources.Add (sourceFile2);
#endif
ICodeCompiler compiler = _codeProvider.CreateCompiler ();
CompilerResults results = compiler.CompileAssemblyFromFileBatch (options,
@ -293,7 +281,6 @@ namespace MonoTests.Microsoft.CSharp
Assert.IsTrue (File.Exists (sourceFile1), "#C2");
Assert.IsTrue (File.Exists (sourceFile2), "#C3");
#if NET_2_0
string[] resources = compiledAssembly.GetManifestResourceNames();
Assert.IsNotNull (resources, "#D1");
Assert.AreEqual (2, resources.Length, "#D2");
@ -324,7 +311,6 @@ namespace MonoTests.Microsoft.CSharp
Assert.AreEqual ("file2.cs", info.FileName, "#F6");
Assert.IsNull (info.ReferencedAssembly, "#F7");
Assert.AreEqual ((ResourceLocation) 0, info.ResourceLocation, "#F8");
#endif
}
[Test]