From 891eb5db83ca4ffd541ec2e989a5768840a2603c Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 02:44:20 +0200 Subject: [PATCH 01/31] Remove unused args parameter from the Main method in 349379.cs --- .../regressions/whidbeybeta2/349379/349379.cs | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs b/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs index ebccc5a62f321..aa2337866207d 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs +++ b/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs @@ -6,41 +6,41 @@ namespace TestCS { public class Class8 { - static int returnCode = 99; - static string expectedExceptionString; - static string expectedOuterExceptionString = "Foobar"; - - static public int Main(String[] args) + static int returnCode = 99; + static string expectedExceptionString; + static string expectedOuterExceptionString = "Foobar"; + + static public int Main() { Object foo = null; - try - { - foo.GetType(); - } - catch(Exception e) - { - expectedExceptionString = e.Message; - } - + try + { + foo.GetType(); + } + catch(Exception e) + { + expectedExceptionString = e.Message; + } + try { DoIt(); } catch(Exception e) { - if (e.Message != expectedOuterExceptionString) - returnCode = 98; - + if (e.Message != expectedOuterExceptionString) + returnCode = 98; + Console.WriteLine("Outer Exception Message Found: " + e.Message); Console.WriteLine("Outer Exception Message Expected: " + expectedOuterExceptionString); } - - if (returnCode == 100) - Console.WriteLine("Test PASSED"); - else - Console.WriteLine("Test FAILED"); + + if (returnCode == 100) + Console.WriteLine("Test PASSED"); + else + Console.WriteLine("Test FAILED"); - return returnCode; + return returnCode; } static public void DoIt() @@ -81,11 +81,11 @@ static public void Foobar() // The message here should be "Object reference not set to an instance of an object." // But it displays "Foobar" instead // - if (e.Message != expectedExceptionString) - returnCode = 98; - else - returnCode = 100; - + if (e.Message != expectedExceptionString) + returnCode = 98; + else + returnCode = 100; + Console.WriteLine("Message Found: " + e.Message); Console.WriteLine("Message Expected: " + expectedExceptionString); } From fd7a0353fc17a5d654d82c3af7972dd2436cba05 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 11:44:44 +0200 Subject: [PATCH 02/31] Convert stackoverflowtester Main to individual test entrypoints --- .../stackoverflow/stackoverflowtester.cs | 60 +++++-------------- 1 file changed, 15 insertions(+), 45 deletions(-) diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs b/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs index 52707b0508f5e..61921c79acc53 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs @@ -5,14 +5,12 @@ using System.Diagnostics; using System.IO; using System.Text; +using Xunit; namespace TestStackOverflow { - class Program + public class Program { - static string s_corerunPath; - static string s_currentPath; - static bool TestStackOverflow(string testName, string testArgs, out List stderrLines) { Console.WriteLine($"Running {testName} test({testArgs})"); @@ -20,8 +18,8 @@ static bool TestStackOverflow(string testName, string testArgs, out List Process testProcess = new Process(); - testProcess.StartInfo.FileName = s_corerunPath; - testProcess.StartInfo.Arguments = $"{Path.Combine(s_currentPath, "..", testName, $"{testName}.dll")} {testArgs}"; + testProcess.StartInfo.FileName = Path.Combine(Environment.GetEnvironmentVariable("CORE_ROOT"), "corerun"); + testProcess.StartInfo.Arguments = $"{Path.Combine(Directory.GetCurrentDirectory(), "..", testName, $"{testName}.dll")} {testArgs}"; testProcess.StartInfo.UseShellExecute = false; testProcess.StartInfo.RedirectStandardError = true; testProcess.ErrorDataReceived += (sender, line) => @@ -71,12 +69,13 @@ static bool TestStackOverflow(string testName, string testArgs, out List return true; } - static bool TestStackOverflowSmallFrameMainThread() + [Fact] + public static bool TestStackOverflowSmallFrameMainThread() { List lines; if (TestStackOverflow("stackoverflow", "smallframe main", out lines)) { - if (!lines[lines.Count - 1].EndsWith("at TestStackOverflow.Program.Main(System.String[])")) + if (!lines[lines.Count - 1].EndsWith(".Main()")) { Console.WriteLine("Missing \"Main\" method frame at the last line"); return false; @@ -112,7 +111,8 @@ static bool TestStackOverflowSmallFrameMainThread() return false; } - static bool TestStackOverflowLargeFrameMainThread() + [Fact] + public static bool TestStackOverflowLargeFrameMainThread() { List lines; if (TestStackOverflow("stackoverflow", "largeframe main", out lines)) @@ -153,7 +153,8 @@ static bool TestStackOverflowLargeFrameMainThread() return false; } - static bool TestStackOverflowSmallFrameSecondaryThread() + [Fact] + public static bool TestStackOverflowSmallFrameSecondaryThread() { List lines; if (TestStackOverflow("stackoverflow", "smallframe secondary", out lines)) @@ -188,7 +189,8 @@ static bool TestStackOverflowSmallFrameSecondaryThread() return false; } - static bool TestStackOverflowLargeFrameSecondaryThread() + [Fact] + public static bool TestStackOverflowLargeFrameSecondaryThread() { List lines; if (TestStackOverflow("stackoverflow", "largeframe secondary", out lines)) @@ -223,7 +225,8 @@ static bool TestStackOverflowLargeFrameSecondaryThread() return false; } - static bool TestStackOverflow3() + [Fact] + public static bool TestStackOverflow3() { List lines; if (TestStackOverflow("stackoverflow3", "", out lines)) @@ -245,38 +248,5 @@ static bool TestStackOverflow3() return false; } - - static int Main() - { - s_currentPath = Directory.GetCurrentDirectory(); - s_corerunPath = Path.Combine(Environment.GetEnvironmentVariable("CORE_ROOT"), "corerun"); - - if (!TestStackOverflowSmallFrameMainThread()) - { - return 101; - } - - if (!TestStackOverflowLargeFrameMainThread()) - { - return 102; - } - - if (!TestStackOverflowSmallFrameSecondaryThread()) - { - return 103; - } - - if (!TestStackOverflowLargeFrameSecondaryThread()) - { - return 104; - } - - if (!TestStackOverflow3()) - { - return 105; - } - - return 100; - } } } From 4b33c72fc6678fc8b08d585341ca44f425a0d57d Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 21:22:48 +0200 Subject: [PATCH 03/31] Don't complain about Exe type for test components Some tests have exe components - if these aren't marked with the CLRTestKind BuildAndRun, we shouldn't complain about them. Thanks Tomas --- src/tests/Directory.Build.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 75299527a7925..4a5a32b503095 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -154,6 +154,7 @@ Date: Fri, 1 Sep 2023 22:06:10 +0200 Subject: [PATCH 04/31] Make dynamicmethodliveness and ParallelCrash merge-friendly --- .../Dev11/154243/dynamicmethodliveness.cs | 6 ++- .../exceptions/simple/ParallelCrash.csproj | 7 +-- .../simple/ParallelCrashMainThread.csproj | 12 ----- .../exceptions/simple/ParallelCrashTester.cs | 47 +++++++++++++++++++ .../simple/ParallelCrashTester.csproj | 17 +++++++ .../simple/ParallelCrashWorkerThreads.csproj | 10 ---- .../stackoverflow/stackoverflow.csproj | 1 + .../exceptions/stacktrace/Tier1StackTrace.cs | 13 +++-- 8 files changed, 79 insertions(+), 34 deletions(-) delete mode 100644 src/tests/baseservices/exceptions/simple/ParallelCrashMainThread.csproj create mode 100644 src/tests/baseservices/exceptions/simple/ParallelCrashTester.cs create mode 100644 src/tests/baseservices/exceptions/simple/ParallelCrashTester.csproj delete mode 100644 src/tests/baseservices/exceptions/simple/ParallelCrashWorkerThreads.csproj diff --git a/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.cs b/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.cs index d5a518700bcf0..8f24ce4172ad4 100644 --- a/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.cs +++ b/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.cs @@ -9,6 +9,7 @@ using System.Threading; using System.Reflection; using System.Reflection.Emit; +using Xunit; public class My { @@ -63,7 +64,9 @@ static void DoStuff() { ((Action)method.CreateDelegate(typeof(Action)))(); } - static int Main() { + [Fact] + public static void TestEntryPoint() + { new Thread(Thrower).Start(); new Thread(Dynamizer).Start(); @@ -93,6 +96,5 @@ static int Main() { } } Console.WriteLine("Test case Pass"); - return 100; } } diff --git a/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj b/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj index bbad3fdf834bf..daf76b961ccff 100644 --- a/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj +++ b/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj @@ -1,11 +1,8 @@ Exe - 1 - 134 - -2146232797 - - true + BuildOnly + $(NoWarn);XUW1001 diff --git a/src/tests/baseservices/exceptions/simple/ParallelCrashMainThread.csproj b/src/tests/baseservices/exceptions/simple/ParallelCrashMainThread.csproj deleted file mode 100644 index d7ad43abbd027..0000000000000 --- a/src/tests/baseservices/exceptions/simple/ParallelCrashMainThread.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - RunOnly - 1 - ParallelCrash.csproj - 1 - 134 - -2146232797 - - true - - diff --git a/src/tests/baseservices/exceptions/simple/ParallelCrashTester.cs b/src/tests/baseservices/exceptions/simple/ParallelCrashTester.cs new file mode 100644 index 0000000000000..5d3124965d84e --- /dev/null +++ b/src/tests/baseservices/exceptions/simple/ParallelCrashTester.cs @@ -0,0 +1,47 @@ +// 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.Diagnostics; +using System.IO; +using System.Runtime.InteropServices; +using Xunit; + +public class ParallelCrashTester +{ + [Fact] + public static void ParallelCrashMainThread() + { + RunParallelCrash(1); + } + + [Fact] + public static void ParallelCrashWorkerThreads() + { + RunParallelCrash(2); + } + + [Fact] + public static void ParallelCrashMainThreadAndWorkerThreads() + { + RunParallelCrash(0); + } + + private static void RunParallelCrash(int arg) + { + Console.WriteLine($"Running ParallelCrash test({arg})"); + Process testProcess = new Process(); + + testProcess.StartInfo.FileName = Path.Combine(Environment.GetEnvironmentVariable("CORE_ROOT"), "corerun"); + testProcess.StartInfo.Arguments = $"ParallelCrash.dll {arg}"; + testProcess.StartInfo.UseShellExecute = false; + testProcess.Start(); + testProcess.WaitForExit(); + + int expectedExitCode = (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? -2146232797 : 128 + 6); + if (testProcess.ExitCode != expectedExitCode) + { + throw new Exception($"Exit code = {testProcess.ExitCode}, expected {expectedExitCode}"); + } + } +} diff --git a/src/tests/baseservices/exceptions/simple/ParallelCrashTester.csproj b/src/tests/baseservices/exceptions/simple/ParallelCrashTester.csproj new file mode 100644 index 0000000000000..30bcef8c9c8b5 --- /dev/null +++ b/src/tests/baseservices/exceptions/simple/ParallelCrashTester.csproj @@ -0,0 +1,17 @@ + + + 1 + + true + + + + + + + false + Content + Always + + + diff --git a/src/tests/baseservices/exceptions/simple/ParallelCrashWorkerThreads.csproj b/src/tests/baseservices/exceptions/simple/ParallelCrashWorkerThreads.csproj deleted file mode 100644 index 03d65d6d1b273..0000000000000 --- a/src/tests/baseservices/exceptions/simple/ParallelCrashWorkerThreads.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - RunOnly - 1 - ParallelCrash.csproj - 2 - 134 - -2146232797 - - diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj index 552eb026fae0d..8ee27a95a51ae 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj @@ -3,6 +3,7 @@ Exe false BuildOnly + $(NoWarn);XUW1001 diff --git a/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs b/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs index 4b0b98f58322c..67356ab79cc67 100644 --- a/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs +++ b/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs @@ -5,17 +5,20 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; +using Xunit; -internal static class Program +public static class Program { - private static int Main() + [Fact] + public static void TestEntryPoint() { - const int Pass = 100, Fail = 1; - string tier0StackTrace = Capture(true); PromoteToTier1(() => Capture(false)); string tier1StackTrace = Capture(true); - return tier0StackTrace == tier1StackTrace ? Pass : Fail; + if (tier0StackTrace != tier1StackTrace) + { + throw new Exception($"Stack trace mismatch:\n------\nTier 0:\n------\n{tier0StackTrace}\n------\nTier 1:\n------\n{tier1StackTrace}"); + } } private static void PromoteToTier1(Action action) From 5780f17d01c83fa2fec818f5b95b5f0064120c8a Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 22:57:14 +0200 Subject: [PATCH 05/31] Adjust the Tier1StackTrace test to be tolerant to merged wrappers --- .../exceptions/stacktrace/Tier1StackTrace.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs b/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs index 67356ab79cc67..45d0c7a8015c7 100644 --- a/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs +++ b/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.cs @@ -49,12 +49,16 @@ private static string Capture(bool doWork) string stackTrace = new StackTrace(true).ToString().Trim(); - // Remove the last line of the stack trace, which would correspond with Main() - int lastNewLineIndex = stackTrace.LastIndexOf('\n'); - if (lastNewLineIndex == -1) + // Remove everything past the test entrypoint line + int entrypointIndex = stackTrace.IndexOf("TestEntryPoint"); + if (entrypointIndex == -1) { return null; } - return stackTrace.Substring(0, lastNewLineIndex).Trim(); + while (entrypointIndex > 0 && stackTrace[entrypointIndex - 1] != '\n') + { + entrypointIndex--; + } + return stackTrace.Substring(0, entrypointIndex); } } From 8b7b8e58c0b5cb6dbc476dd05a43408071af5084 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:00:40 +0200 Subject: [PATCH 06/31] Convert baseservices/exceptions to merged mode --- .../AccessViolationException/AVException01.cs | 4 +++- .../AccessViolationException/AVException01.csproj | 3 ++- .../AccessViolationException/AVException02.cs | 4 +++- .../AccessViolationException/AVException02.csproj | 3 ++- .../AccessViolationException/AVException03.cs | 4 +++- .../AccessViolationException/AVException03.csproj | 3 ++- .../baseservices/exceptions/Directory.Build.props | 11 +++++++++++ .../StackTracePreserve/StackTracePreserveTests.cs | 6 ++++-- .../StackTracePreserve/StackTracePreserveTests.csproj | 3 ++- .../WindowsEventLog/WindowsEventLog_TargetUnix.csproj | 3 ++- .../WindowsEventLog_TargetWindows.csproj | 3 ++- .../exceptions/baseservices-exceptions.csproj | 7 +++++++ .../exceptions/generics/GenericExceptions.cs | 4 +++- .../exceptions/generics/GenericExceptions.csproj | 3 ++- .../exceptions/generics/GenericExceptions01.csproj | 3 ++- .../exceptions/generics/GenericExceptions02.csproj | 3 ++- .../exceptions/generics/GenericExceptions03.csproj | 3 ++- .../exceptions/generics/GenericExceptions04.csproj | 3 ++- .../exceptions/generics/GenericExceptions05.csproj | 3 ++- .../exceptions/generics/GenericExceptions06.csproj | 3 ++- .../exceptions/generics/GenericExceptions07.csproj | 3 ++- .../exceptions/generics/GenericExceptions08.csproj | 3 ++- .../exceptions/generics/TypeParameter001.csproj | 3 ++- .../exceptions/generics/TypeParameter002.csproj | 3 ++- .../exceptions/generics/TypeParameter003.csproj | 3 ++- .../exceptions/generics/TypeParameter004.csproj | 3 ++- .../exceptions/generics/TypeParameter005.csproj | 3 ++- .../exceptions/generics/TypeParameter006.csproj | 3 ++- .../exceptions/generics/TypeParameter007.csproj | 3 ++- .../exceptions/generics/TypeParameter008.csproj | 3 ++- .../exceptions/generics/TypeParameter009.csproj | 3 ++- .../exceptions/generics/TypeParameter010.csproj | 3 ++- .../exceptions/generics/TypeParameter011.csproj | 3 ++- .../exceptions/generics/TypeParameter012.csproj | 3 ++- .../exceptions/generics/TypeParameter013.csproj | 3 ++- .../exceptions/generics/TypeParameter014.csproj | 3 ++- .../exceptions/generics/TypeParameter015.csproj | 3 ++- .../exceptions/generics/TypeParameter016.csproj | 3 ++- .../exceptions/generics/TypeParameter017.csproj | 3 ++- .../exceptions/generics/TypeParameter018.csproj | 3 ++- .../exceptions/generics/genericexceptions01.cs | 4 +++- .../exceptions/generics/genericexceptions02.cs | 4 +++- .../exceptions/generics/genericexceptions03.cs | 4 +++- .../exceptions/generics/genericexceptions04.cs | 4 +++- .../exceptions/generics/genericexceptions05.cs | 4 +++- .../exceptions/generics/genericexceptions06.cs | 4 +++- .../exceptions/generics/genericexceptions07.cs | 4 +++- .../exceptions/generics/genericexceptions08.cs | 4 +++- .../exceptions/generics/nested-try-catch01.cs | 4 +++- .../exceptions/generics/nested-try-catch01.csproj | 3 ++- .../exceptions/generics/nested-try-catch02.cs | 4 +++- .../exceptions/generics/nested-try-catch02.csproj | 3 ++- .../exceptions/generics/nested-try-catch03.cs | 4 +++- .../exceptions/generics/nested-try-catch03.csproj | 3 ++- .../exceptions/generics/nested-try-catch04.cs | 4 +++- .../exceptions/generics/nested-try-catch04.csproj | 3 ++- .../exceptions/generics/nested-try-catch05.cs | 4 +++- .../exceptions/generics/nested-try-catch05.csproj | 3 ++- .../exceptions/generics/nested-try-catch06.cs | 4 +++- .../exceptions/generics/nested-try-catch06.csproj | 3 ++- .../exceptions/generics/nested-try-catch07.cs | 4 +++- .../exceptions/generics/nested-try-catch07.csproj | 3 ++- .../exceptions/generics/nested-try-catch08.cs | 4 +++- .../exceptions/generics/nested-try-catch08.csproj | 3 ++- .../exceptions/generics/nested-try-catch09.cs | 4 +++- .../exceptions/generics/nested-try-catch09.csproj | 3 ++- .../exceptions/generics/nested-try-catch10.cs | 4 +++- .../exceptions/generics/nested-try-catch10.csproj | 3 ++- .../exceptions/generics/try-catch-finally-struct01.cs | 4 +++- .../generics/try-catch-finally-struct01.csproj | 3 ++- .../exceptions/generics/try-catch-finally-struct02.cs | 4 +++- .../generics/try-catch-finally-struct02.csproj | 3 ++- .../exceptions/generics/try-catch-finally-struct03.cs | 4 +++- .../generics/try-catch-finally-struct03.csproj | 3 ++- .../exceptions/generics/try-catch-finally01.cs | 4 +++- .../exceptions/generics/try-catch-finally01.csproj | 3 ++- .../exceptions/generics/try-catch-finally02.cs | 4 +++- .../exceptions/generics/try-catch-finally02.csproj | 3 ++- .../exceptions/generics/try-catch-finally03.cs | 4 +++- .../exceptions/generics/try-catch-finally03.csproj | 3 ++- .../exceptions/generics/try-catch-struct01.cs | 4 +++- .../exceptions/generics/try-catch-struct01.csproj | 3 ++- .../exceptions/generics/try-catch-struct02.cs | 4 +++- .../exceptions/generics/try-catch-struct02.csproj | 3 ++- .../exceptions/generics/try-catch-struct03.cs | 4 +++- .../exceptions/generics/try-catch-struct03.csproj | 3 ++- .../exceptions/generics/try-catch-struct04.cs | 4 +++- .../exceptions/generics/try-catch-struct04.csproj | 3 ++- .../exceptions/generics/try-catch-struct05.cs | 4 +++- .../exceptions/generics/try-catch-struct05.csproj | 3 ++- .../exceptions/generics/try-catch-struct06.cs | 4 +++- .../exceptions/generics/try-catch-struct06.csproj | 3 ++- .../exceptions/generics/try-catch-struct07.cs | 4 +++- .../exceptions/generics/try-catch-struct07.csproj | 3 ++- .../exceptions/generics/try-catch-struct08.cs | 4 +++- .../exceptions/generics/try-catch-struct08.csproj | 3 ++- .../exceptions/generics/try-catch-struct09.cs | 4 +++- .../exceptions/generics/try-catch-struct09.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch01.cs | 4 +++- .../exceptions/generics/try-catch01.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch02.cs | 4 +++- .../exceptions/generics/try-catch02.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch03.cs | 4 +++- .../exceptions/generics/try-catch03.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch04.cs | 4 +++- .../exceptions/generics/try-catch04.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch05.cs | 4 +++- .../exceptions/generics/try-catch05.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch06.cs | 4 +++- .../exceptions/generics/try-catch06.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch07.cs | 4 +++- .../exceptions/generics/try-catch07.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch08.cs | 4 +++- .../exceptions/generics/try-catch08.csproj | 3 ++- .../baseservices/exceptions/generics/try-catch09.cs | 4 +++- .../exceptions/generics/try-catch09.csproj | 3 ++- .../exceptions/generics/try-fault-struct01.ilproj | 3 ++- .../exceptions/generics/try-fault-struct02.ilproj | 3 ++- .../exceptions/generics/try-fault-struct03.ilproj | 3 ++- .../exceptions/generics/try-fault01.ilproj | 3 ++- .../exceptions/generics/try-fault02.ilproj | 3 ++- .../exceptions/generics/try-fault03.ilproj | 3 ++- .../exceptions/generics/try-filter-finally01.ilproj | 3 ++- .../exceptions/generics/try-filter-finally02.ilproj | 3 ++- .../exceptions/generics/try-filter-struct02.ilproj | 3 ++- .../exceptions/generics/try-filter02.ilproj | 3 ++- .../exceptions/generics/try-finally-struct01.cs | 4 +++- .../exceptions/generics/try-finally-struct01.csproj | 3 ++- .../exceptions/generics/try-finally-struct02.cs | 4 +++- .../exceptions/generics/try-finally-struct02.csproj | 3 ++- .../exceptions/generics/try-finally-struct03.cs | 4 +++- .../exceptions/generics/try-finally-struct03.csproj | 3 ++- .../baseservices/exceptions/generics/try-finally01.cs | 4 +++- .../exceptions/generics/try-finally01.csproj | 3 ++- .../baseservices/exceptions/generics/try-finally02.cs | 4 +++- .../exceptions/generics/try-finally02.csproj | 3 ++- .../baseservices/exceptions/generics/try-finally03.cs | 4 +++- .../exceptions/generics/try-finally03.csproj | 3 ++- .../exceptions/generics/typeparameter001.cs | 4 +++- .../exceptions/generics/typeparameter002.cs | 4 +++- .../exceptions/generics/typeparameter003.cs | 4 +++- .../exceptions/generics/typeparameter004.cs | 4 +++- .../exceptions/generics/typeparameter005.cs | 4 +++- .../exceptions/generics/typeparameter006.cs | 4 +++- .../exceptions/generics/typeparameter007.cs | 4 +++- .../exceptions/generics/typeparameter008.cs | 4 +++- .../exceptions/generics/typeparameter009.cs | 4 +++- .../exceptions/generics/typeparameter010.cs | 4 +++- .../exceptions/generics/typeparameter011.cs | 4 +++- .../exceptions/generics/typeparameter012.cs | 4 +++- .../exceptions/generics/typeparameter013.cs | 4 +++- .../exceptions/generics/typeparameter014.cs | 4 +++- .../exceptions/generics/typeparameter015.cs | 4 +++- .../exceptions/generics/typeparameter016.cs | 4 +++- .../exceptions/generics/typeparameter017.cs | 4 +++- .../exceptions/generics/typeparameter018.cs | 4 +++- .../exceptions/regressions/Dev11/147911/test147911.cs | 4 +++- .../regressions/Dev11/147911/test147911.csproj | 3 ++- .../Dev11/154243/dynamicmethodliveness.csproj | 3 ++- .../exceptions/regressions/V1/SEH/COOL/finally.cs | 4 +++- .../exceptions/regressions/V1/SEH/COOL/finally.csproj | 3 ++- .../exceptions/regressions/V1/SEH/COOL/rethrow.cs | 4 +++- .../exceptions/regressions/V1/SEH/COOL/rethrow.csproj | 3 ++- .../regressions/V1/SEH/VJ/ExternalException.cs | 4 +++- .../regressions/V1/SEH/VJ/ExternalException.csproj | 3 ++- .../regressions/V1/SEH/VJ/HandlerException.cs | 4 +++- .../regressions/V1/SEH/VJ/HandlerException.csproj | 3 ++- .../regressions/V1/SEH/VJ/MultipleException.cs | 4 +++- .../regressions/V1/SEH/VJ/MultipleException.csproj | 3 ++- .../exceptions/regressions/V1/SEH/VJ/NestedEx1.cs | 6 ++++-- .../exceptions/regressions/V1/SEH/VJ/NestedEx1.csproj | 3 ++- .../exceptions/regressions/V1/SEH/VJ/NestedEx2.cs | 6 ++++-- .../exceptions/regressions/V1/SEH/VJ/NestedEx2.csproj | 3 ++- .../regressions/V1/SEH/VJ/NestedException.cs | 4 +++- .../regressions/V1/SEH/VJ/NestedException.csproj | 3 ++- .../regressions/V1/SEH/VJ/NormalException.cs | 4 +++- .../regressions/V1/SEH/VJ/NormalException.csproj | 3 ++- .../regressions/V1/SEH/VJ/RecursiveException.cs | 4 +++- .../regressions/V1/SEH/VJ/RecursiveException.csproj | 3 ++- .../exceptions/regressions/V1/SEH/VJ/TryCatch.cs | 4 +++- .../exceptions/regressions/V1/SEH/VJ/TryCatch.csproj | 3 ++- .../regressions/V1/SEH/VJ/TryCatchFinally.cs | 4 +++- .../regressions/V1/SEH/VJ/TryCatchFinally.csproj | 3 ++- .../regressions/V1/SEH/VJ/UnmanagedToManaged.cs | 4 +++- .../regressions/V1/SEH/VJ/UnmanagedToManaged.csproj | 3 ++- .../exceptions/regressions/V1/SEH/VJ/UserException.cs | 4 +++- .../regressions/V1/SEH/VJ/UserException.csproj | 3 ++- .../regressions/V1/SEH/VJ/UserExceptionThread.cs | 4 +++- .../regressions/V1/SEH/VJ/UserExceptionThread.csproj | 3 ++- .../exceptions/regressions/V1/SEH/asm/Except.il | 8 ++++++-- .../exceptions/regressions/V1/SEH/asm/Except.ilproj | 3 ++- .../exceptions/regressions/V1/SEH/asm/FiltCatch.il | 8 ++++++-- .../regressions/V1/SEH/asm/FiltCatch.ilproj | 3 ++- .../exceptions/regressions/V1/SEH/asm/FiltFallThru.il | 8 ++++++-- .../regressions/V1/SEH/asm/FiltFallThru.ilproj | 3 ++- .../exceptions/regressions/V1/SEH/asm/Filter.il | 8 ++++++-- .../exceptions/regressions/V1/SEH/asm/Filter.ilproj | 3 ++- .../exceptions/regressions/V1/SEH/asm/Finally.il | 8 ++++++-- .../exceptions/regressions/V1/SEH/asm/Finally.ilproj | 3 ++- .../exceptions/regressions/V1/SEH/asm/NestedExcept.il | 8 ++++++-- .../regressions/V1/SEH/asm/NestedExcept.ilproj | 3 ++- .../exceptions/regressions/V1/SEH/asm/NestedFilt.il | 8 ++++++-- .../regressions/V1/SEH/asm/NestedFilt.ilproj | 3 ++- .../regressions/V1/SEH/coverage/Exceptions.cs | 6 ++++-- .../regressions/V1/SEH/coverage/Exceptions.csproj | 3 ++- .../baseservices/exceptions/regressions/v1.0/15266.il | 2 +- .../exceptions/regressions/v1.0/15266.ilproj | 3 ++- .../baseservices/exceptions/regressions/v1.0/19896.cs | 4 +++- .../exceptions/regressions/v1.0/19896.csproj | 3 ++- .../exceptions/regressions/v4.0/640474/test640474.cs | 4 +++- .../regressions/v4.0/640474/test640474.csproj | 3 ++- .../exceptions/regressions/whidbeyM3.2/151232.cs | 4 +++- .../exceptions/regressions/whidbeyM3.2/151232.csproj | 3 ++- .../regressions/whidbeybeta2/349379/349379.cs | 4 +++- .../regressions/whidbeybeta2/349379/349379.csproj | 3 ++- .../regressions/whidbeym3.3/106011/106011.cs | 4 +++- .../regressions/whidbeym3.3/106011/106011.csproj | 3 ++- .../regressions/whidbeym3.3/302680/302680.cs | 4 +++- .../regressions/whidbeym3.3/302680/302680.csproj | 3 ++- .../emptystacktrace/OOMException01.csproj | 3 ++- .../emptystacktrace/oomexception01.cs | 4 +++- src/tests/baseservices/exceptions/simple/ArrayInit.cs | 4 +++- .../baseservices/exceptions/simple/ArrayInit.csproj | 3 ++- .../baseservices/exceptions/simple/HardwareEh.cs | 4 +++- .../baseservices/exceptions/simple/HardwareEh.csproj | 3 ++- .../exceptions/simple/ParallelCrash.csproj | 3 ++- src/tests/baseservices/exceptions/simple/fault.il | 2 +- src/tests/baseservices/exceptions/simple/fault.ilproj | 3 ++- src/tests/baseservices/exceptions/simple/finally.cs | 4 +++- .../baseservices/exceptions/simple/finally.csproj | 3 ++- .../exceptions/stackoverflow/stackoverflow.csproj | 3 ++- .../exceptions/stackoverflow/stackoverflow3.cs | 6 ++++-- .../exceptions/stackoverflow/stackoverflow3.csproj | 3 ++- .../stackoverflow/stackoverflowtester.csproj | 3 ++- .../exceptions/stacktrace/Tier1StackTrace.csproj | 3 ++- .../baseservices/exceptions/unittests/Baadbaad.cs | 4 +++- .../baseservices/exceptions/unittests/Baadbaad.csproj | 3 ++- .../exceptions/unittests/BaseClass.csproj | 3 ++- .../exceptions/unittests/CollidedUnwind.cs | 4 +++- .../exceptions/unittests/CollidedUnwind.csproj | 3 ++- .../exceptions/unittests/EHPatternTests.cs | 4 +++- .../exceptions/unittests/EHPatternTests.csproj | 3 ++- .../exceptions/unittests/GoryManagedPresent.cs | 4 +++- .../exceptions/unittests/GoryManagedPresent.csproj | 3 ++- .../exceptions/unittests/GoryNativePast.cs | 4 +++- .../exceptions/unittests/GoryNativePast.csproj | 3 ++- .../exceptions/unittests/InnerFinally.csproj | 3 ++- .../exceptions/unittests/InnerFinallyAndCatch.cs | 4 +++- .../exceptions/unittests/InnerFinallyAndCatch.csproj | 3 ++- .../baseservices/exceptions/unittests/Pending.cs | 4 +++- .../baseservices/exceptions/unittests/Pending.csproj | 3 ++- .../baseservices/exceptions/unittests/Recurse.cs | 4 +++- .../baseservices/exceptions/unittests/Recurse.csproj | 3 ++- .../exceptions/unittests/RecursiveRethrow.cs | 4 +++- .../exceptions/unittests/RecursiveRethrow.csproj | 3 ++- .../exceptions/unittests/RecursiveThrowNew.cs | 4 +++- .../exceptions/unittests/RecursiveThrowNew.csproj | 3 ++- .../exceptions/unittests/RethrowAndFinally.csproj | 3 ++- .../exceptions/unittests/ReturnFromCatch.csproj | 3 ++- .../exceptions/unittests/StrSwitchFinally.cs | 4 +++- .../exceptions/unittests/StrSwitchFinally.csproj | 3 ++- .../exceptions/unittests/ThrowInCatch.csproj | 3 ++- .../exceptions/unittests/ThrowInFinally.csproj | 3 ++- .../exceptions/unittests/ThrowInFinallyNestedInTry.cs | 4 +++- .../unittests/ThrowInFinallyNestedInTry.csproj | 3 ++- .../exceptions/unittests/TryCatchInFinally.csproj | 3 ++- .../baseservices/exceptions/unittests/baseclass.cs | 4 +++- .../baseservices/exceptions/unittests/innerfinally.cs | 4 +++- .../exceptions/unittests/rethrowandfinally.cs | 4 +++- .../exceptions/unittests/returnfromcatch.cs | 4 +++- .../baseservices/exceptions/unittests/throwincatch.cs | 4 +++- .../exceptions/unittests/throwinfinally.cs | 4 +++- .../exceptions/unittests/trycatchinfinally.cs | 4 +++- 273 files changed, 709 insertions(+), 283 deletions(-) create mode 100644 src/tests/baseservices/exceptions/Directory.Build.props create mode 100644 src/tests/baseservices/exceptions/baseservices-exceptions.csproj diff --git a/src/tests/baseservices/exceptions/AccessViolationException/AVException01.cs b/src/tests/baseservices/exceptions/AccessViolationException/AVException01.cs index f479faa53ab13..9ddd89669e2d1 100644 --- a/src/tests/baseservices/exceptions/AccessViolationException/AVException01.cs +++ b/src/tests/baseservices/exceptions/AccessViolationException/AVException01.cs @@ -2,13 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public class test { private object _state = null; private static test _obj = null; - public static int Main() + [Fact] + public static int TestEntryPoint() { int ret = 0; try diff --git a/src/tests/baseservices/exceptions/AccessViolationException/AVException01.csproj b/src/tests/baseservices/exceptions/AccessViolationException/AVException01.csproj index 4235c59760d55..f46e05eaf0b7f 100644 --- a/src/tests/baseservices/exceptions/AccessViolationException/AVException01.csproj +++ b/src/tests/baseservices/exceptions/AccessViolationException/AVException01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/AccessViolationException/AVException02.cs b/src/tests/baseservices/exceptions/AccessViolationException/AVException02.cs index 1679d5cb9c417..a82f6dd55e1cb 100644 --- a/src/tests/baseservices/exceptions/AccessViolationException/AVException02.cs +++ b/src/tests/baseservices/exceptions/AccessViolationException/AVException02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public class test { #pragma warning disable 414 @@ -8,7 +9,8 @@ public class test #pragma warning restore 414 private static test _obj = null; - public static int Main() + [Fact] + public static int TestEntryPoint() { int ret = 0; try diff --git a/src/tests/baseservices/exceptions/AccessViolationException/AVException02.csproj b/src/tests/baseservices/exceptions/AccessViolationException/AVException02.csproj index 0cfdc4c5f1151..e392844d45ba7 100644 --- a/src/tests/baseservices/exceptions/AccessViolationException/AVException02.csproj +++ b/src/tests/baseservices/exceptions/AccessViolationException/AVException02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/AccessViolationException/AVException03.cs b/src/tests/baseservices/exceptions/AccessViolationException/AVException03.cs index bcf41d0dc6b37..23eafb9ddeec9 100644 --- a/src/tests/baseservices/exceptions/AccessViolationException/AVException03.cs +++ b/src/tests/baseservices/exceptions/AccessViolationException/AVException03.cs @@ -2,13 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public class test { private object _state = null; private static test _obj = null; - public static int Main() + [Fact] + public static int TestEntryPoint() { int ret = 0; Object temp = new Object(); diff --git a/src/tests/baseservices/exceptions/AccessViolationException/AVException03.csproj b/src/tests/baseservices/exceptions/AccessViolationException/AVException03.csproj index da4aa952847c6..8e5d9404efe40 100644 --- a/src/tests/baseservices/exceptions/AccessViolationException/AVException03.csproj +++ b/src/tests/baseservices/exceptions/AccessViolationException/AVException03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/Directory.Build.props b/src/tests/baseservices/exceptions/Directory.Build.props new file mode 100644 index 0000000000000..17e80030ca09d --- /dev/null +++ b/src/tests/baseservices/exceptions/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + + + true + $(NoWarn);xUnit1013 + false + + diff --git a/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.cs b/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.cs index da01c3b94f50c..ec0868b6f040d 100644 --- a/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.cs +++ b/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.cs @@ -5,8 +5,9 @@ using System.Runtime.ExceptionServices; using System.IO; using System.Security; +using Xunit; -class InactiveForeignException +public class InactiveForeignException { private static ExceptionDispatchInfo s_EDI = null; private static int iPassed = 0, iFailed = 0; @@ -501,7 +502,8 @@ private static void ProcessStatus(bool fPassed) } - public static int Main() + [Fact] + public static int TestEntryPoint() { iPassed = iFailed = 0; diff --git a/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.csproj b/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.csproj index c684e66b2b822..d4102a7465bc1 100644 --- a/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.csproj +++ b/src/tests/baseservices/exceptions/StackTracePreserve/StackTracePreserveTests.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj index 36b5aecf07808..a4de5fa2d2f8f 100644 --- a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj +++ b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj index 862bebbb040e9..4ce10d22ed21d 100644 --- a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj +++ b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj @@ -1,6 +1,7 @@ - Exe + + true WINDOWS true diff --git a/src/tests/baseservices/exceptions/baseservices-exceptions.csproj b/src/tests/baseservices/exceptions/baseservices-exceptions.csproj new file mode 100644 index 0000000000000..f751282d127da --- /dev/null +++ b/src/tests/baseservices/exceptions/baseservices-exceptions.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions.cs b/src/tests/baseservices/exceptions/generics/GenericExceptions.cs index e43003e306189..ed2a9bea53dc9 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions.cs +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions.cs @@ -4,6 +4,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -300,7 +301,8 @@ public static void StructInstanceFunctionWithManyArgs() [System.Runtime.CompilerServices.MethodImpl( System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions.csproj index 1b66be814ec94..d5783ff8da22a 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions01.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions01.csproj index fa9606017239a..03b7210c47be3 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions01.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions02.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions02.csproj index e085b611b098d..2c5de57ccbaec 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions02.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions03.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions03.csproj index 804838a3b657d..ce64432fb28d2 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions03.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions04.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions04.csproj index 2c154409793f5..2c3a4c45291e7 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions04.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions04.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions05.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions05.csproj index 4a6771c3c3a42..3765c54d5624c 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions05.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions05.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions06.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions06.csproj index 40a508bd9babd..af24deb6dafac 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions06.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions06.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions07.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions07.csproj index 5656dc8854e7f..2bcef54754b70 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions07.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions07.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/GenericExceptions08.csproj b/src/tests/baseservices/exceptions/generics/GenericExceptions08.csproj index 3542026eaf311..054a1932d554b 100644 --- a/src/tests/baseservices/exceptions/generics/GenericExceptions08.csproj +++ b/src/tests/baseservices/exceptions/generics/GenericExceptions08.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter001.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter001.csproj index d3d4a495af9b1..dc18d729fe7a8 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter001.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter001.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter002.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter002.csproj index d9b00f4f7c94c..3845a34a4d09f 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter002.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter002.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter003.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter003.csproj index 3d4b4bdfed2cd..7b358c3392fce 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter003.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter003.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter004.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter004.csproj index abe74e05bb742..a6a2d923fb4f1 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter004.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter004.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter005.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter005.csproj index 06b8c69d3a565..56994aa6c4f3f 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter005.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter005.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter006.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter006.csproj index 6e3bded0a52f4..5df08c34b946c 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter006.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter006.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter007.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter007.csproj index de0249704b58f..cdd49832c2868 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter007.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter007.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter008.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter008.csproj index c794edf9c6135..f0026cb336574 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter008.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter008.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter009.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter009.csproj index 9001fd5b86bcb..dfa30401d312e 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter009.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter009.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter010.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter010.csproj index a62a514dd2474..d5c4ed1e2889a 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter010.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter010.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter011.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter011.csproj index 275da6d8bbd3b..d9b5d68509199 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter011.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter011.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter012.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter012.csproj index abadef9011b2d..22c3166a50f15 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter012.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter012.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter013.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter013.csproj index c76d51825c9ae..ff021d4b32620 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter013.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter013.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter014.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter014.csproj index 33c4511b691a6..afbb1d3bd0bc8 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter014.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter014.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter015.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter015.csproj index c8e71728d46c4..d8049c3fbe2f6 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter015.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter015.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter016.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter016.csproj index b14e0b9d5656c..e99dabb589865 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter016.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter016.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter017.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter017.csproj index bc829d3ded59e..86a450a1a2e7d 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter017.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter017.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/TypeParameter018.csproj b/src/tests/baseservices/exceptions/generics/TypeParameter018.csproj index 7ea7ebec8d2d0..903a55af5dcb7 100644 --- a/src/tests/baseservices/exceptions/generics/TypeParameter018.csproj +++ b/src/tests/baseservices/exceptions/generics/TypeParameter018.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions01.cs b/src/tests/baseservices/exceptions/generics/genericexceptions01.cs index 45ae71b88efa3..6e56f9c09b84f 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions01.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions01.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -55,7 +56,8 @@ public static void InstanceFunctionWithFewArgs() (new A()).InstanceFunctionWithFewArgs(); } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions02.cs b/src/tests/baseservices/exceptions/generics/genericexceptions02.cs index 0b0fbf66c8373..915c8dd977cbc 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions02.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions02.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -53,7 +54,8 @@ public static void InstanceFunctionWithManyArgs() (new A()).InstanceFunctionWithManyArgs(1, 2, 3, Help.s_object); } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions03.cs b/src/tests/baseservices/exceptions/generics/genericexceptions03.cs index ee74aac015ba9..479323c99fbaf 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions03.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions03.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -60,7 +61,8 @@ public static void StaticFunctionWithFewArgs() [System.Runtime.CompilerServices.MethodImpl( System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions04.cs b/src/tests/baseservices/exceptions/generics/genericexceptions04.cs index 6ed56fa3d2d6f..407c99967b9e8 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions04.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions04.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -53,7 +54,8 @@ public static void StaticFunctionWithManyArgs() A.StaticFunctionWithManyArgs(1, 2, 3, Help.s_object); } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions05.cs b/src/tests/baseservices/exceptions/generics/genericexceptions05.cs index 0eac4cd59d33b..b5cad1a374f86 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions05.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions05.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -54,7 +55,8 @@ public static void GenericFunctionWithFewArgs() A.GenericFunctionWithFewArgs(); } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions06.cs b/src/tests/baseservices/exceptions/generics/genericexceptions06.cs index b38fcc4ae8ea4..60199a4c2301b 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions06.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions06.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -54,7 +55,8 @@ public static void GenericFunctionWithManyArgs() A.GenericFunctionWithManyArgs(1, 2, 3, Help.s_object); } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions07.cs b/src/tests/baseservices/exceptions/generics/genericexceptions07.cs index ca9f57eb72a9c..5cb24c4cd8585 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions07.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions07.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -53,7 +54,8 @@ public static void StructInstanceFunctionWithFewArgs() (new Struct()).StructInstanceFunctionWithFewArgs(); } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/genericexceptions08.cs b/src/tests/baseservices/exceptions/generics/genericexceptions08.cs index 2d6902514fad7..2f0873bd516fd 100644 --- a/src/tests/baseservices/exceptions/generics/genericexceptions08.cs +++ b/src/tests/baseservices/exceptions/generics/genericexceptions08.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; using System.IO; +using Xunit; class MyException : Exception { @@ -53,7 +54,8 @@ public static void StructInstanceFunctionWithManyArgs() (new Struct()).StructInstanceFunctionWithManyArgs(1, 2, 3, Help.s_object); } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch01.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch01.cs index 2d53dfd8e28b1..0212ed1e28a2a 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch01.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch01.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -73,7 +74,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch01.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch01.csproj index 6151cfb8822d2..f6b41fddeac98 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch01.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch02.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch02.cs index f930aa610dfb2..d6a3adc4be8ce 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch02.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -64,7 +65,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch02.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch02.csproj index c1eae00179a45..1617596282f0c 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch02.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch03.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch03.cs index 91af783e74b27..e9a7fd5a51ab1 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch03.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch03.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -79,7 +80,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch03.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch03.csproj index 7710b4685dbfd..738238d9bc92b 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch03.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch04.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch04.cs index 85272bb5be73c..5fe4939d3cfa5 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch04.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch04.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -70,7 +71,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch04.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch04.csproj index 9795d036228dc..f23b1af391a39 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch04.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch04.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch05.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch05.cs index f095054dfd79e..a23b30096b7f7 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch05.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch05.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -84,7 +85,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch05.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch05.csproj index 5acbf186fe5a2..edbae10df7aab 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch05.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch05.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch06.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch06.cs index 68aeafe9e448b..6d294f6be5a9a 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch06.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch06.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -84,7 +85,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch06.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch06.csproj index 768c2726d928d..1a8848673d70a 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch06.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch06.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch07.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch07.cs index bdc084672760a..9de7ddf9b50b0 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch07.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch07.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -76,7 +77,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch07.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch07.csproj index 2ead9e567d61a..6f1e90be47d06 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch07.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch07.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch08.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch08.cs index 347a1b1ea3e6c..cae09404b1401 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch08.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch08.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -76,7 +77,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch08.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch08.csproj index 2f67f1cc816a1..96f1da5418d02 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch08.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch08.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch09.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch09.cs index ba63325d6109a..d2f3c686cfec0 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch09.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch09.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -79,7 +80,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch09.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch09.csproj index 807dc438e2eb3..8256e1565c8b4 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch09.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch09.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch10.cs b/src/tests/baseservices/exceptions/generics/nested-try-catch10.cs index 19f5f4fde376f..806d75c6fe247 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch10.cs +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch10.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -80,7 +81,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/nested-try-catch10.csproj b/src/tests/baseservices/exceptions/generics/nested-try-catch10.csproj index 51d7705f31012..4a1655d6fb260 100644 --- a/src/tests/baseservices/exceptions/generics/nested-try-catch10.csproj +++ b/src/tests/baseservices/exceptions/generics/nested-try-catch10.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.cs b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.cs index 107a669462784..683f77ecbdb07 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -72,7 +73,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.csproj b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.csproj index b16eec21e65b7..a6534d221210a 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.cs b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.cs index ccca794253b97..e4c5ec39fda14 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.csproj b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.csproj index 1d04b0dc82541..3a6af4a7ae8ef 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.cs b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.cs index fa9b15f5bf264..7365286b76b21 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -68,7 +69,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(false); new Gen().ExceptionTest(false); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.csproj b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.csproj index 1c345a793a8d1..9bc8e66b5e827 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally-struct03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally01.cs b/src/tests/baseservices/exceptions/generics/try-catch-finally01.cs index 7a607309bf844..a2b8c13eff963 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally01.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally01.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -72,7 +73,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally01.csproj b/src/tests/baseservices/exceptions/generics/try-catch-finally01.csproj index 8ec87cce5f662..b67cf46857c72 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally01.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally02.cs b/src/tests/baseservices/exceptions/generics/try-catch-finally02.cs index a81176b97c625..7d850ac3fab31 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally02.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally02.csproj b/src/tests/baseservices/exceptions/generics/try-catch-finally02.csproj index 1325aff2448f2..032dba68bb405 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally02.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally03.cs b/src/tests/baseservices/exceptions/generics/try-catch-finally03.cs index 05d3a0f10ba24..3ab10680821ed 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally03.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally03.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -68,7 +69,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(false); new Gen().ExceptionTest(false); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-finally03.csproj b/src/tests/baseservices/exceptions/generics/try-catch-finally03.csproj index 078c583c1281c..580e8b9591f24 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-finally03.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-finally03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct01.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct01.cs index a53a26ef49951..09dd96e89ecd6 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct01.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct01.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct01.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct01.csproj index fea5dae7ecca9..615b14d7ffeb3 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct01.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct02.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct02.cs index 29e4e749ed39c..88c826d69ad91 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct02.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct02.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct02.csproj index 09042c1567cf1..45a8d6f28a5f5 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct02.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct03.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct03.cs index 3a0b4aed01be5..63318cafc2bc3 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct03.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct03.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -75,7 +76,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct03.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct03.csproj index 56660eafbb040..cc79353d01ae0 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct03.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct04.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct04.cs index 51d16379b1686..22896de0e82ee 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct04.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct04.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct04.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct04.csproj index d1cc851e71cd1..4b4d1629aae92 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct04.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct04.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct05.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct05.cs index a9d3cc31ef64c..e61e0680bca32 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct05.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct05.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct05.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct05.csproj index 1998803030a83..748846d245e88 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct05.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct05.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct06.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct06.cs index faa7e3afaa364..2898254c8b3c7 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct06.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct06.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct06.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct06.csproj index a4e05b874f9ef..f42d32e8dd6ca 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct06.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct06.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct07.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct07.cs index 2a11076615997..8b8104a6b815a 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct07.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct07.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct07.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct07.csproj index 0d617b435c433..f40d6aafc39ed 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct07.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct07.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct08.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct08.cs index ab7dc54606182..8e49bf095094c 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct08.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct08.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct08.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct08.csproj index 681ded284e55f..1e067003b88c6 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct08.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct08.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct09.cs b/src/tests/baseservices/exceptions/generics/try-catch-struct09.cs index 63932b2b4b301..dad22eabc10a3 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct09.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct09.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch-struct09.csproj b/src/tests/baseservices/exceptions/generics/try-catch-struct09.csproj index 8e140d5a82fb1..715127fb9182b 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch-struct09.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch-struct09.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch01.cs b/src/tests/baseservices/exceptions/generics/try-catch01.cs index 22a9efb039175..94aa92dfc6bba 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch01.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch01.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch01.csproj b/src/tests/baseservices/exceptions/generics/try-catch01.csproj index 4c3fca8a5a8e0..30420223216e1 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch01.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch02.cs b/src/tests/baseservices/exceptions/generics/try-catch02.cs index 3de20e5628251..27e17734fed7d 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch02.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch02.csproj b/src/tests/baseservices/exceptions/generics/try-catch02.csproj index 00fd96bc3d21d..39dbdcccdad64 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch02.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch03.cs b/src/tests/baseservices/exceptions/generics/try-catch03.cs index d59b3fc4aeb4e..e6e5a15fe478e 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch03.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch03.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -75,7 +76,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch03.csproj b/src/tests/baseservices/exceptions/generics/try-catch03.csproj index 094c7a2970133..6bc663aad2199 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch03.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch04.cs b/src/tests/baseservices/exceptions/generics/try-catch04.cs index 1f93c80e22c33..ba9a75686a553 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch04.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch04.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch04.csproj b/src/tests/baseservices/exceptions/generics/try-catch04.csproj index 4df4fef94a059..2f35d40d3b570 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch04.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch04.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch05.cs b/src/tests/baseservices/exceptions/generics/try-catch05.cs index 17649b35148aa..24034fdcce1a1 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch05.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch05.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch05.csproj b/src/tests/baseservices/exceptions/generics/try-catch05.csproj index 3d96639a8abbc..dcc537b3285cd 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch05.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch05.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch06.cs b/src/tests/baseservices/exceptions/generics/try-catch06.cs index b26bd5f68d420..ffcf95f8eba3c 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch06.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch06.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch06.csproj b/src/tests/baseservices/exceptions/generics/try-catch06.csproj index 254d59b522269..1c6c563763c9f 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch06.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch06.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch07.cs b/src/tests/baseservices/exceptions/generics/try-catch07.cs index f25805a0ca140..505ef6f1df1f8 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch07.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch07.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch07.csproj b/src/tests/baseservices/exceptions/generics/try-catch07.csproj index aacabc4c3d864..aedfb705e3212 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch07.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch07.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch08.cs b/src/tests/baseservices/exceptions/generics/try-catch08.cs index 97302ffa377cb..8e369742bab5e 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch08.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch08.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -65,7 +66,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch08.csproj b/src/tests/baseservices/exceptions/generics/try-catch08.csproj index a12d1d405867b..51d290d8bac92 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch08.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch08.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-catch09.cs b/src/tests/baseservices/exceptions/generics/try-catch09.cs index 73f47de9b0326..ac8717e330bc9 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch09.cs +++ b/src/tests/baseservices/exceptions/generics/try-catch09.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -61,7 +62,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(true); Gen.ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-catch09.csproj b/src/tests/baseservices/exceptions/generics/try-catch09.csproj index 8756d5b474d50..f259a5fafa406 100644 --- a/src/tests/baseservices/exceptions/generics/try-catch09.csproj +++ b/src/tests/baseservices/exceptions/generics/try-catch09.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-fault-struct01.ilproj b/src/tests/baseservices/exceptions/generics/try-fault-struct01.ilproj index 3a017dba034b5..386e2fb473e6f 100644 --- a/src/tests/baseservices/exceptions/generics/try-fault-struct01.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-fault-struct01.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-fault-struct02.ilproj b/src/tests/baseservices/exceptions/generics/try-fault-struct02.ilproj index 282fa4100fca4..c29f62af4434d 100644 --- a/src/tests/baseservices/exceptions/generics/try-fault-struct02.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-fault-struct02.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-fault-struct03.ilproj b/src/tests/baseservices/exceptions/generics/try-fault-struct03.ilproj index e9c1a8367d3fb..26c8802b40d86 100644 --- a/src/tests/baseservices/exceptions/generics/try-fault-struct03.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-fault-struct03.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-fault01.ilproj b/src/tests/baseservices/exceptions/generics/try-fault01.ilproj index ee8ffc5a761bc..0dcc0703a1a97 100644 --- a/src/tests/baseservices/exceptions/generics/try-fault01.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-fault01.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-fault02.ilproj b/src/tests/baseservices/exceptions/generics/try-fault02.ilproj index 4cd0e191ca1ce..60acd8bd95bf6 100644 --- a/src/tests/baseservices/exceptions/generics/try-fault02.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-fault02.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-fault03.ilproj b/src/tests/baseservices/exceptions/generics/try-fault03.ilproj index 037a35a2875cc..55e3e9f5b320b 100644 --- a/src/tests/baseservices/exceptions/generics/try-fault03.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-fault03.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-filter-finally01.ilproj b/src/tests/baseservices/exceptions/generics/try-filter-finally01.ilproj index 471f0f991c8cd..ceebcdd6f2dc8 100644 --- a/src/tests/baseservices/exceptions/generics/try-filter-finally01.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-filter-finally01.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-filter-finally02.ilproj b/src/tests/baseservices/exceptions/generics/try-filter-finally02.ilproj index 64cb12acba98d..f110329a02cbc 100644 --- a/src/tests/baseservices/exceptions/generics/try-filter-finally02.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-filter-finally02.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-filter-struct02.ilproj b/src/tests/baseservices/exceptions/generics/try-filter-struct02.ilproj index fdbb335a15493..1b4dd5cbc0152 100644 --- a/src/tests/baseservices/exceptions/generics/try-filter-struct02.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-filter-struct02.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-filter02.ilproj b/src/tests/baseservices/exceptions/generics/try-filter02.ilproj index 0d483f025950d..81374adde12a2 100644 --- a/src/tests/baseservices/exceptions/generics/try-filter02.ilproj +++ b/src/tests/baseservices/exceptions/generics/try-filter02.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-finally-struct01.cs b/src/tests/baseservices/exceptions/generics/try-finally-struct01.cs index e6306fd4d2114..e3bc8d0aadb42 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally-struct01.cs +++ b/src/tests/baseservices/exceptions/generics/try-finally-struct01.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -73,7 +74,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-finally-struct01.csproj b/src/tests/baseservices/exceptions/generics/try-finally-struct01.csproj index ed3afe4ba2a75..02c87355d4a79 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally-struct01.csproj +++ b/src/tests/baseservices/exceptions/generics/try-finally-struct01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-finally-struct02.cs b/src/tests/baseservices/exceptions/generics/try-finally-struct02.cs index f5aab70b45c64..e26159d05ef9e 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally-struct02.cs +++ b/src/tests/baseservices/exceptions/generics/try-finally-struct02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -72,7 +73,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(false); new Gen().ExceptionTest(false); diff --git a/src/tests/baseservices/exceptions/generics/try-finally-struct02.csproj b/src/tests/baseservices/exceptions/generics/try-finally-struct02.csproj index 919945e5e437c..aa37ab9f98991 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally-struct02.csproj +++ b/src/tests/baseservices/exceptions/generics/try-finally-struct02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-finally-struct03.cs b/src/tests/baseservices/exceptions/generics/try-finally-struct03.cs index cf512fc82a4b8..f1ef5000efb0c 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally-struct03.cs +++ b/src/tests/baseservices/exceptions/generics/try-finally-struct03.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -74,7 +75,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-finally-struct03.csproj b/src/tests/baseservices/exceptions/generics/try-finally-struct03.csproj index 29fca0e7e27af..1e53e744a3f09 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally-struct03.csproj +++ b/src/tests/baseservices/exceptions/generics/try-finally-struct03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-finally01.cs b/src/tests/baseservices/exceptions/generics/try-finally01.cs index 437fdc198f095..e7334630c2c88 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally01.cs +++ b/src/tests/baseservices/exceptions/generics/try-finally01.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -73,7 +74,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-finally01.csproj b/src/tests/baseservices/exceptions/generics/try-finally01.csproj index 123e23bd7e3fe..2ed02426831e2 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally01.csproj +++ b/src/tests/baseservices/exceptions/generics/try-finally01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-finally02.cs b/src/tests/baseservices/exceptions/generics/try-finally02.cs index 3c0e937df02e5..8a5939949a474 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally02.cs +++ b/src/tests/baseservices/exceptions/generics/try-finally02.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -72,7 +73,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(false); new Gen().ExceptionTest(false); diff --git a/src/tests/baseservices/exceptions/generics/try-finally02.csproj b/src/tests/baseservices/exceptions/generics/try-finally02.csproj index 797cfa60c76a0..513da1e677338 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally02.csproj +++ b/src/tests/baseservices/exceptions/generics/try-finally02.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/try-finally03.cs b/src/tests/baseservices/exceptions/generics/try-finally03.cs index 89ae042f7ada1..b1d00bc340999 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally03.cs +++ b/src/tests/baseservices/exceptions/generics/try-finally03.cs @@ -1,6 +1,7 @@ // 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 Xunit; public struct ValX0 {} public struct ValY0 {} @@ -74,7 +75,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(true); new Gen().ExceptionTest(true); diff --git a/src/tests/baseservices/exceptions/generics/try-finally03.csproj b/src/tests/baseservices/exceptions/generics/try-finally03.csproj index cf689aeb2e167..db55dfb6c83ac 100644 --- a/src/tests/baseservices/exceptions/generics/try-finally03.csproj +++ b/src/tests/baseservices/exceptions/generics/try-finally03.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/generics/typeparameter001.cs b/src/tests/baseservices/exceptions/generics/typeparameter001.cs index 090cea95525ee..361a959f83d9f 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter001.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter001.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(new Exception()); Gen.ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter002.cs b/src/tests/baseservices/exceptions/generics/typeparameter002.cs index 24387963d31dd..9c8e8d7e91030 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter002.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter002.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(new Exception()); Gen.ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter003.cs b/src/tests/baseservices/exceptions/generics/typeparameter003.cs index 0948989ded904..c5532d4ecf808 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter003.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter003.cs @@ -12,6 +12,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -68,7 +69,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(new Exception()); new Gen().ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter004.cs b/src/tests/baseservices/exceptions/generics/typeparameter004.cs index c5b08cfb4e8ef..74941ff56df1f 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter004.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter004.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(new Exception()); new Gen().ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter005.cs b/src/tests/baseservices/exceptions/generics/typeparameter005.cs index 850a0eed1b792..74d2ab0c13ed3 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter005.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter005.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(new Exception()); Gen.ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter006.cs b/src/tests/baseservices/exceptions/generics/typeparameter006.cs index eacc287d86c83..1bff2ea38c28b 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter006.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter006.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(new Exception()); Gen.ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter007.cs b/src/tests/baseservices/exceptions/generics/typeparameter007.cs index 4a7163b1d0a97..109b62f143c77 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter007.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter007.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(new Exception()); new Gen().ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter008.cs b/src/tests/baseservices/exceptions/generics/typeparameter008.cs index f4ebc52a99c1d..b7d8804160909 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter008.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter008.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public struct ValX0 {} public struct ValY0 {} @@ -67,7 +68,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest(new Exception()); new Gen().ExceptionTest(new InvalidOperationException()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter009.cs b/src/tests/baseservices/exceptions/generics/typeparameter009.cs index e1e444297b4d6..bfc45dec2daeb 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter009.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter009.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen,int>.ExceptionTest(new GenExceptionSub()); Gen,string>.ExceptionTest(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter010.cs b/src/tests/baseservices/exceptions/generics/typeparameter010.cs index a16db59d389ad..70c597863a98e 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter010.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter010.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen,int>.ExceptionTest(new GenExceptionSub()); Gen,string>.ExceptionTest(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter011.cs b/src/tests/baseservices/exceptions/generics/typeparameter011.cs index aa280dc987542..39de786d9ea78 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter011.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter011.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen,int>.ExceptionTest(new GenExceptionSub()); Gen,string>.ExceptionTest(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter012.cs b/src/tests/baseservices/exceptions/generics/typeparameter012.cs index 8f51c74c6c3c8..9009836d16568 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter012.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter012.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen,int>().ExceptionTest(new GenExceptionSub()); new Gen,string>().ExceptionTest(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter013.cs b/src/tests/baseservices/exceptions/generics/typeparameter013.cs index 0a2f9c15e3e3c..467143868d842 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter013.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter013.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest,int>(new GenExceptionSub()); Gen.ExceptionTest,string>(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter014.cs b/src/tests/baseservices/exceptions/generics/typeparameter014.cs index 1a6bb2778f52a..40395b6efcca4 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter014.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter014.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest,int>(new GenExceptionSub()); Gen.ExceptionTest,string>(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter015.cs b/src/tests/baseservices/exceptions/generics/typeparameter015.cs index 635811eda8cde..53e5162a4ace9 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter015.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter015.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest,int>(new GenExceptionSub()); new Gen().ExceptionTest,string>(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter016.cs b/src/tests/baseservices/exceptions/generics/typeparameter016.cs index 02b22e0bba9eb..64294c5a5c910 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter016.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter016.cs @@ -11,6 +11,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { new Gen().ExceptionTest,int>(new GenExceptionSub()); new Gen().ExceptionTest,string>(new GenExceptionSub()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter017.cs b/src/tests/baseservices/exceptions/generics/typeparameter017.cs index ee071e1cf915d..24bbf2a5e4ee5 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter017.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter017.cs @@ -12,6 +12,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(new Exception()); Gen.ExceptionTest>(new Exception()); diff --git a/src/tests/baseservices/exceptions/generics/typeparameter018.cs b/src/tests/baseservices/exceptions/generics/typeparameter018.cs index 70ad194ae7061..4dbf726c387a9 100644 --- a/src/tests/baseservices/exceptions/generics/typeparameter018.cs +++ b/src/tests/baseservices/exceptions/generics/typeparameter018.cs @@ -12,6 +12,7 @@ // using System; +using Xunit; public class GenException : Exception {} @@ -51,7 +52,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(new Exception()); Gen.ExceptionTest>(new Exception()); diff --git a/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.cs b/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.cs index f260775d93ac7..5f3605df9832f 100644 --- a/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.cs +++ b/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.cs @@ -3,6 +3,7 @@ using System; using System.Runtime.InteropServices; +using Xunit; public class Class1 @@ -10,7 +11,8 @@ public class Class1 [DllImport("fpcw.dll")] private static extern int RaiseFPException(); - public static int Main() + [Fact] + public static int TestEntryPoint() { int retVal = RaiseFPException(); diff --git a/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.csproj b/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.csproj index 9103b4b9bedc9..96a2130009613 100644 --- a/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.csproj +++ b/src/tests/baseservices/exceptions/regressions/Dev11/147911/test147911.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.csproj b/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.csproj index bd125da6fda60..c4643b642af36 100644 --- a/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.csproj +++ b/src/tests/baseservices/exceptions/regressions/Dev11/154243/dynamicmethodliveness.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.cs index 33536a0b35c01..cb0de787465c2 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.cs @@ -3,6 +3,7 @@ using System; using System.Threading; +using Xunit; public class Foo { private static int n=0; @@ -19,7 +20,8 @@ public static void Bar(){ } } - public static int Main() + [Fact] + public static int TestEntryPoint() { String s = "Done"; Thread t = new Thread(new ThreadStart(Foo.Bar)); diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.csproj index 0b6059412298d..1fb659a0b8b2b 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/finally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.cs index 83e7ce5b7a614..059a893d41879 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.cs @@ -3,6 +3,7 @@ using System; using System.Threading; +using Xunit; public class UserException1 : Exception { int ExceptionId; @@ -57,7 +58,8 @@ public RethrowException(int id){ } - public static int Main() { + [Fact] + public static int TestEntryPoint() { String s = "Done"; System.IO.TextWriter t = Console.Out; Console.SetOut(t); diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.csproj index 9f0978caa74f3..3a456db0d6870 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/COOL/rethrow.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.cs index 9493aca688b08..56c724afc9965 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.cs @@ -3,6 +3,7 @@ using System; using System.Threading; +using Xunit; class ExternalClass { ExternalException ee = new ExternalException(); @@ -18,7 +19,8 @@ public class ExternalException : Exception { static int retVal = 100; - public static int Main() { + [Fact] + public static int TestEntryPoint() { Thread mv_Thread; String str = "Done"; ExternalException ee = new ExternalException(); diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.csproj index 6a62b0646f075..79e205d7d94a1 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/ExternalException.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 true diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.cs index 218047e3e2a0b..288c2ce8fc8d8 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.cs @@ -3,6 +3,7 @@ using System; using System.Threading; using System.IO; +using Xunit; class UserException1 : Exception { public int ExceptionId; @@ -45,7 +46,8 @@ public HandlerException(int id){ } - public static int Main() { + [Fact] + public static int TestEntryPoint() { String s = "Done"; int retVal = 100; Thread mv_Thread; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.csproj index 43f46dd7840ef..f791b036d1c3f 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/HandlerException.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.cs index 7969bef6c83c2..d0d39c4321c06 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.cs @@ -3,6 +3,7 @@ using System; using System.Threading; using System.IO; +using Xunit; class UserException : Exception { internal int ExceptionId; @@ -20,7 +21,8 @@ public MultipleException(int id){ } - public static int Main() { + [Fact] + public static int TestEntryPoint() { int retVal = 100; String s = "Done"; Thread mv_Thread; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.csproj index bf2a1fad59d44..6fae86e42321f 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/MultipleException.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.cs index 569a75693b961..ddff96f571e69 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.cs @@ -3,8 +3,9 @@ using System; using System.Security; +using Xunit; -class TestClass { +public class TestClass { static int iExitCode; @@ -105,7 +106,8 @@ void TestMain() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int retVal = 100; String str = "Done"; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.csproj index bb2da21af094f..78b0208a87ecb 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx1.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.cs index 9b64d7cf175fb..4d63c02f6c54d 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.cs @@ -3,8 +3,9 @@ using System; using System.Security; +using Xunit; -class TestClass { +public class TestClass { static int iExitCode; @@ -157,7 +158,8 @@ void TestMain() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int retVal = 100; String str = "Done"; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.csproj index 9fb466a0175b2..721c5f75009bb 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedEx2.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.cs index 3cae6c0d9386b..cb5348312812f 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.cs @@ -3,6 +3,7 @@ using System; using System.Threading; +using Xunit; class UserException1 : Exception { public int ExceptionId; @@ -45,7 +46,8 @@ public NestedException(int id){ } - public static int Main() { + [Fact] + public static int TestEntryPoint() { String s = "Done"; int retVal = 100; Thread mv_Thread; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.csproj index 5b0617685957b..49ae0ca6c0f14 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NestedException.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.cs index 6ca3bd770d417..18e7aa670dcb5 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.cs @@ -1,6 +1,7 @@ // 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 Xunit; class UserException : Exception{ @@ -150,7 +151,8 @@ public ComplexByte( ComplexByte cparm ) public class NormalException { - public static int Main() + [Fact] + public static int TestEntryPoint() { String s = "Done"; int retVal = 100; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.csproj index db72e404ad8b8..23c19d6dad78b 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/NormalException.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.cs index 024596bf5b699..02db3efd01a9a 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.cs @@ -3,13 +3,15 @@ using System; using System.Threading; using System.IO; +using Xunit; class UserException : Exception { } public class RecursiveException { - public static int Main() { + [Fact] + public static int TestEntryPoint() { String s = "Done"; int retVal = 100; Thread mv_Thread; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.csproj index 227768bdea020..aa0ee8b679c19 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/RecursiveException.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.cs index 7e6990def7658..71208e5957db4 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.cs @@ -2,10 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public class TryCatch{ - public static int Main() { + [Fact] + public static int TestEntryPoint() { int retVal = 100; int i = 0; String m_str = ""; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.csproj index 3e01ed1942422..59c41bc507ac6 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatch.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.cs index 390be614d8175..901a64a59fa06 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.cs @@ -2,10 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public class TryCatchFinally{ - public static int Main() { + [Fact] + public static int TestEntryPoint() { int i = 1; String m_str = "Failed"; String str = "Done"; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.csproj index 67ac2a10461f9..e12f167365ac5 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/TryCatchFinally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.cs index 6526664b182bd..0a30aa51dde37 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Runtime.InteropServices; +using Xunit; public class UnmanagedToManaged { @@ -9,7 +10,8 @@ public class UnmanagedToManaged { [System.Runtime.InteropServices.DllImport("unmanaged.dll")] public static extern void UnmanagedCode( int i) ; - public static int Main(){ + [Fact] + public static int TestEntryPoint(){ String s = "Done"; int retVal = 0; try { diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.csproj index bdf71e39cd2d0..7d5d5743ec22e 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UnmanagedToManaged.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.cs index eb17345c8d8f3..bc8862bde6e7f 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.cs @@ -2,9 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Threading; +using Xunit; public class UserException : Exception { - public static int Main() { + [Fact] + public static int TestEntryPoint() { int counter = 0; String str = "Done"; diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.csproj index 948096e985eaf..cae9c3fefa617 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserException.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.cs index 5634afb300a00..a223785787e2b 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.cs @@ -3,11 +3,13 @@ using System; using System.Threading; using System.IO; +using Xunit; public class UserExceptionThread : Exception { static int retVal = 100; - public static int Main() { + [Fact] + public static int TestEntryPoint() { Thread mv_Thread; String str = "Done"; UserExceptionThread ue = new UserExceptionThread(); diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.csproj index 3ac31e8875fe9..5dd9297f772be 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/VJ/UserExceptionThread.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.il b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.il index 615efcdc9e38b..9c6a828c55ce3 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.il +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.il @@ -7,6 +7,7 @@ // Basic exception handling test case. // .assembly extern legacy library mscorlib{} +.assembly extern xunit.core {} .assembly extern System.Console { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) @@ -15,7 +16,7 @@ .assembly Except{} -.class Except { +.class public Except { // global for storing return value - defaults to 0 for success @@ -25,7 +26,10 @@ // Execution starts here -.method static int32 main() { +.method public static int32 main() { +.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 +) .locals (string) .entrypoint .maxstack 2 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.ilproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.ilproj index c3b0f4c93f8b5..405ac0edc43bc 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.ilproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Except.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.il b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.il index dfeb35a91e0fe..7eef9db4119de 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.il +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.il @@ -9,6 +9,7 @@ // to an outer .exception aHandler. // .assembly extern legacy library mscorlib{} +.assembly extern xunit.core {} .assembly extern System.Console { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) @@ -17,7 +18,7 @@ .assembly FiltCatch{} -.class FiltCatch { +.class public FiltCatch { // global for storing return value - defaults to 0 for success @@ -27,7 +28,10 @@ // Execution starts here -.method static int32 main() { +.method public static int32 main() { +.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 +) .locals(string) .entrypoint .maxstack 2 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.ilproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.ilproj index d0f01b933da16..63e80a3d84774 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.ilproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltCatch.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.il b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.il index 2d88706e80d59..2576af4173c91 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.il +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.il @@ -9,6 +9,7 @@ // outer .exception aHandler. // .assembly extern legacy library mscorlib{} +.assembly extern xunit.core {} .assembly extern System.Console { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) @@ -17,7 +18,7 @@ .assembly FiltFallThru{} -.class FiltFallThru { +.class public FiltFallThru { // global for storing return value - defaults to 0 for success @@ -27,7 +28,10 @@ // Execution starts here -.method static int32 main() { +.method public static int32 main() { +.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 +) .locals(string) .entrypoint .maxstack 2 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.ilproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.ilproj index 5fff5c023ced5..12acbbe0f70d6 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.ilproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/FiltFallThru.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.il b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.il index d5711679c52d0..2a130949fdb34 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.il +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.il @@ -7,6 +7,7 @@ // Basic aFilter test case. // .assembly extern legacy library mscorlib{} +.assembly extern xunit.core {} .assembly extern System.Console { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) @@ -16,7 +17,7 @@ .assembly Filter{} -.class Filter { +.class public Filter { // global for storing return value - defaults to 0 for success @@ -26,7 +27,10 @@ // Execution starts here -.method static int32 main() { +.method public static int32 main() { +.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 +) .locals(string) .entrypoint .maxstack 2 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.ilproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.ilproj index e64c29d72787d..bf09cc3b81588 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.ilproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Filter.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.il b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.il index af24a232714a8..e7260a3390cb7 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.il +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.il @@ -7,6 +7,7 @@ // Exercises finally exception syntax. // .assembly extern legacy library mscorlib{} +.assembly extern xunit.core {} .assembly extern System.Console { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) @@ -16,7 +17,7 @@ .assembly Finally{} -.class Finally { +.class public Finally { .field static int32 iResult .field static int32 finally_flag @@ -38,7 +39,10 @@ // Execution starts here -.method static int32 main() { +.method public static int32 main() { +.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 +) .locals(string) .entrypoint .maxstack 2 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.ilproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.ilproj index 7e85e058408c4..0646c0d5634df 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.ilproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/Finally.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.il b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.il index 172a23ab648a4..7087c3416ad67 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.il +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.il @@ -8,6 +8,7 @@ // Nested exception test cases. // .assembly extern legacy library mscorlib{} +.assembly extern xunit.core {} .assembly extern System.Console { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) @@ -16,7 +17,7 @@ .assembly NestedExcept{} -.class NestedExcept { +.class public NestedExcept { // global for storing return value - defaults to 0 for success @@ -26,7 +27,10 @@ // Execution starts here -.method static int32 main() { +.method public static int32 main() { +.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 +) .locals(string) .entrypoint .maxstack 2 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.ilproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.ilproj index 164f9846d46c0..43177bc96ab24 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.ilproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedExcept.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.il b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.il index bcbc3722f2f21..9977a4a6dbe28 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.il +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.il @@ -7,6 +7,7 @@ // Nests filters that catch the same exception. // .assembly extern legacy library mscorlib{} +.assembly extern xunit.core {} .assembly extern System.Console { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) @@ -15,7 +16,7 @@ .assembly NestedFilt{} -.class NestedFilt { +.class public NestedFilt { // global for storing return value - defaults to 0 for success @@ -25,7 +26,10 @@ // Execution starts here -.method static int32 main() { +.method public static int32 main() { +.custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 +) .locals(string) .entrypoint .maxstack 3 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.ilproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.ilproj index 48974fb1520e8..e336fd59e3d14 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.ilproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/asm/NestedFilt.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.cs b/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.cs index af0c155cf8143..4d8a0f242008c 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.cs +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.cs @@ -8,12 +8,14 @@ using System.Runtime.InteropServices; using System.Security; using System.Threading; +using Xunit; -class MightyExceptor +public class MightyExceptor { static int Result = 100; - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.csproj b/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.csproj index d9b4980703b20..d72ca284fa29c 100644 --- a/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.csproj +++ b/src/tests/baseservices/exceptions/regressions/V1/SEH/coverage/Exceptions.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/v1.0/15266.il b/src/tests/baseservices/exceptions/regressions/v1.0/15266.il index 67a0ad3e0cf37..272d1a99cad2a 100644 --- a/src/tests/baseservices/exceptions/regressions/v1.0/15266.il +++ b/src/tests/baseservices/exceptions/regressions/v1.0/15266.il @@ -13,7 +13,7 @@ } .assembly '15266' {} -.class private auto ansi beforefieldinit test +.class public auto ansi beforefieldinit test extends [mscorlib]System.Object { .method public static int32 Main() cil managed diff --git a/src/tests/baseservices/exceptions/regressions/v1.0/15266.ilproj b/src/tests/baseservices/exceptions/regressions/v1.0/15266.ilproj index 7e79791c160ea..2e8dae2d81548 100644 --- a/src/tests/baseservices/exceptions/regressions/v1.0/15266.ilproj +++ b/src/tests/baseservices/exceptions/regressions/v1.0/15266.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/regressions/v1.0/19896.cs b/src/tests/baseservices/exceptions/regressions/v1.0/19896.cs index 88af83969970a..bd34d1728a07e 100644 --- a/src/tests/baseservices/exceptions/regressions/v1.0/19896.cs +++ b/src/tests/baseservices/exceptions/regressions/v1.0/19896.cs @@ -1,10 +1,12 @@ // 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 Xunit; public class b19896 { - public static int Main() + [Fact] + public static int TestEntryPoint() { int retVal = 200; diff --git a/src/tests/baseservices/exceptions/regressions/v1.0/19896.csproj b/src/tests/baseservices/exceptions/regressions/v1.0/19896.csproj index 601eefc644305..82f4752c43ba6 100644 --- a/src/tests/baseservices/exceptions/regressions/v1.0/19896.csproj +++ b/src/tests/baseservices/exceptions/regressions/v1.0/19896.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.cs b/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.cs index e4ab3e99d1d98..7f8241a281d16 100644 --- a/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.cs +++ b/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; using System.Reflection; +using Xunit; public class My { @@ -32,7 +33,8 @@ public static void Worker() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.csproj b/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.csproj index 77356561b0ae1..29eb9414e7ad4 100644 --- a/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.csproj +++ b/src/tests/baseservices/exceptions/regressions/v4.0/640474/test640474.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.cs b/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.cs index d2916edb08e7b..fe592a68292e7 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.cs +++ b/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.cs @@ -1,6 +1,7 @@ // 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 Xunit; public class E : Exception { T fld; @@ -31,7 +32,8 @@ public static int Test5(bool str,int x) { } public class M { - public static int Main() { + [Fact] + public static int TestEntryPoint() { M test = new M(); return test.Run(); } diff --git a/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.csproj b/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.csproj index ab0b5ec5ec02b..bd3411aa8347a 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.csproj +++ b/src/tests/baseservices/exceptions/regressions/whidbeyM3.2/151232.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs b/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs index aa2337866207d..51fc29e2a7f9b 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs +++ b/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.cs @@ -1,6 +1,7 @@ // 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 Xunit; namespace TestCS { @@ -10,7 +11,8 @@ public class Class8 static string expectedExceptionString; static string expectedOuterExceptionString = "Foobar"; - static public int Main() + [Fact] + static public int TestEntryPoint() { Object foo = null; try diff --git a/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.csproj b/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.csproj index a7eeee0ff34f9..c89d7e6e45604 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.csproj +++ b/src/tests/baseservices/exceptions/regressions/whidbeybeta2/349379/349379.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.cs b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.cs index ba2e02a2815e8..7b7af2bd7646c 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.cs +++ b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.cs @@ -3,6 +3,7 @@ using System; +using Xunit; public class GenException : Exception {} @@ -42,7 +43,8 @@ public static void Eval(bool exp) } - public static int Main() + [Fact] + public static int TestEntryPoint() { Gen.ExceptionTest(new Exception()); Gen.ExceptionTest>(new Exception()); diff --git a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.csproj b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.csproj index a7eeee0ff34f9..c89d7e6e45604 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.csproj +++ b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/106011/106011.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.cs b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.cs index 521afd4a0fa77..d827b7e8796b8 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.cs +++ b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.cs @@ -1,10 +1,12 @@ // 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 Xunit; public class xa { - public static int Main() { + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.csproj b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.csproj index 847305dc8f43f..2def5c0aeae07 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.csproj +++ b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/302680.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/OOMException01.csproj b/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/OOMException01.csproj index 7b6f354e79484..68bc6409bd365 100644 --- a/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/OOMException01.csproj +++ b/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/OOMException01.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs b/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs index 32942d796bea5..3c6305620c64d 100644 --- a/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs +++ b/src/tests/baseservices/exceptions/sharedexceptions/emptystacktrace/oomexception01.cs @@ -2,12 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Diagnostics; +using Xunit; public class SharedExceptions { public int retVal =0; - public static int Main() + [Fact] + public static int TestEntryPoint() { Console.WriteLine("Test that StackTrace for OOM is proper if memory is available"); SharedExceptions test = new SharedExceptions(); diff --git a/src/tests/baseservices/exceptions/simple/ArrayInit.cs b/src/tests/baseservices/exceptions/simple/ArrayInit.cs index 61b49b998c4bd..7e6018bd1e09b 100644 --- a/src/tests/baseservices/exceptions/simple/ArrayInit.cs +++ b/src/tests/baseservices/exceptions/simple/ArrayInit.cs @@ -2,10 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using TestLibrary; +using Xunit; public class ArrayInit { - public static int Main() + [Fact] + public static int TestEntryPoint() { ArrayInit ai = new ArrayInit(); diff --git a/src/tests/baseservices/exceptions/simple/ArrayInit.csproj b/src/tests/baseservices/exceptions/simple/ArrayInit.csproj index 28db5addb3b12..0dbbf526f1ff0 100644 --- a/src/tests/baseservices/exceptions/simple/ArrayInit.csproj +++ b/src/tests/baseservices/exceptions/simple/ArrayInit.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/simple/HardwareEh.cs b/src/tests/baseservices/exceptions/simple/HardwareEh.cs index df9f44241d635..2ea4b5f38738f 100644 --- a/src/tests/baseservices/exceptions/simple/HardwareEh.cs +++ b/src/tests/baseservices/exceptions/simple/HardwareEh.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Xunit; // DataMisalignment // NullRef (generic, nullable, object) @@ -22,7 +23,8 @@ public class HardwareEh public const long c_VALUE = 34252; public delegate bool TestDelegate(); - public static int Main() + [Fact] + public static int TestEntryPoint() { HardwareEh e = new HardwareEh(); diff --git a/src/tests/baseservices/exceptions/simple/HardwareEh.csproj b/src/tests/baseservices/exceptions/simple/HardwareEh.csproj index 24d855e404207..4cc8189a157d5 100644 --- a/src/tests/baseservices/exceptions/simple/HardwareEh.csproj +++ b/src/tests/baseservices/exceptions/simple/HardwareEh.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj b/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj index daf76b961ccff..6a7d30e1c166b 100644 --- a/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj +++ b/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj @@ -1,6 +1,7 @@ - Exe + + true BuildOnly $(NoWarn);XUW1001 diff --git a/src/tests/baseservices/exceptions/simple/fault.il b/src/tests/baseservices/exceptions/simple/fault.il index 05a18cbb10ec5..2023450120522 100644 --- a/src/tests/baseservices/exceptions/simple/fault.il +++ b/src/tests/baseservices/exceptions/simple/fault.il @@ -11,7 +11,7 @@ .assembly 'fault' {} -.class auto ansi Fault +.class public auto ansi Fault { .method public static int32 Main() il managed { diff --git a/src/tests/baseservices/exceptions/simple/fault.ilproj b/src/tests/baseservices/exceptions/simple/fault.ilproj index 2cf8db5758170..57c9e4f3012de 100644 --- a/src/tests/baseservices/exceptions/simple/fault.ilproj +++ b/src/tests/baseservices/exceptions/simple/fault.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/exceptions/simple/finally.cs b/src/tests/baseservices/exceptions/simple/finally.cs index 44f742f82599d..772f38c130799 100644 --- a/src/tests/baseservices/exceptions/simple/finally.cs +++ b/src/tests/baseservices/exceptions/simple/finally.cs @@ -2,10 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Threading; +using Xunit; public class Finally { - public static int Main() + [Fact] + public static int TestEntryPoint() { Finally f = new Finally(); diff --git a/src/tests/baseservices/exceptions/simple/finally.csproj b/src/tests/baseservices/exceptions/simple/finally.csproj index 82656ed43dc9c..da8973186f0c5 100644 --- a/src/tests/baseservices/exceptions/simple/finally.csproj +++ b/src/tests/baseservices/exceptions/simple/finally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj index 8ee27a95a51ae..88bfcfabbeff6 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj @@ -1,6 +1,7 @@ - Exe + + true false BuildOnly $(NoWarn);XUW1001 diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs index c833bae8afc15..5556e5e35adbd 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs @@ -1,15 +1,17 @@ // 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 Xunit; namespace TestStackOverflow3 { - class Program + public class Program { private const int MAX_RECURSIVE_CALLS = 1000000; static int ctr = 0; - public static void Main() + [Fact] + public static void TestEntryPoint() { Program ex = new Program(); ex.Execute(); diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj index 343785e075ffd..16cbcb28f3d0e 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj @@ -1,6 +1,7 @@ - Exe + + true false true BuildOnly diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.csproj b/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.csproj index afed1789170b5..eb0ae0ea4cd17 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.csproj +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.csproj @@ -1,6 +1,7 @@ - Exe + + true false true diff --git a/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.csproj b/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.csproj index 83cd219165e2d..e95d83a4a700b 100644 --- a/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.csproj +++ b/src/tests/baseservices/exceptions/stacktrace/Tier1StackTrace.csproj @@ -1,6 +1,7 @@ - Exe + + true true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/Baadbaad.cs b/src/tests/baseservices/exceptions/unittests/Baadbaad.cs index e52bbb3410ffb..bf1a1214a2855 100644 --- a/src/tests/baseservices/exceptions/unittests/Baadbaad.cs +++ b/src/tests/baseservices/exceptions/unittests/Baadbaad.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; // // main @@ -22,7 +23,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/Baadbaad.csproj b/src/tests/baseservices/exceptions/unittests/Baadbaad.csproj index e756fc31ed2ee..632cf201f27c8 100644 --- a/src/tests/baseservices/exceptions/unittests/Baadbaad.csproj +++ b/src/tests/baseservices/exceptions/unittests/Baadbaad.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/BaseClass.csproj b/src/tests/baseservices/exceptions/unittests/BaseClass.csproj index b463b34d60bff..eccad761ea533 100644 --- a/src/tests/baseservices/exceptions/unittests/BaseClass.csproj +++ b/src/tests/baseservices/exceptions/unittests/BaseClass.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/CollidedUnwind.cs b/src/tests/baseservices/exceptions/unittests/CollidedUnwind.cs index af5f9c1e35b75..7566bf1302954 100644 --- a/src/tests/baseservices/exceptions/unittests/CollidedUnwind.cs +++ b/src/tests/baseservices/exceptions/unittests/CollidedUnwind.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/CollidedUnwind.csproj b/src/tests/baseservices/exceptions/unittests/CollidedUnwind.csproj index 4cc39d87a7465..36f164c783cab 100644 --- a/src/tests/baseservices/exceptions/unittests/CollidedUnwind.csproj +++ b/src/tests/baseservices/exceptions/unittests/CollidedUnwind.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/EHPatternTests.cs b/src/tests/baseservices/exceptions/unittests/EHPatternTests.cs index 7d776983079a7..c769ffbd52982 100644 --- a/src/tests/baseservices/exceptions/unittests/EHPatternTests.cs +++ b/src/tests/baseservices/exceptions/unittests/EHPatternTests.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; // // infrastructure @@ -70,7 +71,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/EHPatternTests.csproj b/src/tests/baseservices/exceptions/unittests/EHPatternTests.csproj index 1b181cd80731b..4a4a15a97e14e 100644 --- a/src/tests/baseservices/exceptions/unittests/EHPatternTests.csproj +++ b/src/tests/baseservices/exceptions/unittests/EHPatternTests.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.cs b/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.cs index 0a082f629f847..a690d0dd36717 100644 --- a/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.cs +++ b/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.csproj b/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.csproj index 91e5c74449013..2fe7fc589ebb1 100644 --- a/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.csproj +++ b/src/tests/baseservices/exceptions/unittests/GoryManagedPresent.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/GoryNativePast.cs b/src/tests/baseservices/exceptions/unittests/GoryNativePast.cs index 3dfe19d48fc3b..0cbc7b1b0efd5 100644 --- a/src/tests/baseservices/exceptions/unittests/GoryNativePast.cs +++ b/src/tests/baseservices/exceptions/unittests/GoryNativePast.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/GoryNativePast.csproj b/src/tests/baseservices/exceptions/unittests/GoryNativePast.csproj index 2a3261357586f..afce676b389df 100644 --- a/src/tests/baseservices/exceptions/unittests/GoryNativePast.csproj +++ b/src/tests/baseservices/exceptions/unittests/GoryNativePast.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/InnerFinally.csproj b/src/tests/baseservices/exceptions/unittests/InnerFinally.csproj index 25da8014c4356..7bad983015a66 100644 --- a/src/tests/baseservices/exceptions/unittests/InnerFinally.csproj +++ b/src/tests/baseservices/exceptions/unittests/InnerFinally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.cs b/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.cs index 7a730e42409f8..6d88ec09e2c6c 100644 --- a/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.cs +++ b/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.csproj b/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.csproj index b476272b7bcad..acf36a0edf78a 100644 --- a/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.csproj +++ b/src/tests/baseservices/exceptions/unittests/InnerFinallyAndCatch.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/Pending.cs b/src/tests/baseservices/exceptions/unittests/Pending.cs index ee8dc5a46c91f..57b56317cc001 100644 --- a/src/tests/baseservices/exceptions/unittests/Pending.cs +++ b/src/tests/baseservices/exceptions/unittests/Pending.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/Pending.csproj b/src/tests/baseservices/exceptions/unittests/Pending.csproj index 2f0fab40ede0d..29320fd94ffae 100644 --- a/src/tests/baseservices/exceptions/unittests/Pending.csproj +++ b/src/tests/baseservices/exceptions/unittests/Pending.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/Recurse.cs b/src/tests/baseservices/exceptions/unittests/Recurse.cs index 726672cc3fcad..5f6ea3c6d22c0 100644 --- a/src/tests/baseservices/exceptions/unittests/Recurse.cs +++ b/src/tests/baseservices/exceptions/unittests/Recurse.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/Recurse.csproj b/src/tests/baseservices/exceptions/unittests/Recurse.csproj index 7e8e154716ec8..de9574762ccdc 100644 --- a/src/tests/baseservices/exceptions/unittests/Recurse.csproj +++ b/src/tests/baseservices/exceptions/unittests/Recurse.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.cs b/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.cs index 0ac312e51837c..e3177bca0a892 100644 --- a/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.cs +++ b/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.csproj b/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.csproj index 372fc4349585e..a5068b183a8db 100644 --- a/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.csproj +++ b/src/tests/baseservices/exceptions/unittests/RecursiveRethrow.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.cs b/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.cs index 2dce0487db7e0..d0c827dd27e78 100644 --- a/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.cs +++ b/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; public class TestSet { @@ -18,7 +19,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.csproj b/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.csproj index 265001717da73..a2519153e3fe4 100644 --- a/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.csproj +++ b/src/tests/baseservices/exceptions/unittests/RecursiveThrowNew.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/RethrowAndFinally.csproj b/src/tests/baseservices/exceptions/unittests/RethrowAndFinally.csproj index 671eef71acc4f..2090649d2bfc3 100644 --- a/src/tests/baseservices/exceptions/unittests/RethrowAndFinally.csproj +++ b/src/tests/baseservices/exceptions/unittests/RethrowAndFinally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/ReturnFromCatch.csproj b/src/tests/baseservices/exceptions/unittests/ReturnFromCatch.csproj index 07e8dcee3f74d..090e4e7aa57cd 100644 --- a/src/tests/baseservices/exceptions/unittests/ReturnFromCatch.csproj +++ b/src/tests/baseservices/exceptions/unittests/ReturnFromCatch.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.cs b/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.cs index 147d77c21aa5d..14de26ea89060 100644 --- a/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.cs +++ b/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; // // main @@ -22,7 +23,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.csproj b/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.csproj index df7f3d9108cfd..e365fa5fcc15f 100644 --- a/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.csproj +++ b/src/tests/baseservices/exceptions/unittests/StrSwitchFinally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/ThrowInCatch.csproj b/src/tests/baseservices/exceptions/unittests/ThrowInCatch.csproj index 8b3c3e3439f59..2ec497f2b05ab 100644 --- a/src/tests/baseservices/exceptions/unittests/ThrowInCatch.csproj +++ b/src/tests/baseservices/exceptions/unittests/ThrowInCatch.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/ThrowInFinally.csproj b/src/tests/baseservices/exceptions/unittests/ThrowInFinally.csproj index 36ad927b89de4..14e15577eae49 100644 --- a/src/tests/baseservices/exceptions/unittests/ThrowInFinally.csproj +++ b/src/tests/baseservices/exceptions/unittests/ThrowInFinally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.cs b/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.cs index 8cc583a3f0234..093e2f08a0e72 100644 --- a/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.cs +++ b/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using Xunit; // // main @@ -22,7 +23,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.csproj b/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.csproj index 89c7b4b99edda..75c269ac553ec 100644 --- a/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.csproj +++ b/src/tests/baseservices/exceptions/unittests/ThrowInFinallyNestedInTry.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/TryCatchInFinally.csproj b/src/tests/baseservices/exceptions/unittests/TryCatchInFinally.csproj index a975081e42810..f78dc1cbf0662 100644 --- a/src/tests/baseservices/exceptions/unittests/TryCatchInFinally.csproj +++ b/src/tests/baseservices/exceptions/unittests/TryCatchInFinally.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/exceptions/unittests/baseclass.cs b/src/tests/baseservices/exceptions/unittests/baseclass.cs index dfd70a63b66a5..97526ad4ffb46 100644 --- a/src/tests/baseservices/exceptions/unittests/baseclass.cs +++ b/src/tests/baseservices/exceptions/unittests/baseclass.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.IO; +using Xunit; // // main @@ -21,7 +22,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/innerfinally.cs b/src/tests/baseservices/exceptions/unittests/innerfinally.cs index 9f41d24f2bd73..752f15e506b19 100644 --- a/src/tests/baseservices/exceptions/unittests/innerfinally.cs +++ b/src/tests/baseservices/exceptions/unittests/innerfinally.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.IO; +using Xunit; public class TestSet { @@ -17,7 +18,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/rethrowandfinally.cs b/src/tests/baseservices/exceptions/unittests/rethrowandfinally.cs index 56af9b5b7b948..de0338319693b 100644 --- a/src/tests/baseservices/exceptions/unittests/rethrowandfinally.cs +++ b/src/tests/baseservices/exceptions/unittests/rethrowandfinally.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.IO; +using Xunit; // // main @@ -21,7 +22,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/returnfromcatch.cs b/src/tests/baseservices/exceptions/unittests/returnfromcatch.cs index 93b9f97577344..75934653d7475 100644 --- a/src/tests/baseservices/exceptions/unittests/returnfromcatch.cs +++ b/src/tests/baseservices/exceptions/unittests/returnfromcatch.cs @@ -1,11 +1,13 @@ // 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 Xunit; public class TestSet { - public static int Main() + [Fact] + public static int TestEntryPoint() { int retCode = (new ReturnFromCatchTest()).Run(); if (100 == retCode) diff --git a/src/tests/baseservices/exceptions/unittests/throwincatch.cs b/src/tests/baseservices/exceptions/unittests/throwincatch.cs index 2f7b67c9de48c..877eea0dbc688 100644 --- a/src/tests/baseservices/exceptions/unittests/throwincatch.cs +++ b/src/tests/baseservices/exceptions/unittests/throwincatch.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.IO; +using Xunit; // // main @@ -21,7 +22,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/throwinfinally.cs b/src/tests/baseservices/exceptions/unittests/throwinfinally.cs index c3bcc5290297f..1360abb0d4d19 100644 --- a/src/tests/baseservices/exceptions/unittests/throwinfinally.cs +++ b/src/tests/baseservices/exceptions/unittests/throwinfinally.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.IO; +using Xunit; // // main @@ -21,7 +22,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; diff --git a/src/tests/baseservices/exceptions/unittests/trycatchinfinally.cs b/src/tests/baseservices/exceptions/unittests/trycatchinfinally.cs index 5c031d5196162..d4fe564aeed33 100644 --- a/src/tests/baseservices/exceptions/unittests/trycatchinfinally.cs +++ b/src/tests/baseservices/exceptions/unittests/trycatchinfinally.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.IO; +using Xunit; // // main @@ -21,7 +22,8 @@ static void CountResults(int testReturnValue, ref int nSuccesses, ref int nFailu } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int nSuccesses = 0; int nFailures = 0; From c91f40afcf36035967a05fd91a11fe488f05f5fa Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:07:30 +0200 Subject: [PATCH 07/31] Remove constant return value 100 from the test test448035 --- .../compilerservices/dynamicobjectproperties/test448035.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs index 77686303d7a83..3d954484711bb 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs @@ -28,7 +28,7 @@ class Test_test448035 static ConditionalWeakTable table = new ConditionalWeakTable(); - public static int Main() + public static void Main() { for (int i = 0; i < 10; i++) { @@ -37,8 +37,6 @@ public static int Main() new Test_test448035(5).ToString(); - Console.WriteLine("PASS: Test did not assert"); - return 100; + Console.WriteLine("PASS: Test did not assert"); } } - From 3dcf689e533c66cdac8abd7dd9b08bd96bfd9e96 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:10:44 +0200 Subject: [PATCH 08/31] Make UnsafeAccessorTests owner class public --- .../compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs b/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs index c524802b968be..6e0a562f32a9b 100644 --- a/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs +++ b/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs @@ -8,7 +8,7 @@ using Xunit; -static unsafe class UnsafeAccessorsTests +public static unsafe class UnsafeAccessorsTests { const string PrivateStatic = nameof(PrivateStatic); const string Private = nameof(Private); From 561ccc806c216837d12d1e6f88ac0d5d31b7f1e9 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:13:43 +0200 Subject: [PATCH 09/31] Make methods in RuntimeConfiguration/TestConfig public --- .../baseservices/RuntimeConfiguration/TestConfig.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs index 39e20b4f88593..0ca5477e4c873 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs @@ -11,14 +11,14 @@ using Xunit; -class TestConfig +public class TestConfig { const int Success = 100; const int Fail = 101; [Fact] [EnvVar("DOTNET_gcServer", "1")] - static int Verify_ServerGC_Env_Enable(string[] _) + public static int Verify_ServerGC_Env_Enable() { return GCSettings.IsServerGC ? Success @@ -27,7 +27,7 @@ static int Verify_ServerGC_Env_Enable(string[] _) [Fact] [EnvVar("DOTNET_gcServer", "0")] - static int Verify_ServerGC_Env_Disable(string[] _) + public static int Verify_ServerGC_Env_Disable() { return GCSettings.IsServerGC ? Fail @@ -36,7 +36,7 @@ static int Verify_ServerGC_Env_Disable(string[] _) [Fact] [ConfigProperty("System.GC.Server", "true")] - static int Verify_ServerGC_Prop_Enable(string[] _) + public static int Verify_ServerGC_Prop_Enable() { return GCSettings.IsServerGC ? Success @@ -45,7 +45,7 @@ static int Verify_ServerGC_Prop_Enable(string[] _) [Fact] [ConfigProperty("System.GC.Server", "false")] - static int Verify_ServerGC_Prop_Disable(string[] _) + public static int Verify_ServerGC_Prop_Disable() { return GCSettings.IsServerGC ? Fail @@ -55,7 +55,7 @@ static int Verify_ServerGC_Prop_Disable(string[] _) [Fact] [EnvVar("DOTNET_gcServer", "0")] [ConfigProperty("System.GC.Server", "true")] - static int Verify_ServerGC_Env_Override_Prop(string[] _) + public static int Verify_ServerGC_Env_Override_Prop() { return GCSettings.IsServerGC ? Fail From bd673ecc24a09cb2341fa9aa1d443e9904fce18b Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:19:09 +0200 Subject: [PATCH 10/31] Make TieredCompilation/BasicTest public --- src/tests/baseservices/TieredCompilation/BasicTest.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/tests/baseservices/TieredCompilation/BasicTest.cs b/src/tests/baseservices/TieredCompilation/BasicTest.cs index da3ee0e63d34f..2e4d37fd7f218 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest.cs +++ b/src/tests/baseservices/TieredCompilation/BasicTest.cs @@ -4,18 +4,16 @@ using System; using System.Runtime.CompilerServices; using System.Threading; +using Xunit; public static class BasicTest { - private static int Main() + [Fact] + public static void TestEntryPoint() { - const int Pass = 100; - PromoteToTier1(Foo, () => FooWithLoop(2)); Foo(); FooWithLoop(2); - - return Pass; } [MethodImpl(MethodImplOptions.NoInlining)] From d19703ab2c4ac05544930928e6bad43bd35e9086 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:21:49 +0200 Subject: [PATCH 11/31] Remove unused exit code of runmoduleconstructor --- .../compilerservices/modulector/runmoduleconstructor.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs b/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs index 389837e8e6d10..810e2fa2ab534 100644 --- a/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs +++ b/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs @@ -7,10 +7,12 @@ using System.Runtime.Loader; using System.Runtime.CompilerServices; using System.Globalization; +using Xunit; class RuntimeHelperTest { - public static int Main() + [Fact] + public static void TestEntryPoint() { AssemblyLoadContext resolver0 = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()); Assembly asm0 = resolver0.LoadFromAssemblyName(new AssemblyName("moduleCctor")); @@ -29,9 +31,5 @@ public static int Main() check.Invoke(null, final); RuntimeHelpers.RunModuleConstructor(mod.ModuleHandle); check.Invoke(null, final); - - - return 100; - } } From fe3a07af1e08e2f990ff0c41b263930a54d3258c Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:24:47 +0200 Subject: [PATCH 12/31] Remove unused exit code of RuntimeHelperTests --- .../RuntimeHelpers/RuntimeHelpersTests.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs b/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs index a9c479e7bff7c..04cc2b11f0230 100644 --- a/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs +++ b/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs @@ -2,21 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // using System; +using Xunit; class RuntimeHelpersTests { - static int Main() + [Fact] + static void TestEntryPoint() { - try - { - ExecuteCodeWithGuaranteedCleanupTest.Run(); - } - catch (Exception e) - { - Console.WriteLine(e); - return 101; - } - - return 100; + ExecuteCodeWithGuaranteedCleanupTest.Run(); } } From 32da5e860a249f649a0369f8c9a13c8fb6fe23a1 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:27:03 +0200 Subject: [PATCH 13/31] Fix visibility in multidimarray/enum test --- src/tests/baseservices/multidimmarray/enum.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/baseservices/multidimmarray/enum.cs b/src/tests/baseservices/multidimmarray/enum.cs index 47854220b32ad..9fc55eeef9108 100644 --- a/src/tests/baseservices/multidimmarray/enum.cs +++ b/src/tests/baseservices/multidimmarray/enum.cs @@ -3,7 +3,7 @@ public class Test { enum State : sbyte { OK = 0, BUG = -1 } - static int Main() + public static int Main() { TestLibrary.TestFramework.BeginTestCase("Enum MultidimmArray"); var s = new State[1, 1]; From e340f7e9382a5ac8403100fb7c1edd33999ea55f Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:29:10 +0200 Subject: [PATCH 14/31] Fix visibility in TestCallingConventions test --- src/tests/baseservices/callconvs/TestCallingConventions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/baseservices/callconvs/TestCallingConventions.cs b/src/tests/baseservices/callconvs/TestCallingConventions.cs index a3d5b5e2c83cb..3c7a4d23e5d21 100644 --- a/src/tests/baseservices/callconvs/TestCallingConventions.cs +++ b/src/tests/baseservices/callconvs/TestCallingConventions.cs @@ -164,7 +164,7 @@ static void NonblittableFunctionPointers() } } - static int Main() + public static int Main() { try { From 2fe376703eb4c1796513a4b7e36b0cf09f8cc8bf Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Fri, 1 Sep 2023 23:31:49 +0200 Subject: [PATCH 15/31] Fix visibility in CriticalFinalizer test --- src/tests/baseservices/finalization/CriticalFinalizer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/baseservices/finalization/CriticalFinalizer.cs b/src/tests/baseservices/finalization/CriticalFinalizer.cs index 9ea7d56d881a8..fe5b4a3ef072e 100644 --- a/src/tests/baseservices/finalization/CriticalFinalizer.cs +++ b/src/tests/baseservices/finalization/CriticalFinalizer.cs @@ -45,7 +45,7 @@ static void AllocateObjects(int count) GC.KeepAlive(arr); } - static int Main() + public static int Main() { const int Count = 100; From e0bacc0e2b39524e76909e652bb695543a3d9bc7 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sat, 2 Sep 2023 00:06:05 +0200 Subject: [PATCH 16/31] Simplify RuntimeConfiguration/TestConfig --- .../RuntimeConfiguration/TestConfig.cs | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs index 0ca5477e4c873..f36921f6cb65c 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs @@ -62,21 +62,6 @@ public static int Verify_ServerGC_Env_Override_Prop() : Success; } - static int Main(string[] args) - { - if (args.Length == 0) - { - return RunTests(); - } - - MethodInfo infos = typeof(TestConfig).GetMethod(args[0], BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); - if (infos is null) - { - return Fail; - } - return (int)infos.Invoke(null, new object[] { args[1..] }); - } - [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] class EnvVarAttribute : Attribute { @@ -93,7 +78,8 @@ class ConfigPropertyAttribute : Attribute public string Value { get; init; } } - static int RunTests() + [Fact] + public static void RunTests() { // clear some environment variables that we will set during the test run Environment.SetEnvironmentVariable("DOTNET_gcServer", null); @@ -142,12 +128,9 @@ static int RunTests() process.WaitForExit(); if (process.ExitCode != Success) { - Console.WriteLine($"Failed: {mi.Name}"); - return process.ExitCode; + throw new Exception($"Failed: {mi.Name}: exit code = {process.ExitCode}"); } } - - return Success; } static string GetCorerunPath() From 65d2a7a453aa6382abbf15b4f99d264b90db906d Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sat, 2 Sep 2023 00:16:01 +0200 Subject: [PATCH 17/31] Clean up TieredCompilation tests --- .../baseservices/TieredCompilation/BasicTestWithMcj.cs | 7 +++---- .../TieredCompilation/McjRecorderTimeoutBeforeStop.cs | 7 +++---- .../TieredCompilation/TieredVtableMethodTests.cs | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs index 686517e431c18..9da8edc836815 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs +++ b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs @@ -6,6 +6,7 @@ using System.Runtime.CompilerServices; using System.Text.RegularExpressions; using System.Threading; +using Xunit; public static class BasicTest { @@ -17,10 +18,9 @@ public struct MCJTestStruct { } - private static int Main() + [Fact] + public static void TestEntryPoint() { - const int Pass = 100; - ProfileOptimization.SetProfileRoot(Environment.CurrentDirectory); ProfileOptimization.StartProfile("profile.mcj"); @@ -45,7 +45,6 @@ private static int Main() FooWithGeneric(RegexOptions.IgnoreCase); ProfileOptimization.StartProfile(null); - return Pass; } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.cs b/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.cs index 14ecd4785f147..5597ad4f11222 100644 --- a/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.cs +++ b/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.cs @@ -5,13 +5,13 @@ using System.Runtime; using System.Runtime.CompilerServices; using System.Threading; +using Xunit; public static class BasicTest { - private static int Main() + [Fact] + public static void TestEntryPoint() { - const int Pass = 100; - ProfileOptimization.SetProfileRoot(Environment.CurrentDirectory); ProfileOptimization.StartProfile("profile.mcj"); @@ -23,7 +23,6 @@ private static int Main() // Stop the profile again after timeout (just verifying that it works) ProfileOptimization.StartProfile(null); - return Pass; } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs b/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs index c23ea9aa13b41..fb6dc971dc46e 100644 --- a/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs +++ b/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs @@ -15,7 +15,7 @@ public static class TieredVtableMethodTests private static StringBuilder s_expectedCallSequence = new StringBuilder(); private static StringBuilder s_actualCallSequence = new StringBuilder(); - private static int Main() + public static int Main() { const int Pass = 100, Fail = 101; From 6897201edfd567a886206c896bb885630cad0069 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sat, 2 Sep 2023 00:24:52 +0200 Subject: [PATCH 18/31] Convert istypeequivalent to use ConditionalFact clauses --- .../istypeequivalent/istypeequivalent.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs index b1da461ee4776..95cb6c5e18cf6 100644 --- a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs +++ b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs @@ -69,6 +69,7 @@ private static IEnumerable> GetTypesWhichClaimMatchingTyp } } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows))] public static void TestTypesWhichShouldMatch() { foreach (var typePair in GetTypesWhichClaimMatchingTypeIdentifiersInNamespace("TypesWhichMatch")) @@ -79,6 +80,7 @@ public static void TestTypesWhichShouldMatch() } } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows))] public static void TestTypesWhichShouldNotMatch() { foreach (var typePair in GetTypesWhichClaimMatchingTypeIdentifiersInNamespace("TypesWhichDoNotMatch")) @@ -87,18 +89,5 @@ public static void TestTypesWhichShouldNotMatch() Assert.False(typePair.Item1.IsEquivalentTo(typePair.Item2)); } } - - public static int Main() - { - if (!OperatingSystem.IsWindows()) - { - return 100; - } - - TestTypesWhichShouldMatch(); - TestTypesWhichShouldNotMatch(); - - return 100; - } } } From c72d876f9fe1960454d14c164c97b5e20608c135 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sat, 2 Sep 2023 00:31:22 +0200 Subject: [PATCH 19/31] Fix visibility in RuntimeHelpersTests --- .../compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs b/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs index 04cc2b11f0230..2f58fd6601cbb 100644 --- a/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs +++ b/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.cs @@ -4,10 +4,10 @@ using System; using Xunit; -class RuntimeHelpersTests +public class RuntimeHelpersTests { [Fact] - static void TestEntryPoint() + public static void TestEntryPoint() { ExecuteCodeWithGuaranteedCleanupTest.Run(); } From 573730a4148d07d8597ad107f387fd48e9f4b68e Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sat, 2 Sep 2023 00:34:48 +0200 Subject: [PATCH 20/31] Add CoreCLRTestLibrary as a dependency of istypeequivalent --- .../typeequivalence/istypeequivalent/istypeequivalent.cs | 2 ++ .../typeequivalence/istypeequivalent/istypeequivalent.csproj | 1 + 2 files changed, 3 insertions(+) diff --git a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs index 95cb6c5e18cf6..9d70542ff9b95 100644 --- a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs +++ b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.cs @@ -9,6 +9,8 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using TestLibrary; + using Xunit; // This test shares its logic with the managed type system test suite, and seeks to ensure the runtime agrees with it diff --git a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj index 98d6ad81b0ba9..e8319a2e187f2 100644 --- a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj +++ b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj @@ -10,6 +10,7 @@ + From c43b1d73e1834a6efbe9e9ef1e041d9b50882887 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sat, 2 Sep 2023 00:45:22 +0200 Subject: [PATCH 21/31] Fix merged behavior of test448035 --- .../compilerservices/dynamicobjectproperties/test448035.cs | 4 +++- .../dynamicobjectproperties/test448035.csproj | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs index 3d954484711bb..d6b86e3d097b7 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Runtime.CompilerServices; +using Xunit; class Test_test448035 { @@ -28,7 +29,8 @@ class Test_test448035 static ConditionalWeakTable table = new ConditionalWeakTable(); - public static void Main() + [Fact] + public static void TestEntryPoint() { for (int i = 0; i < 10; i++) { diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.csproj b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.csproj index 2c7576c6a7c3d..8e134490b5780 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.csproj +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.csproj @@ -1,6 +1,5 @@ - Exe true true 1 From c2d27d4325749e73aa97a2e67668878203dca317 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sat, 2 Sep 2023 01:42:24 +0200 Subject: [PATCH 22/31] Fix entrypoint in 305155 --- .../ilasm_ildasm/regression/vswhidbey305155/305155.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.cs b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.cs index 855c69807215f..4e93e95544104 100644 --- a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.cs +++ b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.cs @@ -1,15 +1,17 @@ // 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 Xunit; [AttributeUsage(AttributeTargets.Method)] public class MyAttribute : Attribute { - public Type[] Types; + public Type[] Types; } public class Test { - [MyAttribute(Types = new Type[]{typeof(string), typeof(void)})] - public static int Main() { return 0; } + [MyAttribute(Types = new Type[]{typeof(string), typeof(void)})] + [Fact] + public static void TestEntryPoint() { } } From e41e8f2c509735720621dd8e9f6bc0e799a2f9fc Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Sun, 3 Sep 2023 20:00:33 +0200 Subject: [PATCH 23/31] Modify TestConfig to use a separate TestConfigTester app --- .../RuntimeConfiguration/TestConfig.cs | 74 +++------------- .../RuntimeConfiguration/TestConfig.csproj | 9 +- .../RuntimeConfiguration/TestConfigTester.cs | 84 +++++++++++++++++++ .../TestConfigTester.csproj | 19 +++++ 4 files changed, 116 insertions(+), 70 deletions(-) create mode 100644 src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs create mode 100644 src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs index f36921f6cb65c..e460b34b79683 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs @@ -62,6 +62,16 @@ public static int Verify_ServerGC_Env_Override_Prop() : Success; } + static int Main(string[] args) + { + MethodInfo infos = typeof(TestConfig).GetMethod(args[0], BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); + if (infos is null) + { + return Fail; + } + return (int)infos.Invoke(null, new object[] { args[1..] }); + } + [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] class EnvVarAttribute : Attribute { @@ -78,68 +88,4 @@ class ConfigPropertyAttribute : Attribute public string Value { get; init; } } - [Fact] - public static void RunTests() - { - // clear some environment variables that we will set during the test run - Environment.SetEnvironmentVariable("DOTNET_gcServer", null); - - string corerunPath = GetCorerunPath(); - MethodInfo[] infos = typeof(TestConfig).GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); - foreach (var mi in infos) - { - var factMaybe = mi.GetCustomAttributes(typeof(FactAttribute)); - if (!factMaybe.Any()) - { - continue; - } - - using Process process = new(); - - StringBuilder arguments = new(); - var configProperties = mi.GetCustomAttributes(typeof(ConfigPropertyAttribute)); - - foreach (Attribute cp in configProperties) - { - ConfigPropertyAttribute configProp = (ConfigPropertyAttribute)cp; - arguments.Append($"-p {configProp.Name}={configProp.Value} "); - } - - arguments.Append($"\"{System.Reflection.Assembly.GetExecutingAssembly().Location}\" {mi.Name}"); - - process.StartInfo.FileName = corerunPath; - process.StartInfo.Arguments = arguments.ToString(); - - var envVariables = mi.GetCustomAttributes(typeof(EnvVarAttribute)); - foreach (string key in Environment.GetEnvironmentVariables().Keys) - { - process.StartInfo.EnvironmentVariables[key] = Environment.GetEnvironmentVariable(key); - } - - Console.WriteLine($"Running: {process.StartInfo.Arguments}"); - foreach (Attribute ev in envVariables) - { - EnvVarAttribute envVar = (EnvVarAttribute)ev; - process.StartInfo.EnvironmentVariables[envVar.Name] = envVar.Value; - Console.WriteLine($" set {envVar.Name}={envVar.Value}"); - } - - process.Start(); - process.WaitForExit(); - if (process.ExitCode != Success) - { - throw new Exception($"Failed: {mi.Name}: exit code = {process.ExitCode}"); - } - } - } - - static string GetCorerunPath() - { - string corerunName = "corerun"; - if (TestLibrary.Utilities.IsWindows) - { - corerunName += ".exe"; - } - return Path.Combine(Environment.GetEnvironmentVariable("CORE_ROOT"), corerunName); - } } diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj index efba9444477cd..e49ebfdaa693c 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj @@ -1,13 +1,10 @@ - Exe - - true - true - true + BuildOnly + $(NoWarn);XUW1001 - + diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs new file mode 100644 index 0000000000000..354c3f2fb4b8d --- /dev/null +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs @@ -0,0 +1,84 @@ +// 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.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime; +using System.Text; + +using Xunit; + +public class TestConfigTester +{ + [Fact] + public static void RunTests() + { + // clear some environment variables that we will set during the test run + Environment.SetEnvironmentVariable("DOTNET_gcServer", null); + + string testConfigApp = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestConfig.dll"); + + Assembly testConfigAssembly = Assembly.Load(testConfigApp); + MethodInfo[] infos = testConfigAssembly.GetType("TestConfig").GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); + + string corerunPath = GetCorerunPath(); + foreach (var mi in infos) + { + var factMaybe = mi.GetCustomAttributes(typeof(FactAttribute)); + if (!factMaybe.Any()) + { + continue; + } + + using Process process = new(); + + StringBuilder arguments = new(); + var configProperties = mi.GetCustomAttributes(testConfigAssembly.GetType("ConfigPropertyAttribute")); + + foreach (Attribute cp in configProperties) + { + ConfigPropertyAttribute configProp = (ConfigPropertyAttribute)cp; + arguments.Append($"-p {configProp.Name}={configProp.Value} "); + } + + arguments.Append($"\"{testConfigApp}\" {mi.Name}"); + + process.StartInfo.FileName = corerunPath; + process.StartInfo.Arguments = arguments.ToString(); + + var envVariables = mi.GetCustomAttributes(typeof(EnvVarAttribute)); + foreach (string key in Environment.GetEnvironmentVariables().Keys) + { + process.StartInfo.EnvironmentVariables[key] = Environment.GetEnvironmentVariable(key); + } + + Console.WriteLine($"Running: {process.StartInfo.Arguments}"); + foreach (Attribute ev in envVariables) + { + EnvVarAttribute envVar = (EnvVarAttribute)ev; + process.StartInfo.EnvironmentVariables[envVar.Name] = envVar.Value; + Console.WriteLine($" set {envVar.Name}={envVar.Value}"); + } + + process.Start(); + process.WaitForExit(); + if (process.ExitCode != Success) + { + throw new Exception($"Failed: {mi.Name}: exit code = {process.ExitCode}"); + } + } + } + + static string GetCorerunPath() + { + string corerunName = "corerun"; + if (TestLibrary.Utilities.IsWindows) + { + corerunName += ".exe"; + } + return Path.Combine(Environment.GetEnvironmentVariable("CORE_ROOT"), corerunName); + } +} diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj new file mode 100644 index 0000000000000..64d9558ec1c62 --- /dev/null +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj @@ -0,0 +1,19 @@ + + + + true + true + true + + + + + + + + false + Content + Always + + + From cbf24176b6c32a4a3d79d5c486b9bda27054004a Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Mon, 4 Sep 2023 14:26:46 +0200 Subject: [PATCH 24/31] Additional fixes to TestConfig / TestConfigTester --- .../RuntimeConfiguration/TestConfig.cs | 17 +++++++---------- .../RuntimeConfiguration/TestConfig.csproj | 8 ++++---- .../RuntimeConfiguration/TestConfigTester.cs | 17 ++++++++--------- .../TestConfigTester.csproj | 2 ++ 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs index e460b34b79683..3e670b37e7a76 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.cs @@ -13,10 +13,9 @@ public class TestConfig { - const int Success = 100; - const int Fail = 101; + public const int Success = 100; + public const int Fail = 101; - [Fact] [EnvVar("DOTNET_gcServer", "1")] public static int Verify_ServerGC_Env_Enable() { @@ -25,7 +24,6 @@ public static int Verify_ServerGC_Env_Enable() : Fail; } - [Fact] [EnvVar("DOTNET_gcServer", "0")] public static int Verify_ServerGC_Env_Disable() { @@ -34,7 +32,6 @@ public static int Verify_ServerGC_Env_Disable() : Success; } - [Fact] [ConfigProperty("System.GC.Server", "true")] public static int Verify_ServerGC_Prop_Enable() { @@ -43,7 +40,6 @@ public static int Verify_ServerGC_Prop_Enable() : Fail; } - [Fact] [ConfigProperty("System.GC.Server", "false")] public static int Verify_ServerGC_Prop_Disable() { @@ -52,7 +48,6 @@ public static int Verify_ServerGC_Prop_Disable() : Success; } - [Fact] [EnvVar("DOTNET_gcServer", "0")] [ConfigProperty("System.GC.Server", "true")] public static int Verify_ServerGC_Env_Override_Prop() @@ -62,6 +57,7 @@ public static int Verify_ServerGC_Env_Override_Prop() : Success; } +#if !IS_TESTER_APP static int Main(string[] args) { MethodInfo infos = typeof(TestConfig).GetMethod(args[0], BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); @@ -69,11 +65,12 @@ static int Main(string[] args) { return Fail; } - return (int)infos.Invoke(null, new object[] { args[1..] }); + return (int)infos.Invoke(null, Array.Empty()); } +#endif [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] - class EnvVarAttribute : Attribute + public class EnvVarAttribute : Attribute { public EnvVarAttribute(string name, string value) { Name = name; Value = value; } public string Name { get; init; } @@ -81,7 +78,7 @@ class EnvVarAttribute : Attribute } [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] - class ConfigPropertyAttribute : Attribute + public class ConfigPropertyAttribute : Attribute { public ConfigPropertyAttribute(string name, string value) { Name = name; Value = value; } public string Name { get; init; } diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj index e49ebfdaa693c..b703a999ea676 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj @@ -1,12 +1,12 @@ + + true BuildOnly $(NoWarn);XUW1001 + TestConfig.Main - - - - + \ No newline at end of file diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs index 354c3f2fb4b8d..c39b965c55f4e 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.cs @@ -21,14 +21,15 @@ public static void RunTests() string testConfigApp = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestConfig.dll"); - Assembly testConfigAssembly = Assembly.Load(testConfigApp); - MethodInfo[] infos = testConfigAssembly.GetType("TestConfig").GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); + MethodInfo[] infos = typeof(TestConfig).GetMethods(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); string corerunPath = GetCorerunPath(); foreach (var mi in infos) { - var factMaybe = mi.GetCustomAttributes(typeof(FactAttribute)); - if (!factMaybe.Any()) + var configProperties = mi.GetCustomAttributes(typeof(TestConfig.ConfigPropertyAttribute)); + var envVariables = mi.GetCustomAttributes(typeof(TestConfig.EnvVarAttribute)); + + if (configProperties.Count() == 0 && envVariables.Count() == 0) { continue; } @@ -36,11 +37,10 @@ public static void RunTests() using Process process = new(); StringBuilder arguments = new(); - var configProperties = mi.GetCustomAttributes(testConfigAssembly.GetType("ConfigPropertyAttribute")); foreach (Attribute cp in configProperties) { - ConfigPropertyAttribute configProp = (ConfigPropertyAttribute)cp; + TestConfig.ConfigPropertyAttribute configProp = (TestConfig.ConfigPropertyAttribute)cp; arguments.Append($"-p {configProp.Name}={configProp.Value} "); } @@ -49,7 +49,6 @@ public static void RunTests() process.StartInfo.FileName = corerunPath; process.StartInfo.Arguments = arguments.ToString(); - var envVariables = mi.GetCustomAttributes(typeof(EnvVarAttribute)); foreach (string key in Environment.GetEnvironmentVariables().Keys) { process.StartInfo.EnvironmentVariables[key] = Environment.GetEnvironmentVariable(key); @@ -58,14 +57,14 @@ public static void RunTests() Console.WriteLine($"Running: {process.StartInfo.Arguments}"); foreach (Attribute ev in envVariables) { - EnvVarAttribute envVar = (EnvVarAttribute)ev; + TestConfig.EnvVarAttribute envVar = (TestConfig.EnvVarAttribute)ev; process.StartInfo.EnvironmentVariables[envVar.Name] = envVar.Value; Console.WriteLine($" set {envVar.Name}={envVar.Value}"); } process.Start(); process.WaitForExit(); - if (process.ExitCode != Success) + if (process.ExitCode != TestConfig.Success) { throw new Exception($"Failed: {mi.Name}: exit code = {process.ExitCode}"); } diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj index 64d9558ec1c62..cd6cb09525e45 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfigTester.csproj @@ -4,9 +4,11 @@ true true true + $(DefineConstants);IS_TESTER_APP + From d30f9c6edbc9ff16921c3bf28556771e2b021eff Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Mon, 4 Sep 2023 22:30:08 +0200 Subject: [PATCH 25/31] Mechanically merge all remaining tests under baseservices --- src/tests/baseservices/CET/CheckCETPresence.cs | 6 ++++-- src/tests/baseservices/CET/CheckCETPresence.csproj | 1 - src/tests/baseservices/Directory.Build.props | 11 +++++++++++ .../TieredCompilation/BasicTestWithMcj.csproj | 3 ++- .../TieredCompilation/BasicTest_DefaultMode.csproj | 3 ++- .../BasicTest_DefaultMode_R2r.csproj | 3 ++- .../BasicTest_QuickJitForLoopsOff.csproj | 3 ++- .../BasicTest_QuickJitForLoopsOff_R2r.csproj | 3 ++- .../BasicTest_QuickJitForLoopsOn.csproj | 3 ++- .../BasicTest_QuickJitForLoopsOn_R2r.csproj | 3 ++- .../TieredCompilation/BasicTest_QuickJitOff.csproj | 3 ++- .../BasicTest_QuickJitOff_R2r.csproj | 3 ++- .../TieredCompilation/BasicTest_QuickJitOn.csproj | 3 ++- .../TieredCompilation/BasicTest_QuickJitOn_R2r.csproj | 3 ++- .../McjRecorderTimeoutBeforeStop.csproj | 3 ++- .../TieredCompilation/TieredVtableMethodTests.cs | 4 +++- .../TieredCompilation/TieredVtableMethodTests.csproj | 3 ++- src/tests/baseservices/baseservices.csproj | 9 +++++++++ .../baseservices/callconvs/TestCallingConventions.cs | 5 +++-- .../callconvs/TestCallingConventions.csproj | 3 ++- .../FixedAddressValueType/FixedAddressValueType.cs | 4 +++- .../FixedAddressValueType.csproj | 3 ++- .../DefaultImplementationsOfInterfaces.il | 4 ++-- .../DefaultImplementationsOfInterfaces.ilproj | 3 ++- .../RuntimeHelpers/RuntimeHelpersTests.csproj | 3 ++- .../RuntimeWrappedException.cs | 6 ++++-- .../RuntimeWrappedException.csproj | 3 ++- .../UnsafeAccessors/UnsafeAccessorsTests.csproj | 3 ++- .../dynamicobjectproperties/Dev10_535767.csproj | 3 ++- .../dynamicobjectproperties/TestAPIs.csproj | 3 ++- .../dynamicobjectproperties/TestGC.csproj | 3 ++- .../dynamicobjectproperties/TestOverrides.csproj | 3 ++- .../dynamicobjectproperties/dev10_535767.cs | 6 ++++-- .../dynamicobjectproperties/test448035.cs | 2 +- .../dynamicobjectproperties/testapis.cs | 4 +++- .../dynamicobjectproperties/testgc.cs | 4 +++- .../dynamicobjectproperties/testoverrides.cs | 4 +++- .../modulector/runmoduleconstructor.cs | 2 +- .../modulector/runmoduleconstructor.csproj | 3 ++- .../baseservices/finalization/CriticalFinalizer.cs | 6 ++++-- .../finalization/CriticalFinalizer.csproj | 3 ++- src/tests/baseservices/finalization/Finalizer.csproj | 3 ++- src/tests/baseservices/finalization/finalizer.cs | 4 +++- .../invalid_operations/InvalidOperations.csproj | 3 ++- src/tests/baseservices/mono/runningmono.cs | 6 ++++-- src/tests/baseservices/mono/runningmono.csproj | 3 ++- src/tests/baseservices/multidimmarray/enum.cs | 4 +++- src/tests/baseservices/multidimmarray/rank1array.il | 6 ++++++ .../baseservices/multidimmarray/rank1array.ilproj | 3 ++- .../istypeequivalent/istypeequivalent.csproj | 3 ++- .../typeequivalence/signatures/nopiatestil.il | 6 +++++- .../typeequivalence/signatures/nopiatestil.ilproj | 3 ++- .../baseservices/typeequivalence/simple/Simple.cs | 3 ++- .../baseservices/typeequivalence/simple/Simple.csproj | 3 ++- src/tests/baseservices/varargs/varargsupport.il | 2 +- src/tests/baseservices/varargs/varargsupport.ilproj | 3 ++- src/tests/baseservices/varargs/varargsupport_r.ilproj | 3 ++- 57 files changed, 150 insertions(+), 61 deletions(-) create mode 100644 src/tests/baseservices/Directory.Build.props create mode 100644 src/tests/baseservices/baseservices.csproj diff --git a/src/tests/baseservices/CET/CheckCETPresence.cs b/src/tests/baseservices/CET/CheckCETPresence.cs index 656fcadfb7cfd..80e5c71994e2d 100644 --- a/src/tests/baseservices/CET/CheckCETPresence.cs +++ b/src/tests/baseservices/CET/CheckCETPresence.cs @@ -3,13 +3,15 @@ using System; using System.Runtime.InteropServices; +using Xunit; -static class Program +public static class Program { [DllImport("cet_check.dll")] private static extern long ReadShadowStackPointer(); - public static int Main() + [Fact] + public static int TestEntryPoint() { Console.WriteLine("Checking whether codeflow enforcement technology (CET) is active"); long ssp = ReadShadowStackPointer(); diff --git a/src/tests/baseservices/CET/CheckCETPresence.csproj b/src/tests/baseservices/CET/CheckCETPresence.csproj index 845ff56e1c787..d864079636c4e 100644 --- a/src/tests/baseservices/CET/CheckCETPresence.csproj +++ b/src/tests/baseservices/CET/CheckCETPresence.csproj @@ -1,6 +1,5 @@ - Exe true true true diff --git a/src/tests/baseservices/Directory.Build.props b/src/tests/baseservices/Directory.Build.props new file mode 100644 index 0000000000000..17e80030ca09d --- /dev/null +++ b/src/tests/baseservices/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + + + true + $(NoWarn);xUnit1013 + false + + diff --git a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj index 250dbf3c13a6c..99d55c3191749 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode.csproj index 5f828af2b9e9c..c963cba21c249 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode_R2r.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode_R2r.csproj index f19143ec5f3ac..374da8ac31d9c 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode_R2r.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_DefaultMode_R2r.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff.csproj index e160b9df92178..393859d3b9c4e 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff_R2r.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff_R2r.csproj index 5557b2830b7bb..04bc1888b98a1 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff_R2r.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOff_R2r.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn.csproj index 50d2d2858c375..1c35491adb546 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn_R2r.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn_R2r.csproj index a7c9ee4f35078..37fd659a83f33 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn_R2r.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitForLoopsOn_R2r.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff.csproj index 060be598945ab..59fd5e8387d98 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff_R2r.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff_R2r.csproj index 228e1f1d40dc6..be0bdfc8cda7b 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff_R2r.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOff_R2r.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn.csproj index c95590e4124f5..253708ecbef7b 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn_R2r.csproj b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn_R2r.csproj index 7dbf41084b4b1..a12825576b507 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn_R2r.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTest_QuickJitOn_R2r.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.csproj b/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.csproj index 2c26b6cb44e32..7ac48baaae711 100644 --- a/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.csproj +++ b/src/tests/baseservices/TieredCompilation/McjRecorderTimeoutBeforeStop.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs b/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs index fb6dc971dc46e..c0278fa9380ec 100644 --- a/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs +++ b/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.cs @@ -7,6 +7,7 @@ using System.Runtime.CompilerServices; using System.Text; using System.Threading; +using Xunit; public static class TieredVtableMethodTests { @@ -15,7 +16,8 @@ public static class TieredVtableMethodTests private static StringBuilder s_expectedCallSequence = new StringBuilder(); private static StringBuilder s_actualCallSequence = new StringBuilder(); - public static int Main() + [Fact] + public static int TestEntryPoint() { const int Pass = 100, Fail = 101; diff --git a/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.csproj b/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.csproj index 2b5b366f0c494..b0f01b0888d66 100644 --- a/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.csproj +++ b/src/tests/baseservices/TieredCompilation/TieredVtableMethodTests.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/baseservices/baseservices.csproj b/src/tests/baseservices/baseservices.csproj new file mode 100644 index 0000000000000..dd7dd0282c4fd --- /dev/null +++ b/src/tests/baseservices/baseservices.csproj @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/tests/baseservices/callconvs/TestCallingConventions.cs b/src/tests/baseservices/callconvs/TestCallingConventions.cs index 3c7a4d23e5d21..ad8b08d0bf153 100644 --- a/src/tests/baseservices/callconvs/TestCallingConventions.cs +++ b/src/tests/baseservices/callconvs/TestCallingConventions.cs @@ -8,7 +8,7 @@ using Xunit; -unsafe class Program +public unsafe class Program { static void BlittableFunctionPointers() { @@ -164,7 +164,8 @@ static void NonblittableFunctionPointers() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/callconvs/TestCallingConventions.csproj b/src/tests/baseservices/callconvs/TestCallingConventions.csproj index 03690f9d71f88..700e6519daf3e 100644 --- a/src/tests/baseservices/callconvs/TestCallingConventions.csproj +++ b/src/tests/baseservices/callconvs/TestCallingConventions.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.cs b/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.cs index 56667c70cd292..f4a6b9acd549c 100644 --- a/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.cs +++ b/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; +using Xunit; public struct Age { @@ -27,7 +28,8 @@ public static unsafe IntPtr AddressOfFixedAge() public class Example { - public static int Main() + [Fact] + public static int TestEntryPoint() { for (int i = 0; i < 1000; i++) { diff --git a/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.csproj b/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.csproj index c70abc72c2df4..d0fa5a21b68ad 100644 --- a/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.csproj +++ b/src/tests/baseservices/compilerservices/FixedAddressValueType/FixedAddressValueType.csproj @@ -1,6 +1,7 @@ - Exe + + true true true 1 diff --git a/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.il b/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.il index 69d58572e5f3e..8e9d81d694c4c 100644 --- a/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.il +++ b/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.il @@ -12,7 +12,7 @@ .assembly DefaultImplementationsOfInterfaces{} -.class interface private abstract auto ansi DefaultInterface +.class interface public abstract auto ansi DefaultInterface { .method public hidebysig newslot virtual instance void Method() cil managed @@ -56,7 +56,7 @@ ret } -.method private hidebysig static int32 +.method public hidebysig static int32 Main() cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( diff --git a/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.ilproj b/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.ilproj index 7b2b6debb2189..bd3ee9c5f9a24 100644 --- a/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.ilproj +++ b/src/tests/baseservices/compilerservices/RuntimeFeature/DefaultImplementationsOfInterfaces.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.csproj b/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.csproj index 64124a2fd04bd..1b9be34499d87 100644 --- a/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.csproj +++ b/src/tests/baseservices/compilerservices/RuntimeHelpers/RuntimeHelpersTests.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs b/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs index 449bc5904eda0..3dae0c3837131 100644 --- a/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs +++ b/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.cs @@ -5,10 +5,12 @@ using System.IO; using System.Runtime.CompilerServices; using System.Runtime.Serialization; +using Xunit; -class Test +public class Test { - public static int Main() + [Fact] + public static int TestEntryPoint() { int retVal = 0; var thrower = new StringThrowerClass(); diff --git a/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.csproj b/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.csproj index ac0e4264f9575..e5ccd9e668e2b 100644 --- a/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.csproj +++ b/src/tests/baseservices/compilerservices/RuntimeWrappedException/RuntimeWrappedException.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.csproj b/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.csproj index 98cadb5e8d61d..876d006ea96eb 100644 --- a/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.csproj +++ b/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/Dev10_535767.csproj b/src/tests/baseservices/compilerservices/dynamicobjectproperties/Dev10_535767.csproj index 0d42acb01fca0..953c5ad72a9ce 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/Dev10_535767.csproj +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/Dev10_535767.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 true diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestAPIs.csproj b/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestAPIs.csproj index 5afee4c900353..7b1103ae0577a 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestAPIs.csproj +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestAPIs.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestGC.csproj b/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestGC.csproj index 24f322e486ed5..c14a5a1fb8794 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestGC.csproj +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestGC.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestOverrides.csproj b/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestOverrides.csproj index 09d4a509a9f85..f01a592dfedb9 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestOverrides.csproj +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/TestOverrides.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/dev10_535767.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/dev10_535767.cs index a96ff4e444753..8a89599ad9393 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/dev10_535767.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/dev10_535767.cs @@ -41,6 +41,7 @@ using System; using System.Runtime.CompilerServices; +using Xunit; // How we assign nodes to dependent handles. enum TableStyle @@ -357,10 +358,11 @@ public Node(TestSet owner, int id) } // The test class itself. -class DhTest1 +public class DhTest1 { // Entry point. - public static int Main() + [Fact] + public static int TestEntryPoint() { // The actual test runs are controlled from RunTest. True is returned if all succeeded, false // otherwise. diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs index d6b86e3d097b7..ce8d837cb2324 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/test448035.cs @@ -4,7 +4,7 @@ using System.Runtime.CompilerServices; using Xunit; -class Test_test448035 +public class Test_test448035 { int countdown; diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs index 842db1275b972..cf05613f0aa5d 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testapis.cs @@ -3,6 +3,7 @@ using System; using System.Runtime.CompilerServices; using System.Collections.Generic; +using Xunit; public class Driver where K : class @@ -438,7 +439,8 @@ public static void NoDefaulConstructor() public class TestAPIs { - public static int Main() + [Fact] + public static int TestEntryPoint() { Random r = new Random(); diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testgc.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testgc.cs index 4d79dbf142b57..152474ffa96d6 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testgc.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testgc.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.CompilerServices; +using Xunit; public class TestGC { @@ -235,7 +236,8 @@ public static void TestKeyWithOutsideReferences_Pass2(int length) GC.KeepAlive(tbl); } - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs index e338e546c379d..4981977698a50 100644 --- a/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs +++ b/src/tests/baseservices/compilerservices/dynamicobjectproperties/testoverrides.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Runtime.CompilerServices; +using Xunit; public class AKey { @@ -66,7 +67,8 @@ public static void TestOverrides() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs b/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs index 810e2fa2ab534..c3aa069342461 100644 --- a/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs +++ b/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.cs @@ -9,7 +9,7 @@ using System.Globalization; using Xunit; -class RuntimeHelperTest +public class RuntimeHelperTest { [Fact] public static void TestEntryPoint() diff --git a/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.csproj b/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.csproj index eedec9c2e8c30..489a746dbc7e7 100644 --- a/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.csproj +++ b/src/tests/baseservices/compilerservices/modulector/runmoduleconstructor.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/finalization/CriticalFinalizer.cs b/src/tests/baseservices/finalization/CriticalFinalizer.cs index fe5b4a3ef072e..74ebeb93a39ae 100644 --- a/src/tests/baseservices/finalization/CriticalFinalizer.cs +++ b/src/tests/baseservices/finalization/CriticalFinalizer.cs @@ -9,6 +9,7 @@ using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Threading.Tasks; +using Xunit; class Normal { @@ -29,7 +30,7 @@ class Critical : CriticalFinalizerObject } } -static class CriticalFinalizerTest +public static class CriticalFinalizerTest { [MethodImpl(MethodImplOptions.NoInlining)] static void AllocateObjects(int count) @@ -45,7 +46,8 @@ static void AllocateObjects(int count) GC.KeepAlive(arr); } - public static int Main() + [Fact] + public static int TestEntryPoint() { const int Count = 100; diff --git a/src/tests/baseservices/finalization/CriticalFinalizer.csproj b/src/tests/baseservices/finalization/CriticalFinalizer.csproj index d83ad37e49f1d..e03c3e97ad927 100644 --- a/src/tests/baseservices/finalization/CriticalFinalizer.csproj +++ b/src/tests/baseservices/finalization/CriticalFinalizer.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/baseservices/finalization/Finalizer.csproj b/src/tests/baseservices/finalization/Finalizer.csproj index c7e6026192a4c..5bda113e2e77e 100644 --- a/src/tests/baseservices/finalization/Finalizer.csproj +++ b/src/tests/baseservices/finalization/Finalizer.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/finalization/finalizer.cs b/src/tests/baseservices/finalization/finalizer.cs index fbfcfd16cdcf8..8f068226286e2 100644 --- a/src/tests/baseservices/finalization/finalizer.cs +++ b/src/tests/baseservices/finalization/finalizer.cs @@ -1,6 +1,7 @@ // 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 Xunit; /* public interface IFinalize @@ -121,7 +122,8 @@ public Gen() { } public class Test { - public static int Main() + [Fact] + public static int TestEntryPoint() { return (new Test()).RunTest(); } diff --git a/src/tests/baseservices/invalid_operations/InvalidOperations.csproj b/src/tests/baseservices/invalid_operations/InvalidOperations.csproj index 3c04f092ae83c..5f4c03e91ae11 100644 --- a/src/tests/baseservices/invalid_operations/InvalidOperations.csproj +++ b/src/tests/baseservices/invalid_operations/InvalidOperations.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/baseservices/mono/runningmono.cs b/src/tests/baseservices/mono/runningmono.cs index 9ccbcce11f98a..eb897f04a95c0 100644 --- a/src/tests/baseservices/mono/runningmono.cs +++ b/src/tests/baseservices/mono/runningmono.cs @@ -1,12 +1,14 @@ // 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 Xunit; namespace TestRunningMono { - class Program + public class Program { - public static int Main() + [Fact] + public static int TestEntryPoint() { const int Pass = 100, Fail = 1; bool isMono = typeof(object).Assembly.GetType("Mono.RuntimeStructs") != null; diff --git a/src/tests/baseservices/mono/runningmono.csproj b/src/tests/baseservices/mono/runningmono.csproj index c0a224c4f4b6e..725b48bf011a9 100644 --- a/src/tests/baseservices/mono/runningmono.csproj +++ b/src/tests/baseservices/mono/runningmono.csproj @@ -1,6 +1,7 @@ - Exe + + true false diff --git a/src/tests/baseservices/multidimmarray/enum.cs b/src/tests/baseservices/multidimmarray/enum.cs index 9fc55eeef9108..334d42cd0d5da 100644 --- a/src/tests/baseservices/multidimmarray/enum.cs +++ b/src/tests/baseservices/multidimmarray/enum.cs @@ -1,9 +1,11 @@ using System; +using Xunit; public class Test { enum State : sbyte { OK = 0, BUG = -1 } - public static int Main() + [Fact] + public static int TestEntryPoint() { TestLibrary.TestFramework.BeginTestCase("Enum MultidimmArray"); var s = new State[1, 1]; diff --git a/src/tests/baseservices/multidimmarray/rank1array.il b/src/tests/baseservices/multidimmarray/rank1array.il index 87da32f58d4ee..b1b88daa2e210 100644 --- a/src/tests/baseservices/multidimmarray/rank1array.il +++ b/src/tests/baseservices/multidimmarray/rank1array.il @@ -7,6 +7,7 @@ // at the expected memory locations. .assembly extern mscorlib { } +.assembly extern xunit.core {} .assembly rank1array { @@ -16,8 +17,12 @@ .subsystem 0x0003 .corflags 0x00000001 +.class public auto ansi rank1array { .method public hidebysig static int32 Main () cil managed { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .locals init( [0] int32[] szArray, [1] int32[0...] mdArray @@ -157,3 +162,4 @@ DifferentTypes: ldc.i4 100 ret } +} diff --git a/src/tests/baseservices/multidimmarray/rank1array.ilproj b/src/tests/baseservices/multidimmarray/rank1array.ilproj index 6ae890d52b5b7..a38eac100374a 100644 --- a/src/tests/baseservices/multidimmarray/rank1array.ilproj +++ b/src/tests/baseservices/multidimmarray/rank1array.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj index e8319a2e187f2..613497ba04ffe 100644 --- a/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj +++ b/src/tests/baseservices/typeequivalence/istypeequivalent/istypeequivalent.csproj @@ -1,6 +1,7 @@ - Exe + + true True true diff --git a/src/tests/baseservices/typeequivalence/signatures/nopiatestil.il b/src/tests/baseservices/typeequivalence/signatures/nopiatestil.il index 3ffaed86f8a6e..0847732bae440 100644 --- a/src/tests/baseservices/typeequivalence/signatures/nopiatestil.il +++ b/src/tests/baseservices/typeequivalence/signatures/nopiatestil.il @@ -10,6 +10,7 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } +.assembly extern xunit.core {} .assembly extern testclassesil { .ver 0:0:0:0 @@ -952,8 +953,11 @@ IL_004d: ret } // end of method Program::Test14 - .method private hidebysig static int32 Main(string[] args) cil managed noinlining + .method public hidebysig static int32 Main(string[] args) cil managed noinlining { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint // Code size 249 (0xf9) .maxstack 2 diff --git a/src/tests/baseservices/typeequivalence/signatures/nopiatestil.ilproj b/src/tests/baseservices/typeequivalence/signatures/nopiatestil.ilproj index c11566357a244..605c52ed5cc21 100644 --- a/src/tests/baseservices/typeequivalence/signatures/nopiatestil.ilproj +++ b/src/tests/baseservices/typeequivalence/signatures/nopiatestil.ilproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/baseservices/typeequivalence/simple/Simple.cs b/src/tests/baseservices/typeequivalence/simple/Simple.cs index 7595199a120e1..a5bc9a0984780 100644 --- a/src/tests/baseservices/typeequivalence/simple/Simple.cs +++ b/src/tests/baseservices/typeequivalence/simple/Simple.cs @@ -285,7 +285,8 @@ private static void TestCastsOptimizations() EquivalentValueType inst = (EquivalentValueType)otherEquivalentValueTypeInstance; } - public static int Main() + [Fact] + public static int TestEntryPoint() { if (!OperatingSystem.IsWindows()) { diff --git a/src/tests/baseservices/typeequivalence/simple/Simple.csproj b/src/tests/baseservices/typeequivalence/simple/Simple.csproj index 39d83e32fccd4..44ffe34dd5291 100644 --- a/src/tests/baseservices/typeequivalence/simple/Simple.csproj +++ b/src/tests/baseservices/typeequivalence/simple/Simple.csproj @@ -1,6 +1,7 @@ - Exe + + true True true diff --git a/src/tests/baseservices/varargs/varargsupport.il b/src/tests/baseservices/varargs/varargsupport.il index 8d330c5136cdf..05e5395c8e6de 100644 --- a/src/tests/baseservices/varargs/varargsupport.il +++ b/src/tests/baseservices/varargs/varargsupport.il @@ -15,7 +15,7 @@ } .namespace App { - .class auto ansi Foo extends [mscorlib]System.Object + .class public auto ansi Foo extends [mscorlib]System.Object { .field private class System.String text .method family newslot virtual instance vararg class App.Foo VargFunc() il managed diff --git a/src/tests/baseservices/varargs/varargsupport.ilproj b/src/tests/baseservices/varargs/varargsupport.ilproj index aa8a12e3192a7..3e92be6b1690b 100644 --- a/src/tests/baseservices/varargs/varargsupport.ilproj +++ b/src/tests/baseservices/varargs/varargsupport.ilproj @@ -1,6 +1,7 @@ - Exe + + true Full diff --git a/src/tests/baseservices/varargs/varargsupport_r.ilproj b/src/tests/baseservices/varargs/varargsupport_r.ilproj index 6a144ab08286f..845415d02427d 100644 --- a/src/tests/baseservices/varargs/varargsupport_r.ilproj +++ b/src/tests/baseservices/varargs/varargsupport_r.ilproj @@ -1,6 +1,7 @@ - Exe + + true From 02ffa1712731ae053da0347f19c7313d7c7c6e5f Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Tue, 5 Sep 2023 21:13:23 +0200 Subject: [PATCH 26/31] Fix BasicTestWithMcj, address initial Mark's PR feedback --- .../baseservices/RuntimeConfiguration/TestConfig.csproj | 2 +- .../baseservices/TieredCompilation/BasicTestWithMcj.cs | 8 +++++--- .../TieredCompilation/BasicTestWithMcj.csproj | 5 +++++ .../WindowsEventLog/WindowsEventLog_TargetUnix.csproj | 3 +++ .../WindowsEventLog/WindowsEventLog_TargetWindows.csproj | 3 +++ .../baseservices/exceptions/simple/ParallelCrash.csproj | 4 ++-- .../exceptions/stackoverflow/stackoverflow.csproj | 7 ++++--- 7 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj index b703a999ea676..702c661e7972e 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj @@ -2,8 +2,8 @@ true + false BuildOnly - $(NoWarn);XUW1001 TestConfig.Main diff --git a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs index 9da8edc836815..c34d133a2af8d 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs +++ b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.cs @@ -6,7 +6,6 @@ using System.Runtime.CompilerServices; using System.Text.RegularExpressions; using System.Threading; -using Xunit; public static class BasicTest { @@ -18,9 +17,10 @@ public struct MCJTestStruct { } - [Fact] - public static void TestEntryPoint() + public static int Main() { + const int Pass = 100; + ProfileOptimization.SetProfileRoot(Environment.CurrentDirectory); ProfileOptimization.StartProfile("profile.mcj"); @@ -45,6 +45,8 @@ public static void TestEntryPoint() FooWithGeneric(RegexOptions.IgnoreCase); ProfileOptimization.StartProfile(null); + + return Pass; } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj index 99d55c3191749..e04e74d55b327 100644 --- a/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj +++ b/src/tests/baseservices/TieredCompilation/BasicTestWithMcj.csproj @@ -1,7 +1,12 @@ + + true + Exe + false + true true diff --git a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj index a4de5fa2d2f8f..78088fac857eb 100644 --- a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj +++ b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetUnix.csproj @@ -1,7 +1,10 @@ + true + false + true true diff --git a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj index 4ce10d22ed21d..29b8bbdb92cf7 100644 --- a/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj +++ b/src/tests/baseservices/exceptions/WindowsEventLog/WindowsEventLog_TargetWindows.csproj @@ -1,7 +1,10 @@ + true + false + WINDOWS true diff --git a/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj b/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj index 6a7d30e1c166b..1dd852e59d8a2 100644 --- a/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj +++ b/src/tests/baseservices/exceptions/simple/ParallelCrash.csproj @@ -1,9 +1,9 @@ - + true + false BuildOnly - $(NoWarn);XUW1001 diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj index 88bfcfabbeff6..e75283a0f2d0f 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj @@ -1,10 +1,11 @@ - + true - false + false BuildOnly - $(NoWarn);XUW1001 + + false From c9854b29ccea8775e4ea570c2d2f6ce50a25b16a Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Tue, 5 Sep 2023 22:00:43 +0200 Subject: [PATCH 27/31] Remove superfluous OutputType=Library annotations per Marks' PR feedback --- src/tests/baseservices/callconvs/CallFunctionPointers.ilproj | 3 --- .../RuntimeWrappedException/StringThrower.ilproj | 3 --- .../compilerservices/modulector/moduleCctor.ilproj | 3 --- .../exceptions/regressions/v4.0/640474/other.csproj | 1 - .../exceptions/regressions/whidbeym3.3/302680/data.csproj | 1 - src/tests/baseservices/exceptions/simple/ILHelper.ilproj | 1 - src/tests/baseservices/exceptions/simple/VT.ilproj | 1 - .../baseservices/ilasm_ildasm/regression/dd130885/xlib.csproj | 1 - .../ilasm_ildasm/regression/vswhidbey267905/267905.csproj | 1 - .../ilasm_ildasm/regression/vswhidbey305155/305155.csproj | 1 - .../ilasm_ildasm/regression/vswhidbey395914/395914.csproj | 1 - src/tests/baseservices/multidimmarray/enum.csproj | 1 - .../typeequivalence/contracts/TypeContracts.csproj | 3 --- src/tests/baseservices/typeequivalence/impl/PunningLib.ilproj | 3 --- src/tests/baseservices/typeequivalence/impl/TypeImpl.csproj | 3 --- .../istypeequivalent/typeequivalenttypes_1.csproj | 1 - .../istypeequivalent/typeequivalenttypes_2.csproj | 1 - src/tests/baseservices/typeequivalence/pia/PIAContract.csproj | 3 --- .../typeequivalence/signatures/basetestclassesil.ilproj | 3 --- .../typeequivalence/signatures/testclassesil.ilproj | 3 --- 20 files changed, 38 deletions(-) diff --git a/src/tests/baseservices/callconvs/CallFunctionPointers.ilproj b/src/tests/baseservices/callconvs/CallFunctionPointers.ilproj index b2aad8af6d976..e7220aa28403a 100644 --- a/src/tests/baseservices/callconvs/CallFunctionPointers.ilproj +++ b/src/tests/baseservices/callconvs/CallFunctionPointers.ilproj @@ -1,7 +1,4 @@ - - library - diff --git a/src/tests/baseservices/compilerservices/RuntimeWrappedException/StringThrower.ilproj b/src/tests/baseservices/compilerservices/RuntimeWrappedException/StringThrower.ilproj index d16d855aa32b9..a9774833fc180 100644 --- a/src/tests/baseservices/compilerservices/RuntimeWrappedException/StringThrower.ilproj +++ b/src/tests/baseservices/compilerservices/RuntimeWrappedException/StringThrower.ilproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/baseservices/compilerservices/modulector/moduleCctor.ilproj b/src/tests/baseservices/compilerservices/modulector/moduleCctor.ilproj index 9b614c7ab4e4c..081b39f14a101 100644 --- a/src/tests/baseservices/compilerservices/modulector/moduleCctor.ilproj +++ b/src/tests/baseservices/compilerservices/modulector/moduleCctor.ilproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/baseservices/exceptions/regressions/v4.0/640474/other.csproj b/src/tests/baseservices/exceptions/regressions/v4.0/640474/other.csproj index 1c438ffcd81d6..5d6118207a781 100644 --- a/src/tests/baseservices/exceptions/regressions/v4.0/640474/other.csproj +++ b/src/tests/baseservices/exceptions/regressions/v4.0/640474/other.csproj @@ -1,6 +1,5 @@ - Library true 1 diff --git a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/data.csproj b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/data.csproj index 08a600aeb34b6..7eeb67cd518d1 100644 --- a/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/data.csproj +++ b/src/tests/baseservices/exceptions/regressions/whidbeym3.3/302680/data.csproj @@ -1,6 +1,5 @@ - Library true 1 diff --git a/src/tests/baseservices/exceptions/simple/ILHelper.ilproj b/src/tests/baseservices/exceptions/simple/ILHelper.ilproj index 1a2ddde67f37a..73432dd63ba3e 100644 --- a/src/tests/baseservices/exceptions/simple/ILHelper.ilproj +++ b/src/tests/baseservices/exceptions/simple/ILHelper.ilproj @@ -1,6 +1,5 @@ - Library 1 diff --git a/src/tests/baseservices/exceptions/simple/VT.ilproj b/src/tests/baseservices/exceptions/simple/VT.ilproj index 125b5b3dc9d33..b5f8733125615 100644 --- a/src/tests/baseservices/exceptions/simple/VT.ilproj +++ b/src/tests/baseservices/exceptions/simple/VT.ilproj @@ -1,6 +1,5 @@ - Library 1 diff --git a/src/tests/baseservices/ilasm_ildasm/regression/dd130885/xlib.csproj b/src/tests/baseservices/ilasm_ildasm/regression/dd130885/xlib.csproj index ba262fdf64537..dfcb9f6049304 100644 --- a/src/tests/baseservices/ilasm_ildasm/regression/dd130885/xlib.csproj +++ b/src/tests/baseservices/ilasm_ildasm/regression/dd130885/xlib.csproj @@ -1,6 +1,5 @@ - Library true 1 diff --git a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey267905/267905.csproj b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey267905/267905.csproj index 9130940e5a203..abe22bd3f26bc 100644 --- a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey267905/267905.csproj +++ b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey267905/267905.csproj @@ -1,6 +1,5 @@ - Library true 1 diff --git a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.csproj b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.csproj index e7e263fdac51d..99197643a749e 100644 --- a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.csproj +++ b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey305155/305155.csproj @@ -1,6 +1,5 @@ - Library true 1 diff --git a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey395914/395914.csproj b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey395914/395914.csproj index 81d07bb2bcc94..811322f9e3e22 100644 --- a/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey395914/395914.csproj +++ b/src/tests/baseservices/ilasm_ildasm/regression/vswhidbey395914/395914.csproj @@ -1,6 +1,5 @@ - Library true 1 diff --git a/src/tests/baseservices/multidimmarray/enum.csproj b/src/tests/baseservices/multidimmarray/enum.csproj index 72652f8430d8c..197d4cc60200e 100644 --- a/src/tests/baseservices/multidimmarray/enum.csproj +++ b/src/tests/baseservices/multidimmarray/enum.csproj @@ -1,6 +1,5 @@ - Library true 1 diff --git a/src/tests/baseservices/typeequivalence/contracts/TypeContracts.csproj b/src/tests/baseservices/typeequivalence/contracts/TypeContracts.csproj index 306758e5a5b85..8ee9620d55331 100644 --- a/src/tests/baseservices/typeequivalence/contracts/TypeContracts.csproj +++ b/src/tests/baseservices/typeequivalence/contracts/TypeContracts.csproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/baseservices/typeequivalence/impl/PunningLib.ilproj b/src/tests/baseservices/typeequivalence/impl/PunningLib.ilproj index 63831e07c6df9..8b878f563fb13 100644 --- a/src/tests/baseservices/typeequivalence/impl/PunningLib.ilproj +++ b/src/tests/baseservices/typeequivalence/impl/PunningLib.ilproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/baseservices/typeequivalence/impl/TypeImpl.csproj b/src/tests/baseservices/typeequivalence/impl/TypeImpl.csproj index b916b70076098..a135d5a48238c 100644 --- a/src/tests/baseservices/typeequivalence/impl/TypeImpl.csproj +++ b/src/tests/baseservices/typeequivalence/impl/TypeImpl.csproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_1.csproj b/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_1.csproj index 4c57dbcc522ad..88b1833d02c97 100644 --- a/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_1.csproj +++ b/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_1.csproj @@ -1,6 +1,5 @@ - Library $(DefineConstants);TYPEEQUIVALENCEASSEMBLY_1 true diff --git a/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_2.csproj b/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_2.csproj index fe9e2a475dfbe..462d5246fcdc3 100644 --- a/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_2.csproj +++ b/src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_2.csproj @@ -1,6 +1,5 @@ - Library $(DefineConstants);TYPEEQUIVALENCEASSEMBLY_2 true diff --git a/src/tests/baseservices/typeequivalence/pia/PIAContract.csproj b/src/tests/baseservices/typeequivalence/pia/PIAContract.csproj index 306758e5a5b85..8ee9620d55331 100644 --- a/src/tests/baseservices/typeequivalence/pia/PIAContract.csproj +++ b/src/tests/baseservices/typeequivalence/pia/PIAContract.csproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/baseservices/typeequivalence/signatures/basetestclassesil.ilproj b/src/tests/baseservices/typeequivalence/signatures/basetestclassesil.ilproj index 9de7e713a6e49..16c5501c7a97a 100644 --- a/src/tests/baseservices/typeequivalence/signatures/basetestclassesil.ilproj +++ b/src/tests/baseservices/typeequivalence/signatures/basetestclassesil.ilproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/baseservices/typeequivalence/signatures/testclassesil.ilproj b/src/tests/baseservices/typeequivalence/signatures/testclassesil.ilproj index 33d76b40e6cd5..be40547c1bf55 100644 --- a/src/tests/baseservices/typeequivalence/signatures/testclassesil.ilproj +++ b/src/tests/baseservices/typeequivalence/signatures/testclassesil.ilproj @@ -1,7 +1,4 @@ - - Library - From 02e17cf2127dd1b4ba15fa9be9d65ca443af35bc Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Wed, 6 Sep 2023 00:57:13 +0200 Subject: [PATCH 28/31] Fix the baseservices/exceptions/unhandled test --- .../RuntimeConfiguration/TestConfig.csproj | 1 - .../exceptions/unhandled/unhandled.cs | 10 +- .../exceptions/unhandled/unhandled.csproj | 6 +- .../exceptions/unhandled/unhandledTester.cs | 93 +++++++++++++++++++ .../unhandled/unhandledTester.csproj | 19 ++++ 5 files changed, 120 insertions(+), 9 deletions(-) create mode 100644 src/tests/baseservices/exceptions/unhandled/unhandledTester.cs create mode 100644 src/tests/baseservices/exceptions/unhandled/unhandledTester.csproj diff --git a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj index 702c661e7972e..c92e82fb9e211 100644 --- a/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj +++ b/src/tests/baseservices/RuntimeConfiguration/TestConfig.csproj @@ -4,7 +4,6 @@ true false BuildOnly - TestConfig.Main diff --git a/src/tests/baseservices/exceptions/unhandled/unhandled.cs b/src/tests/baseservices/exceptions/unhandled/unhandled.cs index f3f670d6f43a9..e2b0de5861802 100644 --- a/src/tests/baseservices/exceptions/unhandled/unhandled.cs +++ b/src/tests/baseservices/exceptions/unhandled/unhandled.cs @@ -1,17 +1,13 @@ // 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.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; namespace TestUnhandledException { - class Program + public class Program { - static int Main(string[] args) + public static int Main(string[] args) { if (args.Length != 0) { diff --git a/src/tests/baseservices/exceptions/unhandled/unhandled.csproj b/src/tests/baseservices/exceptions/unhandled/unhandled.csproj index 047f77d45e41c..66e7494198a66 100644 --- a/src/tests/baseservices/exceptions/unhandled/unhandled.csproj +++ b/src/tests/baseservices/exceptions/unhandled/unhandled.csproj @@ -1,6 +1,10 @@ - Exe + + true + false + BuildOnly + false diff --git a/src/tests/baseservices/exceptions/unhandled/unhandledTester.cs b/src/tests/baseservices/exceptions/unhandled/unhandledTester.cs new file mode 100644 index 0000000000000..0c17492570636 --- /dev/null +++ b/src/tests/baseservices/exceptions/unhandled/unhandledTester.cs @@ -0,0 +1,93 @@ +// 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Text; +using System.Text.RegularExpressions; + +using Xunit; + +namespace TestUnhandledExceptionTester +{ + public class Program + { + [Fact] + public static void TestEntryPoint() + { + List lines = new List(); + + Process testProcess = new Process(); + + testProcess.StartInfo.FileName = Path.Combine(Environment.GetEnvironmentVariable("CORE_ROOT"), "corerun"); + testProcess.StartInfo.Arguments = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "unhandled.dll"); + testProcess.StartInfo.RedirectStandardError = true; + testProcess.ErrorDataReceived += (sender, line) => + { + Console.WriteLine($"\"{line.Data}\""); + if (!string.IsNullOrEmpty(line.Data)) + { + lines.Add(line.Data); + } + }; + + testProcess.Start(); + testProcess.BeginErrorReadLine(); + testProcess.WaitForExit(); + testProcess.CancelErrorRead(); + + int expectedExitCode; + if (TestLibrary.Utilities.IsMonoRuntime) + { + expectedExitCode = 1; + } + else if (!OperatingSystem.IsWindows()) + { + expectedExitCode = 128 + 6; + } + else if (TestLibrary.Utilities.IsNativeAot) + { + expectedExitCode = unchecked((int)0xC0000409); + } + else + { + expectedExitCode = unchecked((int)0xE0434352); + } + + if (expectedExitCode != testProcess.ExitCode) + { + throw new Exception($"Wrong exit code 0x{testProcess.ExitCode:X8}, expected 0x{expectedExitCode:X8}"); + } + + int exceptionStackFrameLine = 1; + if (TestLibrary.Utilities.IsMonoRuntime) + { + if (lines[0] != "Unhandled Exception:") + { + throw new Exception("Missing Unhandled exception header"); + } + if (lines[1] != "System.Exception: Test") + { + throw new Exception("Missing exception type and message"); + } + + exceptionStackFrameLine = 2; + } + else + { + if (lines[0] != "Unhandled exception. System.Exception: Test") + { + throw new Exception("Missing Unhandled exception header"); + } + + } + + if (!lines[exceptionStackFrameLine].TrimStart().StartsWith("at TestUnhandledException.Program.Main")) + { + throw new Exception("Missing exception source frame"); + } + } + } +} diff --git a/src/tests/baseservices/exceptions/unhandled/unhandledTester.csproj b/src/tests/baseservices/exceptions/unhandled/unhandledTester.csproj new file mode 100644 index 0000000000000..4e36bd12b7981 --- /dev/null +++ b/src/tests/baseservices/exceptions/unhandled/unhandledTester.csproj @@ -0,0 +1,19 @@ + + + + true + + false + + + + + + + + false + Content + Always + + + From be2a499055fedb55bb818e4b7b22049406cd6719 Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Thu, 12 Oct 2023 20:55:23 +0200 Subject: [PATCH 29/31] Fix stackoverflow3 and unhandled exception tests --- .../exceptions/Directory.Build.props | 1 - .../stackoverflow/stackoverflow3.cs | 6 +- .../stackoverflow/stackoverflow3.csproj | 4 +- .../exceptions/unhandled/unhandled.cs | 91 +------------------ .../threading/Directory.Build.props | 1 - 5 files changed, 8 insertions(+), 95 deletions(-) diff --git a/src/tests/baseservices/exceptions/Directory.Build.props b/src/tests/baseservices/exceptions/Directory.Build.props index 17e80030ca09d..468da893df723 100644 --- a/src/tests/baseservices/exceptions/Directory.Build.props +++ b/src/tests/baseservices/exceptions/Directory.Build.props @@ -1,6 +1,5 @@ - diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs index 5556e5e35adbd..c833bae8afc15 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs @@ -1,17 +1,15 @@ // 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 Xunit; namespace TestStackOverflow3 { - public class Program + class Program { private const int MAX_RECURSIVE_CALLS = 1000000; static int ctr = 0; - [Fact] - public static void TestEntryPoint() + public static void Main() { Program ex = new Program(); ex.Execute(); diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj index 16cbcb28f3d0e..d805f0b4c7ecb 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj @@ -1,7 +1,9 @@ - + true + false + false true BuildOnly diff --git a/src/tests/baseservices/exceptions/unhandled/unhandled.cs b/src/tests/baseservices/exceptions/unhandled/unhandled.cs index e2b0de5861802..a21d7ddab1acf 100644 --- a/src/tests/baseservices/exceptions/unhandled/unhandled.cs +++ b/src/tests/baseservices/exceptions/unhandled/unhandled.cs @@ -5,96 +5,11 @@ namespace TestUnhandledException { - public class Program + class Program { - public static int Main(string[] args) + static void Main() { - if (args.Length != 0) - { - throw new Exception("Test"); - } - - List lines = new List(); - - Process testProcess = new Process(); - - // We don't need to trigger createdump logic. - testProcess.StartInfo.Environment.Remove("DOTNET_DbgEnableMiniDump"); - - testProcess.StartInfo.FileName = Environment.ProcessPath; - testProcess.StartInfo.Arguments = Environment.CommandLine + " throw"; - testProcess.StartInfo.RedirectStandardError = true; - testProcess.ErrorDataReceived += (sender, line) => - { - Console.WriteLine($"\"{line.Data}\""); - if (!string.IsNullOrEmpty(line.Data)) - { - lines.Add(line.Data); - } - }; - - testProcess.Start(); - testProcess.BeginErrorReadLine(); - testProcess.WaitForExit(); - testProcess.CancelErrorRead(); - - int expectedExitCode; - if (TestLibrary.Utilities.IsMonoRuntime) - { - expectedExitCode = 1; - } - else if (!OperatingSystem.IsWindows()) - { - expectedExitCode = 128 + 6; - } - else if (TestLibrary.Utilities.IsNativeAot) - { - expectedExitCode = unchecked((int)0xC0000409); - } - else - { - expectedExitCode = unchecked((int)0xE0434352); - } - - if (expectedExitCode != testProcess.ExitCode) - { - Console.WriteLine($"Wrong exit code 0x{testProcess.ExitCode:X8}"); - return 101; - } - - int exceptionStackFrameLine = 1; - if (TestLibrary.Utilities.IsMonoRuntime) - { - if (lines[0] != "Unhandled Exception:") - { - Console.WriteLine("Missing Unhandled exception header"); - return 102; - } - if (lines[1] != "System.Exception: Test") - { - Console.WriteLine("Missing exception type and message"); - return 103; - } - - exceptionStackFrameLine = 2; - } - else - { - if (lines[0] != "Unhandled exception. System.Exception: Test") - { - Console.WriteLine("Missing Unhandled exception header"); - return 102; - } - - } - - if (!lines[exceptionStackFrameLine].TrimStart().StartsWith("at TestUnhandledException.Program.Main")) - { - Console.WriteLine("Missing exception source frame"); - return 103; - } - - return 100; + throw new Exception("Test"); } } } diff --git a/src/tests/baseservices/threading/Directory.Build.props b/src/tests/baseservices/threading/Directory.Build.props index 02a2c0eb2f6b6..eaafc60fa2f0a 100644 --- a/src/tests/baseservices/threading/Directory.Build.props +++ b/src/tests/baseservices/threading/Directory.Build.props @@ -1,6 +1,5 @@ - From 2d85c95b6eb3bbe12007b75ece5e6410de86715d Mon Sep 17 00:00:00 2001 From: Tomas Rylek Date: Thu, 12 Oct 2023 21:03:34 +0200 Subject: [PATCH 30/31] Remove unnecessary check from Directory.Build.targets --- src/tests/Directory.Build.targets | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 4a5a32b503095..75299527a7925 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -154,7 +154,6 @@ Date: Fri, 13 Oct 2023 20:22:18 +0200 Subject: [PATCH 31/31] Fix stackoverflowtester per Mark's PR feedback --- .../stackoverflow/stackoverflowtester.cs | 229 +++++++----------- 1 file changed, 88 insertions(+), 141 deletions(-) diff --git a/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs b/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs index 61921c79acc53..07f5e03e7cb62 100644 --- a/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs +++ b/src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs @@ -11,7 +11,7 @@ namespace TestStackOverflow { public class Program { - static bool TestStackOverflow(string testName, string testArgs, out List stderrLines) + static void TestStackOverflow(string testName, string testArgs, out List stderrLines) { Console.WriteLine($"Running {testName} test({testArgs})"); List lines = new List(); @@ -56,197 +56,144 @@ static bool TestStackOverflow(string testName, string testArgs, out List expectedListBuilder.Append($"{separator}0x{code:X8}"); separator = " or "; }); - Console.WriteLine($"Exit code: 0x{testProcess.ExitCode:X8}, expected {expectedListBuilder.ToString()}"); - return false; + throw new Exception($"Exit code: 0x{testProcess.ExitCode:X8}, expected {expectedListBuilder.ToString()}"); } if (lines[0] != "Stack overflow.") { - Console.WriteLine("Missing \"Stack overflow.\" at the first line"); - return false; + throw new Exception("Missing \"Stack overflow.\" at the first line"); } - - return true; } [Fact] - public static bool TestStackOverflowSmallFrameMainThread() + public static void TestStackOverflowSmallFrameMainThread() { - List lines; - if (TestStackOverflow("stackoverflow", "smallframe main", out lines)) - { - if (!lines[lines.Count - 1].EndsWith(".Main()")) - { - Console.WriteLine("Missing \"Main\" method frame at the last line"); - return false; - } + TestStackOverflow("stackoverflow", "smallframe main", out List lines); - if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.Test(Boolean)"))) - { - Console.WriteLine("Missing \"Test\" method frame"); - return false; - } - - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionA\" method frame"); - return false; - } + if (!lines[lines.Count - 1].EndsWith(".Main(System.String[])")) + { + throw new Exception("Missing \"Main\" method frame at the last line"); + } - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionB()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionB\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.Test(Boolean)"))) + { + throw new Exception("Missing \"Test\" method frame"); + } - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionC()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionC\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA()"))) + { + throw new Exception("Missing \"InfiniteRecursionA\" method frame"); + } - return true; + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionB()"))) + { + throw new Exception("Missing \"InfiniteRecursionB\" method frame"); } - return false; + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionC()"))) + { + throw new Exception("Missing \"InfiniteRecursionC\" method frame"); + } } [Fact] - public static bool TestStackOverflowLargeFrameMainThread() + public static void TestStackOverflowLargeFrameMainThread() { - List lines; - if (TestStackOverflow("stackoverflow", "largeframe main", out lines)) - { - if (!lines[lines.Count - 1].EndsWith("at TestStackOverflow.Program.Main(System.String[])")) - { - Console.WriteLine("Missing \"Main\" method frame at the last line"); - return false; - } - - if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.Test(Boolean)"))) - { - Console.WriteLine("Missing \"Test\" method frame"); - return false; - } + TestStackOverflow("stackoverflow", "largeframe main", out List lines); - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA2()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionA2\" method frame"); - return false; - } + if (!lines[lines.Count - 1].EndsWith("at TestStackOverflow.Program.Main(System.String[])")) + { + throw new Exception("Missing \"Main\" method frame at the last line"); + } - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionB2()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionB2\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.Test(Boolean)"))) + { + throw new Exception("Missing \"Test\" method frame"); + } - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionC2()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionC2\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA2()"))) + { + throw new Exception("Missing \"InfiniteRecursionA2\" method frame"); + } - return true; + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionB2()"))) + { + throw new Exception("Missing \"InfiniteRecursionB2\" method frame"); } - return false; + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionC2()"))) + { + throw new Exception("Missing \"InfiniteRecursionC2\" method frame"); + } } [Fact] - public static bool TestStackOverflowSmallFrameSecondaryThread() + public static void TestStackOverflowSmallFrameSecondaryThread() { - List lines; - if (TestStackOverflow("stackoverflow", "smallframe secondary", out lines)) - { - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.Test(Boolean)"))) - { - Console.WriteLine("Missing \"TestStackOverflow.Program.Test\" method frame"); - return false; - } - - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionA\" method frame"); - return false; - } + TestStackOverflow("stackoverflow", "smallframe secondary", out List lines); - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionB()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionB\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.Test(Boolean)"))) + { + throw new Exception("Missing \"TestStackOverflow.Program.Test\" method frame"); + } - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionC()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionC\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA()"))) + { + throw new Exception("Missing \"InfiniteRecursionA\" method frame"); + } - return true; + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionB()"))) + { + throw new Exception("Missing \"InfiniteRecursionB\" method frame"); } - return false; + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionC()"))) + { + throw new Exception("Missing \"InfiniteRecursionC\" method frame"); + } } [Fact] - public static bool TestStackOverflowLargeFrameSecondaryThread() + public static void TestStackOverflowLargeFrameSecondaryThread() { - List lines; - if (TestStackOverflow("stackoverflow", "largeframe secondary", out lines)) - { - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.Test(Boolean)"))) - { - Console.WriteLine("Missing \"TestStackOverflow.Program.Test\" method frame"); - return false; - } - - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA2()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionA2\" method frame"); - return false; - } + TestStackOverflow("stackoverflow", "largeframe secondary", out List lines); - if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.InfiniteRecursionB2()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionB2\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.Test(Boolean)"))) + { + throw new Exception("Missing \"TestStackOverflow.Program.Test\" method frame"); + } - if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.InfiniteRecursionC2()"))) - { - Console.WriteLine("Missing \"InfiniteRecursionC2\" method frame"); - return false; - } + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow.Program.InfiniteRecursionA2()"))) + { + throw new Exception("Missing \"InfiniteRecursionA2\" method frame"); + } - return true; + if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.InfiniteRecursionB2()"))) + { + throw new Exception("Missing \"InfiniteRecursionB2\" method frame"); } - return false; + if (!lines.Exists(elem => elem.EndsWith("TestStackOverflow.Program.InfiniteRecursionC2()"))) + { + throw new Exception("Missing \"InfiniteRecursionC2\" method frame"); + } } [Fact] - public static bool TestStackOverflow3() + public static void TestStackOverflow3() { - List lines; - if (TestStackOverflow("stackoverflow3", "", out lines)) - { - if (!lines[lines.Count - 1].EndsWith("at TestStackOverflow3.Program.Main()")) - { - Console.WriteLine("Missing \"Main\" method frame at the last line"); - return false; - } + TestStackOverflow("stackoverflow3", "", out List lines); - if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow3.Program.Execute(System.String)"))) - { - Console.WriteLine("Missing \"Execute\" method frame"); - return false; - } + if (!lines[lines.Count - 1].EndsWith("at TestStackOverflow3.Program.Main()")) + { + throw new Exception("Missing \"Main\" method frame at the last line"); + } - return true; + if (!lines.Exists(elem => elem.EndsWith("at TestStackOverflow3.Program.Execute(System.String)"))) + { + throw new Exception("Missing \"Execute\" method frame"); } - return false; } } }