Remove redundant assembly loader tests (#56505)
authorElinor Fung <elfung@microsoft.com>
Fri, 30 Jul 2021 13:52:29 +0000 (06:52 -0700)
committerGitHub <noreply@github.com>
Fri, 30 Jul 2021 13:52:29 +0000 (09:52 -0400)
14 files changed:
src/tests/Loader/binding/assemblies/assemblybugs/177066w/repro177066.cs [deleted file]
src/tests/Loader/binding/assemblies/assemblybugs/177066w/repro177066.csproj [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/properties.cs [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/properties.csproj [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server1.cs [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server1.csproj [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server2.cs [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server2.csproj [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server3.cs [deleted file]
src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server3.csproj [deleted file]
src/tests/Loader/multimodule/DontUseNetmodule.csproj [deleted file]
src/tests/Loader/multimodule/dontusenetmodule.cs [deleted file]
src/tests/Loader/versioning/coverage/AssemblyAttrs.csproj [deleted file]
src/tests/Loader/versioning/coverage/assemblyattrs.cs [deleted file]

diff --git a/src/tests/Loader/binding/assemblies/assemblybugs/177066w/repro177066.cs b/src/tests/Loader/binding/assemblies/assemblybugs/177066w/repro177066.cs
deleted file mode 100644 (file)
index 76dcac0..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Reflection;
-
-public class Repro
-{
-
-       public static int Main()
-       {
-               try
-               {
-                       AssemblyName an = new AssemblyName("system, processorArchitecture=somebadvalue");
-               }
-               catch(System.IO.FileLoadException e)
-               {
-                       if(e.ToString().ToUpper().IndexOf("UNKNOWN ERROR") == -1)
-                       {
-                               //we didn't get "Unknown error" in the exception text
-                               Console.WriteLine("Pass");
-                               return 100;
-                       } 
-                       else
-                       {
-                               Console.WriteLine("Wrong exception text: " + e.ToString());
-                               Console.WriteLine("FAIL");
-                               return 101;
-                       }
-               }
-               Console.WriteLine("Didn't catch FileLoadException. FAIL");
-               return 99;
-       }
-}
-       
diff --git a/src/tests/Loader/binding/assemblies/assemblybugs/177066w/repro177066.csproj b/src/tests/Loader/binding/assemblies/assemblybugs/177066w/repro177066.csproj
deleted file mode 100644 (file)
index 68c37a2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>BuildAndRun</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="repro177066.cs" />
-  </ItemGroup>
-</Project>
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/properties.cs b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/properties.cs
deleted file mode 100644 (file)
index 1ddb52e..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Reflection;
-using System.IO;
-using System.Globalization;
-
-public class AssemblyNameCtor_Basic
-{
-       
-       public static int Main()
-       {
-               bool bFail = false;
-               //int result = 0;
-               
-               try
-               {
-                       
-                       //Assembly assm1, assm2;
-
-                       AssemblyName asmName1 = new AssemblyName ();
-                       asmName1.Name = "server1";
-
-                       AssemblyName asmName2 = new AssemblyName("server1");
-
-
-                       Console.WriteLine (asmName1);
-                       Console.WriteLine (asmName2);
-                       if (asmName1==asmName2)
-                       {
-                               Console.WriteLine ("test will fail: asmName1==asmName2");
-                               bFail = true;
-                       }
-                       
-
-                       Console.WriteLine (asmName1.ToString());
-                       Console.WriteLine (asmName2.ToString());
-                       if (asmName1.ToString()!=asmName2.ToString())
-                       {
-                               Console.WriteLine ("test will fail: asmName1.ToString()!=asmName2.ToString()");
-                               bFail = true;
-                       }
-
-                       Console.WriteLine ("PublicKeyToken = " + asmName1.GetPublicKeyToken());
-                       Console.WriteLine ("PublicKeyToken = " + asmName2.GetPublicKeyToken());                 
-                       if (asmName1.GetPublicKeyToken()!=asmName2.GetPublicKeyToken())
-                       {
-                               Console.WriteLine ("test will fail: asmName1.ToString()!=asmName2.ToString()");
-                               bFail = true;
-                       }
-
-
-                       Console.WriteLine ("version = " + asmName1.Version);
-                       Console.WriteLine ("version = " + asmName2.Version);
-                       if (asmName1.Version!=asmName2.Version)
-                       {
-                               Console.WriteLine ("test will fail: asmName1.Version!=asmName2.Version");
-                               bFail = true;
-                       }
-/*
-                       if (asmName1.Version!="0.0.0.0")
-                       {
-                               Console.WriteLine ("test will fail: asmName1.Version.ToString()!=\"0.0.0.0\"");
-                               bFail = true;
-                       }
-*/
-               
-                               
-                       Console.WriteLine ("******");
-
-                       //Console.WriteLine (asmName2.GetPublicKeyToken().ToString());
-                       //Console.WriteLine (asmName2.GetPublicKeyToken());
-
-                       Console.WriteLine ("bFail = {0}", bFail);
-                       if (bFail == true)
-                       {
-                               Console.WriteLine ("test failed");
-                               return 101;
-                       }                       
-                       
-
-               }
-               catch (Exception e)
-               {
-                       Console.WriteLine ("unexpected exception");
-                       Console.WriteLine (e);
-                       Console.WriteLine ("test failed");
-                       return 101;
-               }
-
-               Console.WriteLine ("test passed");
-               return 100;
-       }
-
-}
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/properties.csproj b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/properties.csproj
deleted file mode 100644 (file)
index 91b97e4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>BuildAndRun</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-    <CLRTestExecutionArguments>-trustedexe</CLRTestExecutionArguments>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="properties.cs" />
-  </ItemGroup>
-</Project>
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server1.cs b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server1.cs
deleted file mode 100644 (file)
index 6741373..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Reflection;
-
-//[assembly: AssemblyKeyFile("..\\..\\compatkey.dat")]
-
-
-public class server1// : MarshalByRefObject 
-{
-  public int trivial()
-  {
-       Console.WriteLine ("server1.trivial");
-       Console.WriteLine ("simple named");
-       return 1;
-  }
-}
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server1.csproj b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server1.csproj
deleted file mode 100644 (file)
index c9bbe1b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Library</OutputType>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>SharedLibrary</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="server1.cs" />
-  </ItemGroup>
-</Project>
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server2.cs b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server2.cs
deleted file mode 100644 (file)
index 3315580..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Reflection;
-
-[assembly: System.Reflection.AssemblyVersion("0.0.0.0")]
-
-public class server2 
-{
-  public int trivial()
-  {
-       Console.WriteLine ("server2.trivial");
-       Console.WriteLine ("strongly named");
-       return 2;
-  }
-}
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server2.csproj b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server2.csproj
deleted file mode 100644 (file)
index bca1ecd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Library</OutputType>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>SharedLibrary</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="server2.cs" />
-  </ItemGroup>
-</Project>
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server3.cs b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server3.cs
deleted file mode 100644 (file)
index e3ee421..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.Reflection;
-
-[assembly:        AssemblyVersionAttribute("1.0.0.0")]
-
-public class server3 
-{
-  public int trivial()
-  {
-       Console.WriteLine ("server3.trivial");
-       return 3;
-  }
-}
diff --git a/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server3.csproj b/src/tests/Loader/binding/assemblies/basicapi/assemblynamector/server3.csproj
deleted file mode 100644 (file)
index b37d068..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Library</OutputType>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>SharedLibrary</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="server3.cs" />
-  </ItemGroup>
-</Project>
diff --git a/src/tests/Loader/multimodule/DontUseNetmodule.csproj b/src/tests/Loader/multimodule/DontUseNetmodule.csproj
deleted file mode 100644 (file)
index 7055640..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>BuildAndRun</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="dontusenetmodule.cs" />
-  </ItemGroup>
-</Project>
diff --git a/src/tests/Loader/multimodule/dontusenetmodule.cs b/src/tests/Loader/multimodule/dontusenetmodule.cs
deleted file mode 100644 (file)
index 2e97d67..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-
-public class B
-{
-    public int method1()
-    {
-        return 100;
-    }
-}
-
-public class Test
-{
-       public static int Main()
-       {
-        try
-        {
-            B obj = new B();
-
-            if (obj.method1() == 100)
-            {
-                Console.WriteLine("PASS");
-                return 100;
-            }
-            else
-            {
-                Console.WriteLine("FAIL");
-                return 101;
-            }
-        }
-        catch (Exception e)
-        {
-            Console.WriteLine("Caught unexpected exception: " + e);
-            return 102;
-        }
-       }
-}
diff --git a/src/tests/Loader/versioning/coverage/AssemblyAttrs.csproj b/src/tests/Loader/versioning/coverage/AssemblyAttrs.csproj
deleted file mode 100644 (file)
index 7e17d42..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <CLRTestKind>BuildAndRun</CLRTestKind>
-    <CLRTestPriority>1</CLRTestPriority>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="assemblyattrs.cs" />
-  </ItemGroup>
-</Project>
diff --git a/src/tests/Loader/versioning/coverage/assemblyattrs.cs b/src/tests/Loader/versioning/coverage/assemblyattrs.cs
deleted file mode 100644 (file)
index fbf7d92..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-using System;
-using System.IO;
-using System.Reflection;
-
-/*
- * This is a code coverage test meant to address some low coverage wrt to random Assembly attributes
- * AssemblyCompanyAttribute
- * AssemblyCopyrightAttribute
- * AssemblyCultureAttribute
- * AssemblyFileVersionAttribute
- * AssemblyInformationalVersion
- * AssemblyProductAttribute
- * AssemblyTrademarkAttribute
- * AssemblyVersionAttribute
- */
-
-public class AssemblyName
-{
-       public static int Main()
-       {
-               //random Assembly Attributes
-               Console.WriteLine((new AssemblyCompanyAttribute("my company")).Company);
-               Console.WriteLine((new AssemblyCopyrightAttribute("my copyright")).Copyright);
-               Console.WriteLine((new AssemblyCultureAttribute("my culture")).Culture);
-               Console.WriteLine((new AssemblyFileVersionAttribute("my version")).ToString());
-               try
-               {
-                       new AssemblyFileVersionAttribute(null);
-               }
-               catch(ArgumentNullException)
-               {}
-               Console.WriteLine((new AssemblyInformationalVersionAttribute("my informational")).InformationalVersion);
-               Console.WriteLine((new AssemblyProductAttribute("my product")).Product);
-               Console.WriteLine((new AssemblyTrademarkAttribute("my trademark")).Trademark);
-               Console.WriteLine((new AssemblyVersionAttribute("my version")).Version);
-               return 100;
-       }
-}