+++ /dev/null
-// 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;
- }
-}
-
+++ /dev/null
-<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>
+++ /dev/null
-// 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;
- }
-
-}
+++ /dev/null
-<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>
+++ /dev/null
-// 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;
- }
-}
+++ /dev/null
-<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>
+++ /dev/null
-// 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;
- }
-}
+++ /dev/null
-<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>
+++ /dev/null
-// 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;
- }
-}
+++ /dev/null
-<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>
+++ /dev/null
-<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>
+++ /dev/null
-// 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;
- }
- }
-}
+++ /dev/null
-<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>
+++ /dev/null
-// 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;
- }
-}