diff --git a/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj b/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj index bdc02aa4f6d70..360f004c1fd61 100644 --- a/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj +++ b/src/tests/JIT/Directed/debugging/debuginfo/tester.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/tests/Regressions/Directory.Build.props b/src/tests/Regressions/Directory.Build.props new file mode 100644 index 0000000000000..17e80030ca09d --- /dev/null +++ b/src/tests/Regressions/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + + + true + $(NoWarn);xUnit1013 + false + + diff --git a/src/tests/Regressions/Regressions.csproj b/src/tests/Regressions/Regressions.csproj new file mode 100644 index 0000000000000..f751282d127da --- /dev/null +++ b/src/tests/Regressions/Regressions.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/tests/Regressions/coreclr/0041/body_double.cs b/src/tests/Regressions/coreclr/0041/body_double.cs index 493fa71eba3a0..e100a16acf6da 100644 --- a/src/tests/Regressions/coreclr/0041/body_double.cs +++ b/src/tests/Regressions/coreclr/0041/body_double.cs @@ -2,738 +2,740 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Security; +using Xunit; [SecuritySafeCritical] -class TestApp { - //***** TEST CODE ***** - static double test_0_0(double num, AA init, AA zero) { - return init.q; - } - static double test_0_1(double num, AA init, AA zero) { - zero.q=num; - return zero.q; - } - static double test_0_2(double num, AA init, AA zero) { - return init.q+zero.q; - } - static double test_0_3(double num, AA init, AA zero) { - return checked(init.q-zero.q); - } - static double test_0_4(double num, AA init, AA zero) { - zero.q+=num; return zero.q; - - } - static double test_0_5(double num, AA init, AA zero) { - zero.q+=init.q; return zero.q; - - } - static double test_0_6(double num, AA init, AA zero) { - if (init.q==num) - return 100; - else - return zero.q; - - } - static double test_0_7(double num, AA init, AA zero) { - return init.qzero.q?1:0)+99; - - } - static double test_0_9(double num, AA init, AA zero) { - object bb=init.q; - return (double)bb; - } - static double test_0_10(double num, AA init, AA zero) { - double dbl=init.q; - return (double)dbl; - } - static double test_0_11(double num, AA init, AA zero) { - return AA.call_target(init.q); - } - static double test_0_12(double num, AA init, AA zero) { - return AA.call_target_ref(ref init.q); - } - static double test_1_0(double num, ref AA r_init, ref AA r_zero) { - return r_init.q; - } - static double test_1_1(double num, ref AA r_init, ref AA r_zero) { - r_zero.q=num; - return r_zero.q; - } - static double test_1_2(double num, ref AA r_init, ref AA r_zero) { - return r_init.q+r_zero.q; - } - static double test_1_3(double num, ref AA r_init, ref AA r_zero) { - return checked(r_init.q-r_zero.q); - } - static double test_1_4(double num, ref AA r_init, ref AA r_zero) { - r_zero.q+=num; return r_zero.q; - - } - static double test_1_5(double num, ref AA r_init, ref AA r_zero) { - r_zero.q+=r_init.q; return r_zero.q; - - } - static double test_1_6(double num, ref AA r_init, ref AA r_zero) { - if (r_init.q==num) - return 100; - else - return r_zero.q; - - } - static double test_1_7(double num, ref AA r_init, ref AA r_zero) { - return r_init.qr_zero.q?1:0)+99; - - } - static double test_1_9(double num, ref AA r_init, ref AA r_zero) { - object bb=r_init.q; - return (double)bb; - } - static double test_1_10(double num, ref AA r_init, ref AA r_zero) { - double dbl=r_init.q; - return (double)dbl; - } - static double test_1_11(double num, ref AA r_init, ref AA r_zero) { - return AA.call_target(r_init.q); - } - static double test_1_12(double num, ref AA r_init, ref AA r_zero) { - return AA.call_target_ref(ref r_init.q); - } - static double test_2_0(double num) { - return AA.a_init[(int)num].q; - } - static double test_2_1(double num) { - AA.a_zero[(int)num].q=num; - return AA.a_zero[(int)num].q; - } - static double test_2_2(double num) { - return AA.a_init[(int)num].q+AA.a_zero[(int)num].q; - } - static double test_2_3(double num) { - return checked(AA.a_init[(int)num].q-AA.a_zero[(int)num].q); - } - static double test_2_4(double num) { - AA.a_zero[(int)num].q+=num; return AA.a_zero[(int)num].q; - - } - static double test_2_5(double num) { - AA.a_zero[(int)num].q+=AA.a_init[(int)num].q; return AA.a_zero[(int)num].q; - - } - static double test_2_6(double num) { - if (AA.a_init[(int)num].q==num) - return 100; - else - return AA.a_zero[(int)num].q; - - } - static double test_2_7(double num) { - return AA.a_init[(int)num].qAA.a_zero[(int)num].q?1:0)+99; - - } - static double test_2_9(double num) { - object bb=AA.a_init[(int)num].q; - return (double)bb; - } - static double test_2_10(double num) { - double dbl=AA.a_init[(int)num].q; - return (double)dbl; - } - static double test_2_11(double num) { - return AA.call_target(AA.a_init[(int)num].q); - } - static double test_2_12(double num) { - return AA.call_target_ref(ref AA.a_init[(int)num].q); - } - static double test_3_0(double num) { - return AA.aa_init[0,(int)num-1,(int)num/100].q; - } - static double test_3_1(double num) { - AA.aa_zero[0,(int)num-1,(int)num/100].q=num; - return AA.aa_zero[0,(int)num-1,(int)num/100].q; - } - static double test_3_2(double num) { - return AA.aa_init[0,(int)num-1,(int)num/100].q+AA.aa_zero[0,(int)num-1,(int)num/100].q; - } - static double test_3_3(double num) { - return checked(AA.aa_init[0,(int)num-1,(int)num/100].q-AA.aa_zero[0,(int)num-1,(int)num/100].q); - } - static double test_3_4(double num) { - AA.aa_zero[0,(int)num-1,(int)num/100].q+=num; return AA.aa_zero[0,(int)num-1,(int)num/100].q; - - } - static double test_3_5(double num) { - AA.aa_zero[0,(int)num-1,(int)num/100].q+=AA.aa_init[0,(int)num-1,(int)num/100].q; return AA.aa_zero[0,(int)num-1,(int)num/100].q; - - } - static double test_3_6(double num) { - if (AA.aa_init[0,(int)num-1,(int)num/100].q==num) - return 100; - else - return AA.aa_zero[0,(int)num-1,(int)num/100].q; - - } - static double test_3_7(double num) { - return AA.aa_init[0,(int)num-1,(int)num/100].qAA.aa_zero[0,(int)num-1,(int)num/100].q?1:0)+99; - - } - static double test_3_9(double num) { - object bb=AA.aa_init[0,(int)num-1,(int)num/100].q; - return (double)bb; - } - static double test_3_10(double num) { - double dbl=AA.aa_init[0,(int)num-1,(int)num/100].q; - return (double)dbl; - } - static double test_3_11(double num) { - return AA.call_target(AA.aa_init[0,(int)num-1,(int)num/100].q); - } - static double test_3_12(double num) { - return AA.call_target_ref(ref AA.aa_init[0,(int)num-1,(int)num/100].q); - } - static double test_4_0(double num) { - return BB.f_init.q; - } - static double test_4_1(double num) { - BB.f_zero.q=num; - return BB.f_zero.q; - } - static double test_4_2(double num) { - return BB.f_init.q+BB.f_zero.q; - } - static double test_4_3(double num) { - return checked(BB.f_init.q-BB.f_zero.q); - } - static double test_4_4(double num) { - BB.f_zero.q+=num; return BB.f_zero.q; - - } - static double test_4_5(double num) { - BB.f_zero.q+=BB.f_init.q; return BB.f_zero.q; - - } - static double test_4_6(double num) { - if (BB.f_init.q==num) - return 100; - else - return BB.f_zero.q; - - } - static double test_4_7(double num) { - return BB.f_init.qBB.f_zero.q?1:0)+99; - - } - static double test_4_9(double num) { - object bb=BB.f_init.q; - return (double)bb; - } - static double test_4_10(double num) { - double dbl=BB.f_init.q; - return (double)dbl; - } - static double test_4_11(double num) { - return AA.call_target(BB.f_init.q); - } - static double test_4_12(double num) { - return AA.call_target_ref(ref BB.f_init.q); - } - static double test_5_0(double num) { - return ((AA)AA.b_init).q; - } - static unsafe double test_7_0(double num, void *ptr_init, void *ptr_zero) { - return (*((AA*)ptr_init)).q; - } - static unsafe double test_7_1(double num, void *ptr_init, void *ptr_zero) { - (*((AA*)ptr_zero)).q=num; - return (*((AA*)ptr_zero)).q; - } - static unsafe double test_7_2(double num, void *ptr_init, void *ptr_zero) { - return (*((AA*)ptr_init)).q+(*((AA*)ptr_zero)).q; - } - static unsafe double test_7_3(double num, void *ptr_init, void *ptr_zero) { - return checked((*((AA*)ptr_init)).q-(*((AA*)ptr_zero)).q); - } - static unsafe double test_7_4(double num, void *ptr_init, void *ptr_zero) { - (*((AA*)ptr_zero)).q+=num; return (*((AA*)ptr_zero)).q; - - } - static unsafe double test_7_5(double num, void *ptr_init, void *ptr_zero) { - (*((AA*)ptr_zero)).q+=(*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q; - - } - static unsafe double test_7_6(double num, void *ptr_init, void *ptr_zero) { - if ((*((AA*)ptr_init)).q==num) - return 100; - else - return (*((AA*)ptr_zero)).q; - - } - static unsafe double test_7_7(double num, void *ptr_init, void *ptr_zero) { - return (*((AA*)ptr_init)).q(*((AA*)ptr_zero)).q?1:0)+99; - - } - static unsafe double test_7_9(double num, void *ptr_init, void *ptr_zero) { - object bb=(*((AA*)ptr_init)).q; - return (double)bb; - } - static unsafe double test_7_10(double num, void *ptr_init, void *ptr_zero) { - double dbl=(*((AA*)ptr_init)).q; - return (double)dbl; - } - static unsafe double test_7_11(double num, void *ptr_init, void *ptr_zero) { - return AA.call_target((*((AA*)ptr_init)).q); - } - static unsafe double test_7_12(double num, void *ptr_init, void *ptr_zero) { - return AA.call_target_ref(ref (*((AA*)ptr_init)).q); - } +public class TestApp { + //***** TEST CODE ***** + static double test_0_0(double num, AA init, AA zero) { + return init.q; + } + static double test_0_1(double num, AA init, AA zero) { + zero.q=num; + return zero.q; + } + static double test_0_2(double num, AA init, AA zero) { + return init.q+zero.q; + } + static double test_0_3(double num, AA init, AA zero) { + return checked(init.q-zero.q); + } + static double test_0_4(double num, AA init, AA zero) { + zero.q+=num; return zero.q; + + } + static double test_0_5(double num, AA init, AA zero) { + zero.q+=init.q; return zero.q; + + } + static double test_0_6(double num, AA init, AA zero) { + if (init.q==num) + return 100; + else + return zero.q; + + } + static double test_0_7(double num, AA init, AA zero) { + return init.qzero.q?1:0)+99; + + } + static double test_0_9(double num, AA init, AA zero) { + object bb=init.q; + return (double)bb; + } + static double test_0_10(double num, AA init, AA zero) { + double dbl=init.q; + return (double)dbl; + } + static double test_0_11(double num, AA init, AA zero) { + return AA.call_target(init.q); + } + static double test_0_12(double num, AA init, AA zero) { + return AA.call_target_ref(ref init.q); + } + static double test_1_0(double num, ref AA r_init, ref AA r_zero) { + return r_init.q; + } + static double test_1_1(double num, ref AA r_init, ref AA r_zero) { + r_zero.q=num; + return r_zero.q; + } + static double test_1_2(double num, ref AA r_init, ref AA r_zero) { + return r_init.q+r_zero.q; + } + static double test_1_3(double num, ref AA r_init, ref AA r_zero) { + return checked(r_init.q-r_zero.q); + } + static double test_1_4(double num, ref AA r_init, ref AA r_zero) { + r_zero.q+=num; return r_zero.q; + + } + static double test_1_5(double num, ref AA r_init, ref AA r_zero) { + r_zero.q+=r_init.q; return r_zero.q; + + } + static double test_1_6(double num, ref AA r_init, ref AA r_zero) { + if (r_init.q==num) + return 100; + else + return r_zero.q; + + } + static double test_1_7(double num, ref AA r_init, ref AA r_zero) { + return r_init.qr_zero.q?1:0)+99; + + } + static double test_1_9(double num, ref AA r_init, ref AA r_zero) { + object bb=r_init.q; + return (double)bb; + } + static double test_1_10(double num, ref AA r_init, ref AA r_zero) { + double dbl=r_init.q; + return (double)dbl; + } + static double test_1_11(double num, ref AA r_init, ref AA r_zero) { + return AA.call_target(r_init.q); + } + static double test_1_12(double num, ref AA r_init, ref AA r_zero) { + return AA.call_target_ref(ref r_init.q); + } + static double test_2_0(double num) { + return AA.a_init[(int)num].q; + } + static double test_2_1(double num) { + AA.a_zero[(int)num].q=num; + return AA.a_zero[(int)num].q; + } + static double test_2_2(double num) { + return AA.a_init[(int)num].q+AA.a_zero[(int)num].q; + } + static double test_2_3(double num) { + return checked(AA.a_init[(int)num].q-AA.a_zero[(int)num].q); + } + static double test_2_4(double num) { + AA.a_zero[(int)num].q+=num; return AA.a_zero[(int)num].q; + + } + static double test_2_5(double num) { + AA.a_zero[(int)num].q+=AA.a_init[(int)num].q; return AA.a_zero[(int)num].q; + + } + static double test_2_6(double num) { + if (AA.a_init[(int)num].q==num) + return 100; + else + return AA.a_zero[(int)num].q; + + } + static double test_2_7(double num) { + return AA.a_init[(int)num].qAA.a_zero[(int)num].q?1:0)+99; + + } + static double test_2_9(double num) { + object bb=AA.a_init[(int)num].q; + return (double)bb; + } + static double test_2_10(double num) { + double dbl=AA.a_init[(int)num].q; + return (double)dbl; + } + static double test_2_11(double num) { + return AA.call_target(AA.a_init[(int)num].q); + } + static double test_2_12(double num) { + return AA.call_target_ref(ref AA.a_init[(int)num].q); + } + static double test_3_0(double num) { + return AA.aa_init[0,(int)num-1,(int)num/100].q; + } + static double test_3_1(double num) { + AA.aa_zero[0,(int)num-1,(int)num/100].q=num; + return AA.aa_zero[0,(int)num-1,(int)num/100].q; + } + static double test_3_2(double num) { + return AA.aa_init[0,(int)num-1,(int)num/100].q+AA.aa_zero[0,(int)num-1,(int)num/100].q; + } + static double test_3_3(double num) { + return checked(AA.aa_init[0,(int)num-1,(int)num/100].q-AA.aa_zero[0,(int)num-1,(int)num/100].q); + } + static double test_3_4(double num) { + AA.aa_zero[0,(int)num-1,(int)num/100].q+=num; return AA.aa_zero[0,(int)num-1,(int)num/100].q; + + } + static double test_3_5(double num) { + AA.aa_zero[0,(int)num-1,(int)num/100].q+=AA.aa_init[0,(int)num-1,(int)num/100].q; return AA.aa_zero[0,(int)num-1,(int)num/100].q; + + } + static double test_3_6(double num) { + if (AA.aa_init[0,(int)num-1,(int)num/100].q==num) + return 100; + else + return AA.aa_zero[0,(int)num-1,(int)num/100].q; + + } + static double test_3_7(double num) { + return AA.aa_init[0,(int)num-1,(int)num/100].qAA.aa_zero[0,(int)num-1,(int)num/100].q?1:0)+99; + + } + static double test_3_9(double num) { + object bb=AA.aa_init[0,(int)num-1,(int)num/100].q; + return (double)bb; + } + static double test_3_10(double num) { + double dbl=AA.aa_init[0,(int)num-1,(int)num/100].q; + return (double)dbl; + } + static double test_3_11(double num) { + return AA.call_target(AA.aa_init[0,(int)num-1,(int)num/100].q); + } + static double test_3_12(double num) { + return AA.call_target_ref(ref AA.aa_init[0,(int)num-1,(int)num/100].q); + } + static double test_4_0(double num) { + return BB.f_init.q; + } + static double test_4_1(double num) { + BB.f_zero.q=num; + return BB.f_zero.q; + } + static double test_4_2(double num) { + return BB.f_init.q+BB.f_zero.q; + } + static double test_4_3(double num) { + return checked(BB.f_init.q-BB.f_zero.q); + } + static double test_4_4(double num) { + BB.f_zero.q+=num; return BB.f_zero.q; + + } + static double test_4_5(double num) { + BB.f_zero.q+=BB.f_init.q; return BB.f_zero.q; + + } + static double test_4_6(double num) { + if (BB.f_init.q==num) + return 100; + else + return BB.f_zero.q; + + } + static double test_4_7(double num) { + return BB.f_init.qBB.f_zero.q?1:0)+99; + + } + static double test_4_9(double num) { + object bb=BB.f_init.q; + return (double)bb; + } + static double test_4_10(double num) { + double dbl=BB.f_init.q; + return (double)dbl; + } + static double test_4_11(double num) { + return AA.call_target(BB.f_init.q); + } + static double test_4_12(double num) { + return AA.call_target_ref(ref BB.f_init.q); + } + static double test_5_0(double num) { + return ((AA)AA.b_init).q; + } + static unsafe double test_7_0(double num, void *ptr_init, void *ptr_zero) { + return (*((AA*)ptr_init)).q; + } + static unsafe double test_7_1(double num, void *ptr_init, void *ptr_zero) { + (*((AA*)ptr_zero)).q=num; + return (*((AA*)ptr_zero)).q; + } + static unsafe double test_7_2(double num, void *ptr_init, void *ptr_zero) { + return (*((AA*)ptr_init)).q+(*((AA*)ptr_zero)).q; + } + static unsafe double test_7_3(double num, void *ptr_init, void *ptr_zero) { + return checked((*((AA*)ptr_init)).q-(*((AA*)ptr_zero)).q); + } + static unsafe double test_7_4(double num, void *ptr_init, void *ptr_zero) { + (*((AA*)ptr_zero)).q+=num; return (*((AA*)ptr_zero)).q; + + } + static unsafe double test_7_5(double num, void *ptr_init, void *ptr_zero) { + (*((AA*)ptr_zero)).q+=(*((AA*)ptr_init)).q; return (*((AA*)ptr_zero)).q; + + } + static unsafe double test_7_6(double num, void *ptr_init, void *ptr_zero) { + if ((*((AA*)ptr_init)).q==num) + return 100; + else + return (*((AA*)ptr_zero)).q; + + } + static unsafe double test_7_7(double num, void *ptr_init, void *ptr_zero) { + return (*((AA*)ptr_init)).q(*((AA*)ptr_zero)).q?1:0)+99; + + } + static unsafe double test_7_9(double num, void *ptr_init, void *ptr_zero) { + object bb=(*((AA*)ptr_init)).q; + return (double)bb; + } + static unsafe double test_7_10(double num, void *ptr_init, void *ptr_zero) { + double dbl=(*((AA*)ptr_init)).q; + return (double)dbl; + } + static unsafe double test_7_11(double num, void *ptr_init, void *ptr_zero) { + return AA.call_target((*((AA*)ptr_init)).q); + } + static unsafe double test_7_12(double num, void *ptr_init, void *ptr_zero) { + return AA.call_target_ref(ref (*((AA*)ptr_init)).q); + } - //***** MAIN CODE ***** - static unsafe int Main() { - AA.reset(); - if (test_0_0(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_0() failed."); - return 101; - } - AA.verify_all(); AA.reset(); - if (test_0_1(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_1() failed."); - return 102; - } - AA.verify_all(); AA.reset(); - if (test_0_2(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_2() failed."); - return 103; - } - AA.verify_all(); AA.reset(); - if (test_0_3(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_3() failed."); - return 104; - } - AA.verify_all(); AA.reset(); - if (test_0_4(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_4() failed."); - return 105; - } - AA.verify_all(); AA.reset(); - if (test_0_5(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_5() failed."); - return 106; - } - AA.verify_all(); AA.reset(); - if (test_0_6(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_6() failed."); - return 107; - } - AA.verify_all(); AA.reset(); - if (test_0_7(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_7() failed."); - return 108; - } - AA.verify_all(); AA.reset(); - if (test_0_8(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_8() failed."); - return 109; - } - AA.verify_all(); AA.reset(); - if (test_0_9(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_9() failed."); - return 110; - } - AA.verify_all(); AA.reset(); - if (test_0_10(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_10() failed."); - return 111; - } - AA.verify_all(); AA.reset(); - if (test_0_11(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_11() failed."); - return 112; - } - AA.verify_all(); AA.reset(); - if (test_0_12(100, new AA(100), new AA(0)) != 100) { - Console.WriteLine("test_0_12() failed."); - return 113; - } - AA.verify_all(); AA.reset(); - if (test_1_0(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_0() failed."); - return 114; - } - AA.verify_all(); AA.reset(); - if (test_1_1(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_1() failed."); - return 115; - } - AA.verify_all(); AA.reset(); - if (test_1_2(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_2() failed."); - return 116; - } - AA.verify_all(); AA.reset(); - if (test_1_3(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_3() failed."); - return 117; - } - AA.verify_all(); AA.reset(); - if (test_1_4(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_4() failed."); - return 118; - } - AA.verify_all(); AA.reset(); - if (test_1_5(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_5() failed."); - return 119; - } - AA.verify_all(); AA.reset(); - if (test_1_6(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_6() failed."); - return 120; - } - AA.verify_all(); AA.reset(); - if (test_1_7(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_7() failed."); - return 121; - } - AA.verify_all(); AA.reset(); - if (test_1_8(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_8() failed."); - return 122; - } - AA.verify_all(); AA.reset(); - if (test_1_9(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_9() failed."); - return 123; - } - AA.verify_all(); AA.reset(); - if (test_1_10(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_10() failed."); - return 124; - } - AA.verify_all(); AA.reset(); - if (test_1_11(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_11() failed."); - return 125; - } - AA.verify_all(); AA.reset(); - if (test_1_12(100, ref AA._init, ref AA._zero) != 100) { - Console.WriteLine("test_1_12() failed."); - return 126; - } - AA.verify_all(); AA.reset(); - if (test_2_0(100) != 100) { - Console.WriteLine("test_2_0() failed."); - return 127; - } - AA.verify_all(); AA.reset(); - if (test_2_1(100) != 100) { - Console.WriteLine("test_2_1() failed."); - return 128; - } - AA.verify_all(); AA.reset(); - if (test_2_2(100) != 100) { - Console.WriteLine("test_2_2() failed."); - return 129; - } - AA.verify_all(); AA.reset(); - if (test_2_3(100) != 100) { - Console.WriteLine("test_2_3() failed."); - return 130; - } - AA.verify_all(); AA.reset(); - if (test_2_4(100) != 100) { - Console.WriteLine("test_2_4() failed."); - return 131; - } - AA.verify_all(); AA.reset(); - if (test_2_5(100) != 100) { - Console.WriteLine("test_2_5() failed."); - return 132; - } - AA.verify_all(); AA.reset(); - if (test_2_6(100) != 100) { - Console.WriteLine("test_2_6() failed."); - return 133; - } - AA.verify_all(); AA.reset(); - if (test_2_7(100) != 100) { - Console.WriteLine("test_2_7() failed."); - return 134; - } - AA.verify_all(); AA.reset(); - if (test_2_8(100) != 100) { - Console.WriteLine("test_2_8() failed."); - return 135; - } - AA.verify_all(); AA.reset(); - if (test_2_9(100) != 100) { - Console.WriteLine("test_2_9() failed."); - return 136; - } - AA.verify_all(); AA.reset(); - if (test_2_10(100) != 100) { - Console.WriteLine("test_2_10() failed."); - return 137; - } - AA.verify_all(); AA.reset(); - if (test_2_11(100) != 100) { - Console.WriteLine("test_2_11() failed."); - return 138; - } - AA.verify_all(); AA.reset(); - if (test_2_12(100) != 100) { - Console.WriteLine("test_2_12() failed."); - return 139; - } - AA.verify_all(); AA.reset(); - if (test_3_0(100) != 100) { - Console.WriteLine("test_3_0() failed."); - return 140; - } - AA.verify_all(); AA.reset(); - if (test_3_1(100) != 100) { - Console.WriteLine("test_3_1() failed."); - return 141; - } - AA.verify_all(); AA.reset(); - if (test_3_2(100) != 100) { - Console.WriteLine("test_3_2() failed."); - return 142; - } - AA.verify_all(); AA.reset(); - if (test_3_3(100) != 100) { - Console.WriteLine("test_3_3() failed."); - return 143; - } - AA.verify_all(); AA.reset(); - if (test_3_4(100) != 100) { - Console.WriteLine("test_3_4() failed."); - return 144; - } - AA.verify_all(); AA.reset(); - if (test_3_5(100) != 100) { - Console.WriteLine("test_3_5() failed."); - return 145; - } - AA.verify_all(); AA.reset(); - if (test_3_6(100) != 100) { - Console.WriteLine("test_3_6() failed."); - return 146; - } - AA.verify_all(); AA.reset(); - if (test_3_7(100) != 100) { - Console.WriteLine("test_3_7() failed."); - return 147; - } - AA.verify_all(); AA.reset(); - if (test_3_8(100) != 100) { - Console.WriteLine("test_3_8() failed."); - return 148; - } - AA.verify_all(); AA.reset(); - if (test_3_9(100) != 100) { - Console.WriteLine("test_3_9() failed."); - return 149; - } - AA.verify_all(); AA.reset(); - if (test_3_10(100) != 100) { - Console.WriteLine("test_3_10() failed."); - return 150; - } - AA.verify_all(); AA.reset(); - if (test_3_11(100) != 100) { - Console.WriteLine("test_3_11() failed."); - return 151; - } - AA.verify_all(); AA.reset(); - if (test_3_12(100) != 100) { - Console.WriteLine("test_3_12() failed."); - return 152; - } - AA.verify_all(); AA.reset(); - if (test_4_0(100) != 100) { - Console.WriteLine("test_4_0() failed."); - return 153; - } - AA.verify_all(); AA.reset(); - if (test_4_1(100) != 100) { - Console.WriteLine("test_4_1() failed."); - return 154; - } - AA.verify_all(); AA.reset(); - if (test_4_2(100) != 100) { - Console.WriteLine("test_4_2() failed."); - return 155; - } - AA.verify_all(); AA.reset(); - if (test_4_3(100) != 100) { - Console.WriteLine("test_4_3() failed."); - return 156; - } - AA.verify_all(); AA.reset(); - if (test_4_4(100) != 100) { - Console.WriteLine("test_4_4() failed."); - return 157; - } - AA.verify_all(); AA.reset(); - if (test_4_5(100) != 100) { - Console.WriteLine("test_4_5() failed."); - return 158; - } - AA.verify_all(); AA.reset(); - if (test_4_6(100) != 100) { - Console.WriteLine("test_4_6() failed."); - return 159; - } - AA.verify_all(); AA.reset(); - if (test_4_7(100) != 100) { - Console.WriteLine("test_4_7() failed."); - return 160; - } - AA.verify_all(); AA.reset(); - if (test_4_8(100) != 100) { - Console.WriteLine("test_4_8() failed."); - return 161; - } - AA.verify_all(); AA.reset(); - if (test_4_9(100) != 100) { - Console.WriteLine("test_4_9() failed."); - return 162; - } - AA.verify_all(); AA.reset(); - if (test_4_10(100) != 100) { - Console.WriteLine("test_4_10() failed."); - return 163; - } - AA.verify_all(); AA.reset(); - if (test_4_11(100) != 100) { - Console.WriteLine("test_4_11() failed."); - return 164; - } - AA.verify_all(); AA.reset(); - if (test_4_12(100) != 100) { - Console.WriteLine("test_4_12() failed."); - return 165; - } - AA.verify_all(); AA.reset(); - if (test_5_0(100) != 100) { - Console.WriteLine("test_5_0() failed."); - return 166; - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_0(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_0() failed."); - return 168; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_1(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_1() failed."); - return 169; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_2(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_2() failed."); - return 170; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_3(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_3() failed."); - return 171; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_4(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_4() failed."); - return 172; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_5(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_5() failed."); - return 173; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_6(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_6() failed."); - return 174; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_7(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_7() failed."); - return 175; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_8(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_8() failed."); - return 176; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_9(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_9() failed."); - return 177; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_10(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_10() failed."); - return 178; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_11(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_11() failed."); - return 179; - } - } - AA.verify_all(); AA.reset(); - fixed (void *p_init = &AA._init, p_zero = &AA._zero) { - if (test_7_12(100, p_init, p_zero) != 100) { - Console.WriteLine("test_7_12() failed."); - return 180; - } - } - AA.verify_all(); Console.WriteLine("All tests passed."); - return 100; - } + //***** MAIN CODE ***** + [Fact] + public static unsafe int TestEntryPoint() { + AA.reset(); + if (test_0_0(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_0() failed."); + return 101; + } + AA.verify_all(); AA.reset(); + if (test_0_1(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_1() failed."); + return 102; + } + AA.verify_all(); AA.reset(); + if (test_0_2(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_2() failed."); + return 103; + } + AA.verify_all(); AA.reset(); + if (test_0_3(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_3() failed."); + return 104; + } + AA.verify_all(); AA.reset(); + if (test_0_4(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_4() failed."); + return 105; + } + AA.verify_all(); AA.reset(); + if (test_0_5(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_5() failed."); + return 106; + } + AA.verify_all(); AA.reset(); + if (test_0_6(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_6() failed."); + return 107; + } + AA.verify_all(); AA.reset(); + if (test_0_7(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_7() failed."); + return 108; + } + AA.verify_all(); AA.reset(); + if (test_0_8(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_8() failed."); + return 109; + } + AA.verify_all(); AA.reset(); + if (test_0_9(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_9() failed."); + return 110; + } + AA.verify_all(); AA.reset(); + if (test_0_10(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_10() failed."); + return 111; + } + AA.verify_all(); AA.reset(); + if (test_0_11(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_11() failed."); + return 112; + } + AA.verify_all(); AA.reset(); + if (test_0_12(100, new AA(100), new AA(0)) != 100) { + Console.WriteLine("test_0_12() failed."); + return 113; + } + AA.verify_all(); AA.reset(); + if (test_1_0(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_0() failed."); + return 114; + } + AA.verify_all(); AA.reset(); + if (test_1_1(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_1() failed."); + return 115; + } + AA.verify_all(); AA.reset(); + if (test_1_2(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_2() failed."); + return 116; + } + AA.verify_all(); AA.reset(); + if (test_1_3(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_3() failed."); + return 117; + } + AA.verify_all(); AA.reset(); + if (test_1_4(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_4() failed."); + return 118; + } + AA.verify_all(); AA.reset(); + if (test_1_5(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_5() failed."); + return 119; + } + AA.verify_all(); AA.reset(); + if (test_1_6(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_6() failed."); + return 120; + } + AA.verify_all(); AA.reset(); + if (test_1_7(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_7() failed."); + return 121; + } + AA.verify_all(); AA.reset(); + if (test_1_8(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_8() failed."); + return 122; + } + AA.verify_all(); AA.reset(); + if (test_1_9(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_9() failed."); + return 123; + } + AA.verify_all(); AA.reset(); + if (test_1_10(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_10() failed."); + return 124; + } + AA.verify_all(); AA.reset(); + if (test_1_11(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_11() failed."); + return 125; + } + AA.verify_all(); AA.reset(); + if (test_1_12(100, ref AA._init, ref AA._zero) != 100) { + Console.WriteLine("test_1_12() failed."); + return 126; + } + AA.verify_all(); AA.reset(); + if (test_2_0(100) != 100) { + Console.WriteLine("test_2_0() failed."); + return 127; + } + AA.verify_all(); AA.reset(); + if (test_2_1(100) != 100) { + Console.WriteLine("test_2_1() failed."); + return 128; + } + AA.verify_all(); AA.reset(); + if (test_2_2(100) != 100) { + Console.WriteLine("test_2_2() failed."); + return 129; + } + AA.verify_all(); AA.reset(); + if (test_2_3(100) != 100) { + Console.WriteLine("test_2_3() failed."); + return 130; + } + AA.verify_all(); AA.reset(); + if (test_2_4(100) != 100) { + Console.WriteLine("test_2_4() failed."); + return 131; + } + AA.verify_all(); AA.reset(); + if (test_2_5(100) != 100) { + Console.WriteLine("test_2_5() failed."); + return 132; + } + AA.verify_all(); AA.reset(); + if (test_2_6(100) != 100) { + Console.WriteLine("test_2_6() failed."); + return 133; + } + AA.verify_all(); AA.reset(); + if (test_2_7(100) != 100) { + Console.WriteLine("test_2_7() failed."); + return 134; + } + AA.verify_all(); AA.reset(); + if (test_2_8(100) != 100) { + Console.WriteLine("test_2_8() failed."); + return 135; + } + AA.verify_all(); AA.reset(); + if (test_2_9(100) != 100) { + Console.WriteLine("test_2_9() failed."); + return 136; + } + AA.verify_all(); AA.reset(); + if (test_2_10(100) != 100) { + Console.WriteLine("test_2_10() failed."); + return 137; + } + AA.verify_all(); AA.reset(); + if (test_2_11(100) != 100) { + Console.WriteLine("test_2_11() failed."); + return 138; + } + AA.verify_all(); AA.reset(); + if (test_2_12(100) != 100) { + Console.WriteLine("test_2_12() failed."); + return 139; + } + AA.verify_all(); AA.reset(); + if (test_3_0(100) != 100) { + Console.WriteLine("test_3_0() failed."); + return 140; + } + AA.verify_all(); AA.reset(); + if (test_3_1(100) != 100) { + Console.WriteLine("test_3_1() failed."); + return 141; + } + AA.verify_all(); AA.reset(); + if (test_3_2(100) != 100) { + Console.WriteLine("test_3_2() failed."); + return 142; + } + AA.verify_all(); AA.reset(); + if (test_3_3(100) != 100) { + Console.WriteLine("test_3_3() failed."); + return 143; + } + AA.verify_all(); AA.reset(); + if (test_3_4(100) != 100) { + Console.WriteLine("test_3_4() failed."); + return 144; + } + AA.verify_all(); AA.reset(); + if (test_3_5(100) != 100) { + Console.WriteLine("test_3_5() failed."); + return 145; + } + AA.verify_all(); AA.reset(); + if (test_3_6(100) != 100) { + Console.WriteLine("test_3_6() failed."); + return 146; + } + AA.verify_all(); AA.reset(); + if (test_3_7(100) != 100) { + Console.WriteLine("test_3_7() failed."); + return 147; + } + AA.verify_all(); AA.reset(); + if (test_3_8(100) != 100) { + Console.WriteLine("test_3_8() failed."); + return 148; + } + AA.verify_all(); AA.reset(); + if (test_3_9(100) != 100) { + Console.WriteLine("test_3_9() failed."); + return 149; + } + AA.verify_all(); AA.reset(); + if (test_3_10(100) != 100) { + Console.WriteLine("test_3_10() failed."); + return 150; + } + AA.verify_all(); AA.reset(); + if (test_3_11(100) != 100) { + Console.WriteLine("test_3_11() failed."); + return 151; + } + AA.verify_all(); AA.reset(); + if (test_3_12(100) != 100) { + Console.WriteLine("test_3_12() failed."); + return 152; + } + AA.verify_all(); AA.reset(); + if (test_4_0(100) != 100) { + Console.WriteLine("test_4_0() failed."); + return 153; + } + AA.verify_all(); AA.reset(); + if (test_4_1(100) != 100) { + Console.WriteLine("test_4_1() failed."); + return 154; + } + AA.verify_all(); AA.reset(); + if (test_4_2(100) != 100) { + Console.WriteLine("test_4_2() failed."); + return 155; + } + AA.verify_all(); AA.reset(); + if (test_4_3(100) != 100) { + Console.WriteLine("test_4_3() failed."); + return 156; + } + AA.verify_all(); AA.reset(); + if (test_4_4(100) != 100) { + Console.WriteLine("test_4_4() failed."); + return 157; + } + AA.verify_all(); AA.reset(); + if (test_4_5(100) != 100) { + Console.WriteLine("test_4_5() failed."); + return 158; + } + AA.verify_all(); AA.reset(); + if (test_4_6(100) != 100) { + Console.WriteLine("test_4_6() failed."); + return 159; + } + AA.verify_all(); AA.reset(); + if (test_4_7(100) != 100) { + Console.WriteLine("test_4_7() failed."); + return 160; + } + AA.verify_all(); AA.reset(); + if (test_4_8(100) != 100) { + Console.WriteLine("test_4_8() failed."); + return 161; + } + AA.verify_all(); AA.reset(); + if (test_4_9(100) != 100) { + Console.WriteLine("test_4_9() failed."); + return 162; + } + AA.verify_all(); AA.reset(); + if (test_4_10(100) != 100) { + Console.WriteLine("test_4_10() failed."); + return 163; + } + AA.verify_all(); AA.reset(); + if (test_4_11(100) != 100) { + Console.WriteLine("test_4_11() failed."); + return 164; + } + AA.verify_all(); AA.reset(); + if (test_4_12(100) != 100) { + Console.WriteLine("test_4_12() failed."); + return 165; + } + AA.verify_all(); AA.reset(); + if (test_5_0(100) != 100) { + Console.WriteLine("test_5_0() failed."); + return 166; + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_0(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_0() failed."); + return 168; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_1(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_1() failed."); + return 169; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_2(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_2() failed."); + return 170; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_3(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_3() failed."); + return 171; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_4(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_4() failed."); + return 172; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_5(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_5() failed."); + return 173; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_6(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_6() failed."); + return 174; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_7(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_7() failed."); + return 175; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_8(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_8() failed."); + return 176; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_9(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_9() failed."); + return 177; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_10(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_10() failed."); + return 178; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_11(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_11() failed."); + return 179; + } + } + AA.verify_all(); AA.reset(); + fixed (void *p_init = &AA._init, p_zero = &AA._zero) { + if (test_7_12(100, p_init, p_zero) != 100) { + Console.WriteLine("test_7_12() failed."); + return 180; + } + } + AA.verify_all(); Console.WriteLine("All tests passed."); + return 100; + } } diff --git a/src/tests/Regressions/coreclr/0041/expl_double_1.csproj b/src/tests/Regressions/coreclr/0041/expl_double_1.csproj index 994158ad40622..cf5122f81b380 100644 --- a/src/tests/Regressions/coreclr/0041/expl_double_1.csproj +++ b/src/tests/Regressions/coreclr/0041/expl_double_1.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/0044/nullable.cs b/src/tests/Regressions/coreclr/0044/nullable.cs index 98a20c61ad1e4..4ce4fd9bfb0bf 100644 --- a/src/tests/Regressions/coreclr/0044/nullable.cs +++ b/src/tests/Regressions/coreclr/0044/nullable.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 Nullable { @@ -17,7 +18,8 @@ public static bool Run() return BoxUnboxToNQ(i); } - public static int Main() + [Fact] + public static int TestEntryPoint() { if (Run()) { diff --git a/src/tests/Regressions/coreclr/0044/nullable.csproj b/src/tests/Regressions/coreclr/0044/nullable.csproj index 46604c5ac02ce..c42f72e54eff1 100644 --- a/src/tests/Regressions/coreclr/0044/nullable.csproj +++ b/src/tests/Regressions/coreclr/0044/nullable.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/0046/istype.cs b/src/tests/Regressions/coreclr/0046/istype.cs index c1a23178a4c93..8d93be40903d3 100644 --- a/src/tests/Regressions/coreclr/0046/istype.cs +++ b/src/tests/Regressions/coreclr/0046/istype.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; public struct MyStruct {} public class IsType { - public static int Main() + [Fact] + public static int TestEntryPoint() { MyStruct? m = default(MyStruct); object o = m; diff --git a/src/tests/Regressions/coreclr/0046/istype.csproj b/src/tests/Regressions/coreclr/0046/istype.csproj index 5aa0c04627bda..69a38481cf7b1 100644 --- a/src/tests/Regressions/coreclr/0046/istype.csproj +++ b/src/tests/Regressions/coreclr/0046/istype.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/0075/LargeArrayTest.csproj b/src/tests/Regressions/coreclr/0075/LargeArrayTest.csproj index a823b8cbbed38..a971c534ac00d 100644 --- a/src/tests/Regressions/coreclr/0075/LargeArrayTest.csproj +++ b/src/tests/Regressions/coreclr/0075/LargeArrayTest.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/0075/largearraytest.cs b/src/tests/Regressions/coreclr/0075/largearraytest.cs index 0acb5d2cd85aa..7ece57316064a 100644 --- a/src/tests/Regressions/coreclr/0075/largearraytest.cs +++ b/src/tests/Regressions/coreclr/0075/largearraytest.cs @@ -8,11 +8,13 @@ */ using System; +using Xunit; public class LargeArrayTest { - public static int Main() + [Fact] + public static int TestEntryPoint() { int lowerBound = 100; diff --git a/src/tests/Regressions/coreclr/0080/delete_next_card_table.cs b/src/tests/Regressions/coreclr/0080/delete_next_card_table.cs index 11900cbe036c9..ae661c91affb8 100644 --- a/src/tests/Regressions/coreclr/0080/delete_next_card_table.cs +++ b/src/tests/Regressions/coreclr/0080/delete_next_card_table.cs @@ -10,13 +10,14 @@ using System; using System.Collections; using System.Collections.Generic; +using Xunit; public class delete_next_card_table { - public static int Main() + [Fact] + public static void TestEntryPoint() { new delete_next_card_table().DoMemoryChurn(); - return 100; } // this function attempts to allocate & free large amounts diff --git a/src/tests/Regressions/coreclr/0080/delete_next_card_table.csproj b/src/tests/Regressions/coreclr/0080/delete_next_card_table.csproj index 9402abd6c3c20..97c2b696dd1de 100644 --- a/src/tests/Regressions/coreclr/0080/delete_next_card_table.csproj +++ b/src/tests/Regressions/coreclr/0080/delete_next_card_table.csproj @@ -1,6 +1,7 @@ - Exe + + true true true true diff --git a/src/tests/Regressions/coreclr/0099/AboveStackLimit.csproj b/src/tests/Regressions/coreclr/0099/AboveStackLimit.csproj index 6026503b13e4d..7314f0bbdb337 100644 --- a/src/tests/Regressions/coreclr/0099/AboveStackLimit.csproj +++ b/src/tests/Regressions/coreclr/0099/AboveStackLimit.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/0099/abovestacklimit.cs b/src/tests/Regressions/coreclr/0099/abovestacklimit.cs index 377d03680d54c..ad8d106f84cf0 100644 --- a/src/tests/Regressions/coreclr/0099/abovestacklimit.cs +++ b/src/tests/Regressions/coreclr/0099/abovestacklimit.cs @@ -1,9 +1,11 @@ // 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 Test_abovestacklimit{ - public static int Main(){ +public class Test_abovestacklimit{ + [Fact] + public static int TestEntryPoint(){ int retVal; TestLibrary.TestFramework.BeginTestCase("Jitting a large method"); diff --git a/src/tests/Regressions/coreclr/0211/genrecur.cs b/src/tests/Regressions/coreclr/0211/genrecur.cs index 7fbc87937675b..6f992bc4021ca 100644 --- a/src/tests/Regressions/coreclr/0211/genrecur.cs +++ b/src/tests/Regressions/coreclr/0211/genrecur.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; // Some generally-useful stuff public class List { } @@ -917,7 +918,8 @@ public static void Test() public class M { - public static int Main() { + [Fact] + public static int TestEntryPoint() { Test1.Test(); if (Utils.failures == 0) Console.WriteLine("Test1 OK"); Test2.Test(); diff --git a/src/tests/Regressions/coreclr/0211/genrecur.csproj b/src/tests/Regressions/coreclr/0211/genrecur.csproj index a3a7874d48982..64a7b3698cceb 100644 --- a/src/tests/Regressions/coreclr/0211/genrecur.csproj +++ b/src/tests/Regressions/coreclr/0211/genrecur.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/0416/hello.cs b/src/tests/Regressions/coreclr/0416/hello.cs deleted file mode 100644 index a476fa26b13f9..0000000000000 --- a/src/tests/Regressions/coreclr/0416/hello.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -using System; - -public class Hello -{ - public static int Main() - { - Console.WriteLine("Make sure to set the following env vars:"); - Console.WriteLine(" DOTNET_LogEnable=1"); - Console.WriteLine(" DOTNET_LogToConsole=1"); - Console.WriteLine("This test ensures that logging is working"); - return 100; - } -} diff --git a/src/tests/Regressions/coreclr/0416/hello.csproj b/src/tests/Regressions/coreclr/0416/hello.csproj deleted file mode 100644 index 74a9cbf8e940d..0000000000000 --- a/src/tests/Regressions/coreclr/0416/hello.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - true - 1 - - - - - diff --git a/src/tests/Regressions/coreclr/0487/test.cs b/src/tests/Regressions/coreclr/0487/test.cs index ef2c82d20780a..0226d266aa7f0 100644 --- a/src/tests/Regressions/coreclr/0487/test.cs +++ b/src/tests/Regressions/coreclr/0487/test.cs @@ -6,77 +6,77 @@ using System; using System.Threading; +using Xunit; public delegate T D(T t); - + public class Gen -{ - public static void Init() - { - Ev+=new D(Gen.OnEv); - } +{ + public static void Init() + { + Ev+=new D(Gen.OnEv); + } - static Gen() - { - Console.WriteLine("Call to CCTor has bad side effects"); - } + static Gen() + { + Console.WriteLine("Call to CCTor has bad side effects"); + } - private static D FldEv; - - public static event D Ev - { - add - { - FldEv+=value; - } - remove - { - FldEv-=value; - } - } + private static D FldEv; + + public static event D Ev + { + add + { + FldEv+=value; + } + remove + { + FldEv-=value; + } + } - public static T OnEv(T t) { return t; } + public static T OnEv(T t) { return t; } - public static void AsyncFireEv(T t) - { - Console.WriteLine("AsyncFireEv"); - try - { - IAsyncResult ar = FldEv.BeginInvoke(t,null,null); - ar.AsyncWaitHandle.WaitOne(); - Test_test.Eval(t.Equals(FldEv.EndInvoke(ar))); - } - catch (NotSupportedException) - { - // expected - Test_test.Eval(true); - } - } + public static void AsyncFireEv(T t) + { + Console.WriteLine("AsyncFireEv"); + try + { + IAsyncResult ar = FldEv.BeginInvoke(t,null,null); + ar.AsyncWaitHandle.WaitOne(); + Test_test.Eval(t.Equals(FldEv.EndInvoke(ar))); + } + catch (NotSupportedException) + { + // expected + Test_test.Eval(true); + } + } } - + public class Test_test { - public static int counter = 0; - public static bool result = true; - public static void Eval(bool exp) - { - counter++; - if (!exp) - { - result = exp; - Console.WriteLine("Test Failed at location: " + counter); - } - } - - public static int Main() - { - - Gen.Init(); - Gen.AsyncFireEv("X"); + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + } + + [Fact] + public static void TestEntryPoint() + { + + Gen.Init(); + Gen.AsyncFireEv("X"); - Console.WriteLine("PASS"); - - return 100; - } + Console.WriteLine("PASS"); + } } diff --git a/src/tests/Regressions/coreclr/0487/test.csproj b/src/tests/Regressions/coreclr/0487/test.csproj index 3d3c6346f4214..e763068e76f1f 100644 --- a/src/tests/Regressions/coreclr/0487/test.csproj +++ b/src/tests/Regressions/coreclr/0487/test.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/0582/csgen.1.cs b/src/tests/Regressions/coreclr/0582/csgen.1.cs index 8180ae2f851c4..47744fbf93b4b 100644 --- a/src/tests/Regressions/coreclr/0582/csgen.1.cs +++ b/src/tests/Regressions/coreclr/0582/csgen.1.cs @@ -3,459 +3,460 @@ using System; using System.Collections; using System.Runtime.InteropServices; +using Xunit; #pragma warning disable 1717 #pragma warning disable 0219 public enum TestEnum { - red = 1, - green = 2, - blue = 4, + red = 1, + green = 2, + blue = 4, } public class AA where TA: IComparable { - public TB m_agboGeneric1; - public static void Static1(Array param1, ref TB param2, ulong[,,] param3, ref - byte param4) - { - if (App.m_bFwd1) - goto label1; - label1: - while (App.m_bFwd1) - { - TestEnum[,] local1 = (new TestEnum[28u, 111u]); - long local2 = App.m_lFwd2; - if (App.m_bFwd1) - param3 = param3; - else - { - uint local3 = 51u; - TestEnum[,,][,][] local4 = (new TestEnum[116u, 1u, 102u][,][]); - do - { - throw new NullReferenceException(); - } - while(App.m_bFwd1); - param1 = param1; - local2 -= local2; - if (App.m_bFwd1) - try - { - Array[,][,][,,][][,][,][][] local5 = (new Array[83u, 103u] - [,][,,][][,][,][][]); - Array[,,] local6 = (new Array[30u, 6u, 41u]); - param3[34, 110, 27] = App.m_ulFwd3; - param1 = param1; - local6[80, 2, 50] = param1; - local1[63, 60] = TestEnum.red; - } - catch (NullReferenceException) - { - bool local7 = true; - if (local7) - continue; - } - else - if (App.m_bFwd1) - if (App.m_bFwd1) - local3 = local3; - else - local2 -= local2; - } - param2 = param2; - try - { - char[,,][,,,,,] local8 = (new char[35u, 100u, 38u][,,,,,]); - char[,] local9 = (new char[97u, 33u]); - ulong local10 = App.m_ulFwd3; - param4 = param4; - param3 = (new ulong[63u, 9u, 18u]); - if (App.m_bFwd1) - do - { - param4 = param4; - local9 = (new char[125u, 118u]); - try - { - while (App.m_bFwd1) - { - do - { - TestEnum local11 = 0; - BB[] local12 = new BB[]{new BB() }; - object[][] local13 = (new object[33u][]); - } - while(App.m_bFwd1); - continue; - } - try - { - BB[,,][,,][][] local14 = (new BB[76u, 111u, 60u][,,][][]); - } - finally - { - } - while (App.m_bFwd1) - { - } - } - catch (Exception) - { - } - if (App.m_bFwd1) - do - { - } - while(App.m_bFwd1); - } - while(App.m_bFwd1); - return; - } - catch (InvalidOperationException) - { - } - try - { - } - catch (Exception) - { - } - } - do - { - } - while(App.m_bFwd1); - ; - } - public static bool[,,,] Static2(bool[,][,,] param1, ref ulong[] param2, TA - param3, TB param4, TA param5, TB param6) - { - ulong local15 = App.m_ulFwd3; - param3 = param5; - local15 = local15; - for (App.m_byFwd4-=App.m_byFwd4; App.m_bFwd1; App.m_iFwd5++) - { - BB[][,,][,,,] local16 = new BB[][,,][,,,]{(new BB[115u, 22u, 97u][,,,]), - (new BB[71u, 101u, 72u][,,,]), (new BB[94u, 124u, 8u][,,,]) }; - TestEnum[,,,,] local17 = (new TestEnum[62u, 63u, 7u, 49u, 79u]); - for (App.m_fFwd6=50.0f; App.m_bFwd1; App.m_iFwd5*=121) - { - sbyte local18 = App.m_sbyFwd7; - ushort local19 = App.m_ushFwd8; - for (App.m_lFwd2=App.m_lFwd2; App.m_bFwd1; App.m_chFwd9-='\x09') - { - continue; - } - } - do - { - BB[,][][][,,][] local20 = (new BB[90u, 91u][][][,,][]); - for (App.m_iFwd5--; App.m_bFwd1; App.m_byFwd4++) - { - BB[,] local21 = (new BB[124u, 91u]); - long[,][,][][,] local22 = (new long[115u, 83u][,][][,]); - for (App.m_shFwd10=App.m_shFwd10; App.m_bFwd1; App.m_ushFwd8++) - { - char[][][,,] local23 = new char[][][,,]{ }; - TestEnum[,,][,][,,,][] local24 = (new TestEnum[29u, 90u, 44u][,][,,,][]); - object[][] local25 = new object[][]{(new object[92u]), new object[]{null, - null, null, null } }; - try - { - ulong local26 = App.m_ulFwd3; - while (App.m_bFwd1) - { - ushort[,] local27 = (new ushort[35u, 110u]); - long[,] local28 = (new long[73u, 43u]); - param4 = param4; - throw new IndexOutOfRangeException(); - } - if (App.m_bFwd1) - for (App.m_fFwd6+=7.0f; App.m_bFwd1; App.m_byFwd4++) - { - throw new DivideByZeroException(); - } - } - catch (DivideByZeroException) - { - do - { - try - { - local21[123, 75].m_axField1[73] = new Array[][,,,]{(new Array[102u, 56u - , 82u, 63u]) }; - } - finally - { - } - local22 = local22; - try - { - } - catch (DivideByZeroException) - { - } - try - { - } - catch (IndexOutOfRangeException) - { - } - } - while(App.m_bFwd1); - throw new NullReferenceException(); - } - while (App.m_bFwd1) - { - } - } - do - { - } - while(App.m_bFwd1); - do - { - } - while(App.m_bFwd1); - local15 = local15; - } - while (App.m_bFwd1) - { - } - while (App.m_bFwd1) - { - } - throw new InvalidOperationException(); - } - while(App.m_bFwd1); - } - param5 = param5; - return (new bool[38u, 121u, 77u, 3u]); - } - public static sbyte Static3(uint param1, ref short param2) - { - BB local29 = new BB(); - try - { - param1 -= 33u; - } - catch (NullReferenceException) - { - ulong[] local30 = (new ulong[122u]); - byte local31 = App.m_byFwd4; - for (App.m_lFwd2++; App.m_bFwd1; App.m_chFwd9-='\x6c') - { - TestEnum[,,][][] local32 = (new TestEnum[109u, 121u, 75u][][]); - ushort[,,,,][][][] local33 = (new ushort[44u, 28u, 97u, 45u, 88u][][][]); - throw new Exception(); - } - goto label2; - } - label2: - return App.m_sbyFwd7; - } - public static int Static4(TB param1, ref Array[][,,][,,] param2, ref TB param3 - , char param4) - { - ushort[,,][,][][] local34 = (new ushort[18u, 54u, 39u][,][][]); - short local35 = App.m_shFwd10; - return 80; - } + public TB m_agboGeneric1; + public static void Static1(Array param1, ref TB param2, ulong[,,] param3, ref + byte param4) + { + if (App.m_bFwd1) + goto label1; + label1: + while (App.m_bFwd1) + { + TestEnum[,] local1 = (new TestEnum[28u, 111u]); + long local2 = App.m_lFwd2; + if (App.m_bFwd1) + param3 = param3; + else + { + uint local3 = 51u; + TestEnum[,,][,][] local4 = (new TestEnum[116u, 1u, 102u][,][]); + do + { + throw new NullReferenceException(); + } + while(App.m_bFwd1); + param1 = param1; + local2 -= local2; + if (App.m_bFwd1) + try + { + Array[,][,][,,][][,][,][][] local5 = (new Array[83u, 103u] + [,][,,][][,][,][][]); + Array[,,] local6 = (new Array[30u, 6u, 41u]); + param3[34, 110, 27] = App.m_ulFwd3; + param1 = param1; + local6[80, 2, 50] = param1; + local1[63, 60] = TestEnum.red; + } + catch (NullReferenceException) + { + bool local7 = true; + if (local7) + continue; + } + else + if (App.m_bFwd1) + if (App.m_bFwd1) + local3 = local3; + else + local2 -= local2; + } + param2 = param2; + try + { + char[,,][,,,,,] local8 = (new char[35u, 100u, 38u][,,,,,]); + char[,] local9 = (new char[97u, 33u]); + ulong local10 = App.m_ulFwd3; + param4 = param4; + param3 = (new ulong[63u, 9u, 18u]); + if (App.m_bFwd1) + do + { + param4 = param4; + local9 = (new char[125u, 118u]); + try + { + while (App.m_bFwd1) + { + do + { + TestEnum local11 = 0; + BB[] local12 = new BB[]{new BB() }; + object[][] local13 = (new object[33u][]); + } + while(App.m_bFwd1); + continue; + } + try + { + BB[,,][,,][][] local14 = (new BB[76u, 111u, 60u][,,][][]); + } + finally + { + } + while (App.m_bFwd1) + { + } + } + catch (Exception) + { + } + if (App.m_bFwd1) + do + { + } + while(App.m_bFwd1); + } + while(App.m_bFwd1); + return; + } + catch (InvalidOperationException) + { + } + try + { + } + catch (Exception) + { + } + } + do + { + } + while(App.m_bFwd1); + ; + } + public static bool[,,,] Static2(bool[,][,,] param1, ref ulong[] param2, TA + param3, TB param4, TA param5, TB param6) + { + ulong local15 = App.m_ulFwd3; + param3 = param5; + local15 = local15; + for (App.m_byFwd4-=App.m_byFwd4; App.m_bFwd1; App.m_iFwd5++) + { + BB[][,,][,,,] local16 = new BB[][,,][,,,]{(new BB[115u, 22u, 97u][,,,]), + (new BB[71u, 101u, 72u][,,,]), (new BB[94u, 124u, 8u][,,,]) }; + TestEnum[,,,,] local17 = (new TestEnum[62u, 63u, 7u, 49u, 79u]); + for (App.m_fFwd6=50.0f; App.m_bFwd1; App.m_iFwd5*=121) + { + sbyte local18 = App.m_sbyFwd7; + ushort local19 = App.m_ushFwd8; + for (App.m_lFwd2=App.m_lFwd2; App.m_bFwd1; App.m_chFwd9-='\x09') + { + continue; + } + } + do + { + BB[,][][][,,][] local20 = (new BB[90u, 91u][][][,,][]); + for (App.m_iFwd5--; App.m_bFwd1; App.m_byFwd4++) + { + BB[,] local21 = (new BB[124u, 91u]); + long[,][,][][,] local22 = (new long[115u, 83u][,][][,]); + for (App.m_shFwd10=App.m_shFwd10; App.m_bFwd1; App.m_ushFwd8++) + { + char[][][,,] local23 = new char[][][,,]{ }; + TestEnum[,,][,][,,,][] local24 = (new TestEnum[29u, 90u, 44u][,][,,,][]); + object[][] local25 = new object[][]{(new object[92u]), new object[]{null, + null, null, null } }; + try + { + ulong local26 = App.m_ulFwd3; + while (App.m_bFwd1) + { + ushort[,] local27 = (new ushort[35u, 110u]); + long[,] local28 = (new long[73u, 43u]); + param4 = param4; + throw new IndexOutOfRangeException(); + } + if (App.m_bFwd1) + for (App.m_fFwd6+=7.0f; App.m_bFwd1; App.m_byFwd4++) + { + throw new DivideByZeroException(); + } + } + catch (DivideByZeroException) + { + do + { + try + { + local21[123, 75].m_axField1[73] = new Array[][,,,]{(new Array[102u, 56u + , 82u, 63u]) }; + } + finally + { + } + local22 = local22; + try + { + } + catch (DivideByZeroException) + { + } + try + { + } + catch (IndexOutOfRangeException) + { + } + } + while(App.m_bFwd1); + throw new NullReferenceException(); + } + while (App.m_bFwd1) + { + } + } + do + { + } + while(App.m_bFwd1); + do + { + } + while(App.m_bFwd1); + local15 = local15; + } + while (App.m_bFwd1) + { + } + while (App.m_bFwd1) + { + } + throw new InvalidOperationException(); + } + while(App.m_bFwd1); + } + param5 = param5; + return (new bool[38u, 121u, 77u, 3u]); + } + public static sbyte Static3(uint param1, ref short param2) + { + BB local29 = new BB(); + try + { + param1 -= 33u; + } + catch (NullReferenceException) + { + ulong[] local30 = (new ulong[122u]); + byte local31 = App.m_byFwd4; + for (App.m_lFwd2++; App.m_bFwd1; App.m_chFwd9-='\x6c') + { + TestEnum[,,][][] local32 = (new TestEnum[109u, 121u, 75u][][]); + ushort[,,,,][][][] local33 = (new ushort[44u, 28u, 97u, 45u, 88u][][][]); + throw new Exception(); + } + goto label2; + } + label2: + return App.m_sbyFwd7; + } + public static int Static4(TB param1, ref Array[][,,][,,] param2, ref TB param3 + , char param4) + { + ushort[,,][,][][] local34 = (new ushort[18u, 54u, 39u][,][][]); + short local35 = App.m_shFwd10; + return 80; + } } public struct BB { - public Array[][][,,,] m_axField1; - public static void Static1(double[][,,] param1, ref bool param2, TestEnum - param3, ref float param4) - { - if (param2) - param2 = param2; - else - { - for (App.m_ushFwd8+=App.m_ushFwd8; param2; App.m_ushFwd8++) - { - sbyte[][] local36 = new sbyte[][]{(new sbyte[14u]) }; - ushort[,,] local37 = (new ushort[113u, 103u, 65u]); - String local38 = "108"; - param2 = param2; - } - while (param2) - { - while (param2) - { - ushort local39 = App.m_ushFwd8; - if (param2) - try - { - BB local40 = new BB(); - ushort local41 = App.m_ushFwd8; - local41 += local41; - do - { - for (App.m_byFwd4++; param2; App.m_lFwd2*=App.m_lFwd2) - { - ulong[,][][] local42 = (new ulong[60u, 24u][][]); - Array local43 = App.m_xFwd11; - try - { - Array[] local44 = (new Array[100u]); - int local45 = 17; - BB[][,][,][][,][] local46 = new BB[][,][,][][,][]{ }; - local43 = local43; - } - catch (Exception) - { - String[,,,,] local47 = (new String[91u, 102u, 91u, 75u, 88u]); - Array[,][] local48 = (new Array[125u, 114u][]); - object local49 = null; - for (App.m_chFwd9+='\x2b'; param2; App.m_chFwd9++) - { - param2 = true; - local39 += local39; - try - { - param2 = param2; - } - finally - { - } - } - while (param2) - { - } - } - local40 = new BB(); - while (param2) - { - } - while (param2) - { - } - } - try - { - } - catch (Exception) - { - } - return; - } - while(param2); - local40.m_axField1[10][53][56, 118, 114, 54] = App.m_xFwd11; - } - catch (InvalidOperationException) - { - } - else - throw new Exception(); - do - { - } - while(param2); - } - if (param2) - try - { - } - catch (Exception) - { - } - try - { - } - catch (Exception) - { - } - } - param3 = 0; - } - while (param2) - { - } - if (param2) - throw new DivideByZeroException(); - param4 /= param4; - ; - } + public Array[][][,,,] m_axField1; + public static void Static1(double[][,,] param1, ref bool param2, TestEnum + param3, ref float param4) + { + if (param2) + param2 = param2; + else + { + for (App.m_ushFwd8+=App.m_ushFwd8; param2; App.m_ushFwd8++) + { + sbyte[][] local36 = new sbyte[][]{(new sbyte[14u]) }; + ushort[,,] local37 = (new ushort[113u, 103u, 65u]); + String local38 = "108"; + param2 = param2; + } + while (param2) + { + while (param2) + { + ushort local39 = App.m_ushFwd8; + if (param2) + try + { + BB local40 = new BB(); + ushort local41 = App.m_ushFwd8; + local41 += local41; + do + { + for (App.m_byFwd4++; param2; App.m_lFwd2*=App.m_lFwd2) + { + ulong[,][][] local42 = (new ulong[60u, 24u][][]); + Array local43 = App.m_xFwd11; + try + { + Array[] local44 = (new Array[100u]); + int local45 = 17; + BB[][,][,][][,][] local46 = new BB[][,][,][][,][]{ }; + local43 = local43; + } + catch (Exception) + { + String[,,,,] local47 = (new String[91u, 102u, 91u, 75u, 88u]); + Array[,][] local48 = (new Array[125u, 114u][]); + object local49 = null; + for (App.m_chFwd9+='\x2b'; param2; App.m_chFwd9++) + { + param2 = true; + local39 += local39; + try + { + param2 = param2; + } + finally + { + } + } + while (param2) + { + } + } + local40 = new BB(); + while (param2) + { + } + while (param2) + { + } + } + try + { + } + catch (Exception) + { + } + return; + } + while(param2); + local40.m_axField1[10][53][56, 118, 114, 54] = App.m_xFwd11; + } + catch (InvalidOperationException) + { + } + else + throw new Exception(); + do + { + } + while(param2); + } + if (param2) + try + { + } + catch (Exception) + { + } + try + { + } + catch (Exception) + { + } + } + param3 = 0; + } + while (param2) + { + } + if (param2) + throw new DivideByZeroException(); + param4 /= param4; + ; + } } public class App { - public static int Main() - { - try - { - AA.Static1( - App.m_xFwd11, - ref App.m_agboFwd12, - (new ulong[50u, 40u, 98u]), - ref App.m_byFwd4 ); - } - catch (Exception) - { - } - try - { - AA.Static2( - (new bool[72u, 126u][,,]), - ref App.m_aulFwd13, - App.m_gcFwd14, - App.m_agboFwd12, - App.m_gcFwd14, - App.m_agboFwd12 ); - } - catch (Exception) - { - } - try - { - AA.Static3( - 34u, - ref App.m_shFwd10 ); - } - catch (Exception) - { - } - try - { - AA.Static4( - App.m_agboFwd12, - ref App.m_axFwd15, - ref App.m_agboFwd12, - '\x50' ); - } - catch (Exception) - { - } - try - { - BB.Static1( - (new double[101u][,,]), - ref App.m_bFwd1, - TestEnum.red, - ref App.m_fFwd6 ); - } - catch (Exception) - { - } - return 100; - } - public static bool m_bFwd1; - public static long m_lFwd2; - public static ulong m_ulFwd3; - public static byte m_byFwd4; - public static int m_iFwd5; - public static float m_fFwd6; - public static sbyte m_sbyFwd7; - public static ushort m_ushFwd8; - public static char m_chFwd9; - public static short m_shFwd10; - public static Array m_xFwd11; - public static bool m_agboFwd12; - public static ulong[] m_aulFwd13; - public static char m_gcFwd14; - public static Array[][,,][,,] m_axFwd15; + [Fact] + public static void TestEntryPoint() + { + try + { + AA.Static1( + App.m_xFwd11, + ref App.m_agboFwd12, + (new ulong[50u, 40u, 98u]), + ref App.m_byFwd4 ); + } + catch (Exception) + { + } + try + { + AA.Static2( + (new bool[72u, 126u][,,]), + ref App.m_aulFwd13, + App.m_gcFwd14, + App.m_agboFwd12, + App.m_gcFwd14, + App.m_agboFwd12 ); + } + catch (Exception) + { + } + try + { + AA.Static3( + 34u, + ref App.m_shFwd10 ); + } + catch (Exception) + { + } + try + { + AA.Static4( + App.m_agboFwd12, + ref App.m_axFwd15, + ref App.m_agboFwd12, + '\x50' ); + } + catch (Exception) + { + } + try + { + BB.Static1( + (new double[101u][,,]), + ref App.m_bFwd1, + TestEnum.red, + ref App.m_fFwd6 ); + } + catch (Exception) + { + } + } + public static bool m_bFwd1; + public static long m_lFwd2; + public static ulong m_ulFwd3; + public static byte m_byFwd4; + public static int m_iFwd5; + public static float m_fFwd6; + public static sbyte m_sbyFwd7; + public static ushort m_ushFwd8; + public static char m_chFwd9; + public static short m_shFwd10; + public static Array m_xFwd11; + public static bool m_agboFwd12; + public static ulong[] m_aulFwd13; + public static char m_gcFwd14; + public static Array[][,,][,,] m_axFwd15; } diff --git a/src/tests/Regressions/coreclr/0582/csgen.1.csproj b/src/tests/Regressions/coreclr/0582/csgen.1.csproj index 9e1c97a378a9c..34e0eb2dd64b4 100644 --- a/src/tests/Regressions/coreclr/0582/csgen.1.csproj +++ b/src/tests/Regressions/coreclr/0582/csgen.1.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/1514/InterlockExchange.csproj b/src/tests/Regressions/coreclr/1514/InterlockExchange.csproj index 14edf680c300e..bc38b780eb0d1 100644 --- a/src/tests/Regressions/coreclr/1514/InterlockExchange.csproj +++ b/src/tests/Regressions/coreclr/1514/InterlockExchange.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/1514/interlockexchange.cs b/src/tests/Regressions/coreclr/1514/interlockexchange.cs index 4e0dbabbfdda8..6f68db541f9de 100644 --- a/src/tests/Regressions/coreclr/1514/interlockexchange.cs +++ b/src/tests/Regressions/coreclr/1514/interlockexchange.cs @@ -2,58 +2,60 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Threading; +using Xunit; -class Program +public class Program { - static long x; + static long x; - static void DoWork() - { - for (int i=0; i<5000; i++) - { - Interlocked.Add(ref x, 1); - Interlocked.Add(ref x, -1); - } - } - - static int Main() - { - Thread[] threads; - bool retVal; + static void DoWork() + { + for (int i=0; i<5000; i++) + { + Interlocked.Add(ref x, 1); + Interlocked.Add(ref x, -1); + } + } + + [Fact] + public static int TestEntryPoint() + { + Thread[] threads; + bool retVal; - threads = new Thread[99]; - retVal = true; + threads = new Thread[99]; + retVal = true; - for (int j=0; j<10; j++) - { - x = 0; - for (int i = 0; i < 99; i += 1) - { - threads[i] = new Thread(DoWork); - threads[i].Start(); - } - for (int i = 0; i < 99; i += 1) - { - threads[i].Join(); - } - long y = Interlocked.Add(ref x, 0); + for (int j=0; j<10; j++) + { + x = 0; + for (int i = 0; i < 99; i += 1) + { + threads[i] = new Thread(DoWork); + threads[i].Start(); + } + for (int i = 0; i < 99; i += 1) + { + threads[i].Join(); + } + long y = Interlocked.Add(ref x, 0); - if (0 != y) - { - TestLibrary.Logging.WriteLine("Wrong value: " + y + " (0 expected)"); - retVal = false; - } - } + if (0 != y) + { + TestLibrary.Logging.WriteLine("Wrong value: " + y + " (0 expected)"); + retVal = false; + } + } - if (retVal && 0 == x) - { - TestLibrary.Logging.WriteLine("PASS"); - return 100; - } - else - { - TestLibrary.Logging.WriteLine("FAIL x=" + x); - return 0; - } - } + if (retVal && 0 == x) + { + TestLibrary.Logging.WriteLine("PASS"); + return 100; + } + else + { + TestLibrary.Logging.WriteLine("FAIL x=" + x); + return 0; + } + } } diff --git a/src/tests/Regressions/coreclr/15241/genericcontext.il b/src/tests/Regressions/coreclr/15241/genericcontext.il index 80ce038f4810f..5db385f538aec 100644 --- a/src/tests/Regressions/coreclr/15241/genericcontext.il +++ b/src/tests/Regressions/coreclr/15241/genericcontext.il @@ -29,7 +29,7 @@ extends [mscorlib]System.Object { } -.class private auto ansi beforefieldinit Fooer`1 +.class public auto ansi beforefieldinit Fooer`1 extends [mscorlib]System.Object implements class IFoo`1> { diff --git a/src/tests/Regressions/coreclr/15241/genericcontext.ilproj b/src/tests/Regressions/coreclr/15241/genericcontext.ilproj index b84ea246a62c6..fb753683d328d 100644 --- a/src/tests/Regressions/coreclr/15241/genericcontext.ilproj +++ b/src/tests/Regressions/coreclr/15241/genericcontext.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/15647/interfacestatics.il b/src/tests/Regressions/coreclr/15647/interfacestatics.il index 971096939739d..2823a30451e77 100644 --- a/src/tests/Regressions/coreclr/15647/interfacestatics.il +++ b/src/tests/Regressions/coreclr/15647/interfacestatics.il @@ -6,7 +6,7 @@ .assembly extern System.Runtime { } -.class interface IFoo +.class public interface IFoo { .field public static class [System.Runtime]System.Type O @@ -39,7 +39,7 @@ } } -.method static hidebysig int32 Main() +.method public static hidebysig int32 Main() { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 diff --git a/src/tests/Regressions/coreclr/15647/interfacestatics.ilproj b/src/tests/Regressions/coreclr/15647/interfacestatics.ilproj index a70122bfd723e..edbdfc39fbeab 100644 --- a/src/tests/Regressions/coreclr/15647/interfacestatics.ilproj +++ b/src/tests/Regressions/coreclr/15647/interfacestatics.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/15650/interfacecctor.il b/src/tests/Regressions/coreclr/15650/interfacecctor.il index e732f9f121106..05a4ce826002d 100644 --- a/src/tests/Regressions/coreclr/15650/interfacecctor.il +++ b/src/tests/Regressions/coreclr/15650/interfacecctor.il @@ -24,7 +24,7 @@ } } -.class private auto ansi beforefieldinit Fooer +.class public auto ansi beforefieldinit Fooer extends [mscorlib]System.Object implements IFoo { @@ -40,7 +40,7 @@ .field public static int32 s_result -.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/Regressions/coreclr/15650/interfacecctor.ilproj b/src/tests/Regressions/coreclr/15650/interfacecctor.ilproj index 2a18e00f4d9ee..06ca3fe4b0873 100644 --- a/src/tests/Regressions/coreclr/15650/interfacecctor.ilproj +++ b/src/tests/Regressions/coreclr/15650/interfacecctor.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/15827/nonvirtualcall.il b/src/tests/Regressions/coreclr/15827/nonvirtualcall.il index b10cfbcfc1cf2..fdd90d80aa84c 100644 --- a/src/tests/Regressions/coreclr/15827/nonvirtualcall.il +++ b/src/tests/Regressions/coreclr/15827/nonvirtualcall.il @@ -34,7 +34,7 @@ } } -.class private auto ansi beforefieldinit Fooer +.class public auto ansi beforefieldinit Fooer extends [System.Runtime]System.Object implements IBar { diff --git a/src/tests/Regressions/coreclr/15827/nonvirtualcall.ilproj b/src/tests/Regressions/coreclr/15827/nonvirtualcall.ilproj index 0ea35ca9e403c..7c46b5e085624 100644 --- a/src/tests/Regressions/coreclr/15827/nonvirtualcall.ilproj +++ b/src/tests/Regressions/coreclr/15827/nonvirtualcall.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/16064/methodimpl.il b/src/tests/Regressions/coreclr/16064/methodimpl.il index 9e7376b44de64..0f766ae569920 100644 --- a/src/tests/Regressions/coreclr/16064/methodimpl.il +++ b/src/tests/Regressions/coreclr/16064/methodimpl.il @@ -29,7 +29,7 @@ } } -.class private auto ansi beforefieldinit Fooer +.class public auto ansi beforefieldinit Fooer extends [System.Runtime]System.Object implements IBar { diff --git a/src/tests/Regressions/coreclr/16064/methodimpl.ilproj b/src/tests/Regressions/coreclr/16064/methodimpl.ilproj index 91f49c362b059..8d528eef9a3f2 100644 --- a/src/tests/Regressions/coreclr/16064/methodimpl.ilproj +++ b/src/tests/Regressions/coreclr/16064/methodimpl.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/16123/ambiguousconstraint.il b/src/tests/Regressions/coreclr/16123/ambiguousconstraint.il index 62a2f81ec6a42..2e54926d0778a 100644 --- a/src/tests/Regressions/coreclr/16123/ambiguousconstraint.il +++ b/src/tests/Regressions/coreclr/16123/ambiguousconstraint.il @@ -42,7 +42,7 @@ { } -.class private auto ansi beforefieldinit Gen`1<(IFoo) T> +.class public auto ansi beforefieldinit Gen`1<(IFoo) T> extends [System.Runtime]System.Object { .method public hidebysig static int32 Check(!T x) cil managed diff --git a/src/tests/Regressions/coreclr/16123/ambiguousconstraint.ilproj b/src/tests/Regressions/coreclr/16123/ambiguousconstraint.ilproj index 6824d613e203d..5f94ff2d33559 100644 --- a/src/tests/Regressions/coreclr/16123/ambiguousconstraint.ilproj +++ b/src/tests/Regressions/coreclr/16123/ambiguousconstraint.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/16354/notimplemented.il b/src/tests/Regressions/coreclr/16354/notimplemented.il index 25697fd90761e..1292e209670c3 100644 --- a/src/tests/Regressions/coreclr/16354/notimplemented.il +++ b/src/tests/Regressions/coreclr/16354/notimplemented.il @@ -27,7 +27,7 @@ } } -.class private auto ansi beforefieldinit Fooer +.class public auto ansi beforefieldinit Fooer extends [System.Runtime]System.Object implements IBar, class IFoo`1 { diff --git a/src/tests/Regressions/coreclr/16354/notimplemented.ilproj b/src/tests/Regressions/coreclr/16354/notimplemented.ilproj index 309df005e230b..66165d6484cdb 100644 --- a/src/tests/Regressions/coreclr/16354/notimplemented.ilproj +++ b/src/tests/Regressions/coreclr/16354/notimplemented.ilproj @@ -1,6 +1,7 @@ - Exe + + true false diff --git a/src/tests/Regressions/coreclr/16355/boring.il b/src/tests/Regressions/coreclr/16355/boring.il index aadb0069930ac..a0ef5bbd5406b 100644 --- a/src/tests/Regressions/coreclr/16355/boring.il +++ b/src/tests/Regressions/coreclr/16355/boring.il @@ -54,7 +54,7 @@ } } -.class private auto ansi beforefieldinit Fooer +.class public auto ansi beforefieldinit Fooer extends [System.Runtime]System.Object implements IBar { diff --git a/src/tests/Regressions/coreclr/16355/boring.ilproj b/src/tests/Regressions/coreclr/16355/boring.ilproj index 199d5e7c01845..b877dbbc05ad7 100644 --- a/src/tests/Regressions/coreclr/16355/boring.ilproj +++ b/src/tests/Regressions/coreclr/16355/boring.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/16355/variance.il b/src/tests/Regressions/coreclr/16355/variance.il index 47483c6c9860a..7cc0265b7509a 100644 --- a/src/tests/Regressions/coreclr/16355/variance.il +++ b/src/tests/Regressions/coreclr/16355/variance.il @@ -25,7 +25,7 @@ } -.class private auto ansi beforefieldinit Fooer +.class public auto ansi beforefieldinit Fooer extends [System.Runtime]System.Object implements class IBar`1 { diff --git a/src/tests/Regressions/coreclr/16355/variance.ilproj b/src/tests/Regressions/coreclr/16355/variance.ilproj index e5c35eca7fda6..8f2d40c8f752f 100644 --- a/src/tests/Regressions/coreclr/16355/variance.ilproj +++ b/src/tests/Regressions/coreclr/16355/variance.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/16371/ptrarray.cs b/src/tests/Regressions/coreclr/16371/ptrarray.cs index 7651512673a46..42b0077f02374 100644 --- a/src/tests/Regressions/coreclr/16371/ptrarray.cs +++ b/src/tests/Regressions/coreclr/16371/ptrarray.cs @@ -1,7 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -unsafe class Program +using Xunit; +public unsafe class Program { static int*[,] s_mdArray; @@ -17,7 +18,8 @@ static Program() s_mdArray[1, 1] = (int*)2; } - static int Main() + [Fact] + public static int TestEntryPoint() { return (int)s_mdArray[0, 0] + (int)s_mdArray[1, 1]; } diff --git a/src/tests/Regressions/coreclr/16371/ptrarray.csproj b/src/tests/Regressions/coreclr/16371/ptrarray.csproj index 4a55d61620a59..f044fbbfbd589 100644 --- a/src/tests/Regressions/coreclr/16371/ptrarray.csproj +++ b/src/tests/Regressions/coreclr/16371/ptrarray.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 None diff --git a/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.il b/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.il index f0d52771a526e..20f32807c0b56 100644 --- a/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.il +++ b/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.il @@ -13,7 +13,7 @@ } } -.class private auto ansi beforefieldinit Fooer +.class public auto ansi beforefieldinit Fooer extends [System.Runtime]System.Object implements class IFoo`1, class IFoo`1 diff --git a/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.ilproj b/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.ilproj index b0344811f20df..f61399d4a92e5 100644 --- a/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.ilproj +++ b/src/tests/Regressions/coreclr/16775/sharedinterfacemethod.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/1770/autolayoutsize.cs b/src/tests/Regressions/coreclr/1770/autolayoutsize.cs index ca26360a42f43..5c6f3abf3454a 100644 --- a/src/tests/Regressions/coreclr/1770/autolayoutsize.cs +++ b/src/tests/Regressions/coreclr/1770/autolayoutsize.cs @@ -2,13 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.InteropServices; +using Xunit; [StructLayout(LayoutKind.Auto, Size = 16)] -struct Foo +public struct Foo { private int _field; - static unsafe int Main() + [Fact] + public static unsafe int TestEntryPoint() { return sizeof(Foo) == 4 ? 100 : -1; } diff --git a/src/tests/Regressions/coreclr/1770/autolayoutsize.csproj b/src/tests/Regressions/coreclr/1770/autolayoutsize.csproj index 353d663b61f3c..9903baf161984 100644 --- a/src/tests/Regressions/coreclr/1770/autolayoutsize.csproj +++ b/src/tests/Regressions/coreclr/1770/autolayoutsize.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/20452/twopassvariance.il b/src/tests/Regressions/coreclr/20452/twopassvariance.il index b2069d09ce318..9fa953d8e6897 100644 --- a/src/tests/Regressions/coreclr/20452/twopassvariance.il +++ b/src/tests/Regressions/coreclr/20452/twopassvariance.il @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. .assembly extern mscorlib { } +.assembly extern xunit.core {} .assembly twopassvariance { } @@ -122,7 +123,7 @@ } } -.class Fooer7 +.class public Fooer7 implements class IBar, class IFoo { .method public specialname rtspecialname instance void .ctor() @@ -133,8 +134,11 @@ } } -.method static int32 main() +.method public static int32 main() { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint newobj instance void Fooer1::.ctor() diff --git a/src/tests/Regressions/coreclr/20452/twopassvariance.ilproj b/src/tests/Regressions/coreclr/20452/twopassvariance.ilproj index ec558271e33f0..be534b7ebcb4f 100644 --- a/src/tests/Regressions/coreclr/20452/twopassvariance.ilproj +++ b/src/tests/Regressions/coreclr/20452/twopassvariance.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/20616/UnicodeBug.il b/src/tests/Regressions/coreclr/20616/UnicodeBug.il index f6f5dddf5e93d..d1039f010bba4 100644 --- a/src/tests/Regressions/coreclr/20616/UnicodeBug.il +++ b/src/tests/Regressions/coreclr/20616/UnicodeBug.il @@ -1,9 +1,14 @@ -.assembly extern mscorlib { } +.assembly extern mscorlib { } +.assembly extern xunit.core {} .assembly UnicodeBug { } -.method static int32 main() +.class public auto ansi UnicodeBug { +.method public static int32 main() { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint // @@ -91,6 +96,7 @@ ldc.i4 100 ret } +} .class 'л' { } .class 'Общеязыковаяисполняющаясреда' { } // "O" at the beginning is capital diff --git a/src/tests/Regressions/coreclr/20616/UnicodeBug.ilproj b/src/tests/Regressions/coreclr/20616/UnicodeBug.ilproj index 3d18f12fffe77..89c6ba40d74d4 100644 --- a/src/tests/Regressions/coreclr/20616/UnicodeBug.ilproj +++ b/src/tests/Regressions/coreclr/20616/UnicodeBug.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/22021/consumer.il b/src/tests/Regressions/coreclr/22021/consumer.il index 592db8ae3c45c..ba96fe6967836 100644 --- a/src/tests/Regressions/coreclr/22021/consumer.il +++ b/src/tests/Regressions/coreclr/22021/consumer.il @@ -8,7 +8,7 @@ .assembly consumer { } -.class private auto ansi beforefieldinit Test1 +.class public auto ansi beforefieldinit Test1 extends [System.Runtime]System.Object implements [provider]I1, [provider]I2, @@ -17,7 +17,7 @@ class [provider]IGen2`1, class [provider]IGen1`1 { - .method private hidebysig static int32 Main() + .method public hidebysig static int32 Main() { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 diff --git a/src/tests/Regressions/coreclr/22021/consumer.ilproj b/src/tests/Regressions/coreclr/22021/consumer.ilproj index 8870dafa4f4f1..8933a7f7ad59a 100644 --- a/src/tests/Regressions/coreclr/22021/consumer.ilproj +++ b/src/tests/Regressions/coreclr/22021/consumer.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/22021/provider.ilproj b/src/tests/Regressions/coreclr/22021/provider.ilproj index a10e6d25b0e4f..5798b3c769204 100644 --- a/src/tests/Regressions/coreclr/22021/provider.ilproj +++ b/src/tests/Regressions/coreclr/22021/provider.ilproj @@ -1,7 +1,4 @@ - - Library - diff --git a/src/tests/Regressions/coreclr/22386/debug3.il b/src/tests/Regressions/coreclr/22386/debug3.il index 74890d63bc558..9116df41a3613 100644 --- a/src/tests/Regressions/coreclr/22386/debug3.il +++ b/src/tests/Regressions/coreclr/22386/debug3.il @@ -71,7 +71,7 @@ } } -.class private sequential ansi sealed beforefieldinit Test2`1 +.class public sequential ansi sealed beforefieldinit Test2`1 extends [System.Runtime]System.ValueType implements class I2`1 { @@ -96,7 +96,7 @@ } -.method private hidebysig static int32 Main() cil managed +.method public hidebysig static int32 Main() cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 diff --git a/src/tests/Regressions/coreclr/22386/debug3.ilproj b/src/tests/Regressions/coreclr/22386/debug3.ilproj index 541b35c6e51ef..f5d1337befefd 100644 --- a/src/tests/Regressions/coreclr/22386/debug3.ilproj +++ b/src/tests/Regressions/coreclr/22386/debug3.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/22407/abstractcalls.il b/src/tests/Regressions/coreclr/22407/abstractcalls.il index af73050f379d6..5e3802ad1071f 100644 --- a/src/tests/Regressions/coreclr/22407/abstractcalls.il +++ b/src/tests/Regressions/coreclr/22407/abstractcalls.il @@ -78,7 +78,7 @@ ret } -.method private hidebysig static int32 Main() cil managed +.method public hidebysig static int32 Main() cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 diff --git a/src/tests/Regressions/coreclr/22407/abstractcalls.ilproj b/src/tests/Regressions/coreclr/22407/abstractcalls.ilproj index 31c37bbfeb615..60ee31e3dca54 100644 --- a/src/tests/Regressions/coreclr/22407/abstractcalls.ilproj +++ b/src/tests/Regressions/coreclr/22407/abstractcalls.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/22728/createdelegate.il b/src/tests/Regressions/coreclr/22728/createdelegate.il index 2c14cc039dc9c..08b8322f7e424 100644 --- a/src/tests/Regressions/coreclr/22728/createdelegate.il +++ b/src/tests/Regressions/coreclr/22728/createdelegate.il @@ -6,7 +6,7 @@ .assembly extern System.Console { } .assembly createdelegate { } -.class private auto ansi beforefieldinit A +.class public auto ansi beforefieldinit A extends [System.Runtime]System.Object implements B, C, @@ -58,7 +58,7 @@ A_F1_OK: ret } - .method private hidebysig static int32 Main() cil managed + .method public hidebysig static int32 Main() cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 diff --git a/src/tests/Regressions/coreclr/22728/createdelegate.ilproj b/src/tests/Regressions/coreclr/22728/createdelegate.ilproj index 75f581a9219d0..7ccb639edc0ce 100644 --- a/src/tests/Regressions/coreclr/22728/createdelegate.ilproj +++ b/src/tests/Regressions/coreclr/22728/createdelegate.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/22728/debug15.il b/src/tests/Regressions/coreclr/22728/debug15.il index e6b7cc87e1b6d..7619c60742981 100644 --- a/src/tests/Regressions/coreclr/22728/debug15.il +++ b/src/tests/Regressions/coreclr/22728/debug15.il @@ -6,7 +6,7 @@ .assembly extern System.Console { } .assembly debug15 { } -.class private auto ansi beforefieldinit A +.class public auto ansi beforefieldinit A extends [System.Runtime]System.Object implements B, C, @@ -88,7 +88,7 @@ A_F1_OK: ret } - .method private hidebysig static int32 Main() cil managed + .method public hidebysig static int32 Main() cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 diff --git a/src/tests/Regressions/coreclr/22728/debug15.ilproj b/src/tests/Regressions/coreclr/22728/debug15.ilproj index 0d8c40a99cc2a..22d5356d50609 100644 --- a/src/tests/Regressions/coreclr/22728/debug15.ilproj +++ b/src/tests/Regressions/coreclr/22728/debug15.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/25057/byref.cs b/src/tests/Regressions/coreclr/25057/byref.cs index dadcdb7bd4fa2..8b19fe472fede 100644 --- a/src/tests/Regressions/coreclr/25057/byref.cs +++ b/src/tests/Regressions/coreclr/25057/byref.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Xunit; [StructLayout(LayoutKind.Explicit)] ref struct InvalidRefStruct @@ -12,7 +13,7 @@ ref struct InvalidRefStruct public Span Y; } -class Program +public class Program { [MethodImpl(MethodImplOptions.NoInlining)] static Type LoadInvalidRefStruct() @@ -20,7 +21,8 @@ static Type LoadInvalidRefStruct() return typeof(InvalidRefStruct); } - static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/Regressions/coreclr/25057/byref.csproj b/src/tests/Regressions/coreclr/25057/byref.csproj index 48342d7d3cfda..209ee8bd2a083 100644 --- a/src/tests/Regressions/coreclr/25057/byref.csproj +++ b/src/tests/Regressions/coreclr/25057/byref.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 None diff --git a/src/tests/Regressions/coreclr/44465/tst.il b/src/tests/Regressions/coreclr/44465/tst.il index fe704a5c7dc58..a7d56a3ea9ed0 100644 --- a/src/tests/Regressions/coreclr/44465/tst.il +++ b/src/tests/Regressions/coreclr/44465/tst.il @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. .assembly tst { } +.assembly extern xunit.core {} .method static void* GetValue() { @@ -14,10 +15,15 @@ ret } -.method static int32 main() +.class public auto ansi tst { +.method public static int32 main() { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint call void* GetValue() conv.i4 ret } +} diff --git a/src/tests/Regressions/coreclr/44465/tst.ilproj b/src/tests/Regressions/coreclr/44465/tst.ilproj index 63542b1825945..9141aaf9e5de7 100644 --- a/src/tests/Regressions/coreclr/44465/tst.ilproj +++ b/src/tests/Regressions/coreclr/44465/tst.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/72162/Test72162.csproj b/src/tests/Regressions/coreclr/72162/Test72162.csproj index 9b0e0df7ee65e..17c579c2e8e8a 100644 --- a/src/tests/Regressions/coreclr/72162/Test72162.csproj +++ b/src/tests/Regressions/coreclr/72162/Test72162.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/72162/test72162.cs b/src/tests/Regressions/coreclr/72162/test72162.cs index 1fc91d8f69a7d..761777ba5939f 100644 --- a/src/tests/Regressions/coreclr/72162/test72162.cs +++ b/src/tests/Regressions/coreclr/72162/test72162.cs @@ -2,10 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Globalization; +using Xunit; public class Test72162 { // Bug 72162 dealt with the number of significant digits being incorrectly done on the Mac - public static int Main() + [Fact] + public static int TestEntryPoint() { int iRetVal = 100; Double[] dblTestValues = { -1000.54, diff --git a/src/tests/Regressions/coreclr/9414/readonlyPrefix.cs b/src/tests/Regressions/coreclr/9414/readonlyPrefix.cs index dba3f2270b03d..13de8af6f7a0d 100644 --- a/src/tests/Regressions/coreclr/9414/readonlyPrefix.cs +++ b/src/tests/Regressions/coreclr/9414/readonlyPrefix.cs @@ -1,7 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -class Program +using Xunit; +public class Program { interface IFrobber { @@ -27,9 +28,9 @@ public static void FrobAll(T[,] arr) } } - private static int Main() + [Fact] + public static void TestEntryPoint() { Foo.FrobAll(new Frobber[,] { { new Frobber() } }); - return 100; } } diff --git a/src/tests/Regressions/coreclr/9414/readonlyPrefix.csproj b/src/tests/Regressions/coreclr/9414/readonlyPrefix.csproj index 9beb530f455ff..85561f6c59c61 100644 --- a/src/tests/Regressions/coreclr/9414/readonlyPrefix.csproj +++ b/src/tests/Regressions/coreclr/9414/readonlyPrefix.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/Regressions/coreclr/GitHub_11611/Test11611.csproj b/src/tests/Regressions/coreclr/GitHub_11611/Test11611.csproj index e9318cdaca3e2..d6afb81f5b65b 100644 --- a/src/tests/Regressions/coreclr/GitHub_11611/Test11611.csproj +++ b/src/tests/Regressions/coreclr/GitHub_11611/Test11611.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_11611/test11611.cs b/src/tests/Regressions/coreclr/GitHub_11611/test11611.cs index 3cfe014cd7b8e..c55e8ad588aee 100644 --- a/src/tests/Regressions/coreclr/GitHub_11611/test11611.cs +++ b/src/tests/Regressions/coreclr/GitHub_11611/test11611.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 Data { @@ -30,7 +31,8 @@ public static void handle(Data data, long value) data.Obj = value; } - public static int Main() + [Fact] + public static int TestEntryPoint() { Action handler = handle; handler += handle; diff --git a/src/tests/Regressions/coreclr/GitHub_12224/Test12224.csproj b/src/tests/Regressions/coreclr/GitHub_12224/Test12224.csproj index 71d8c754be89f..2b026cdc39943 100644 --- a/src/tests/Regressions/coreclr/GitHub_12224/Test12224.csproj +++ b/src/tests/Regressions/coreclr/GitHub_12224/Test12224.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 true diff --git a/src/tests/Regressions/coreclr/GitHub_12224/test12224.cs b/src/tests/Regressions/coreclr/GitHub_12224/test12224.cs index 49b2f0a025e37..219fc5fff0234 100644 --- a/src/tests/Regressions/coreclr/GitHub_12224/test12224.cs +++ b/src/tests/Regressions/coreclr/GitHub_12224/test12224.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Threading; +using Xunit; public class Test12224 { @@ -27,7 +28,8 @@ static void ExecuteTest(object context) } } - public static int Main() + [Fact] + public static int TestEntryPoint() { Thread thread = new Thread(new ParameterizedThreadStart(Test12224.ExecuteTest)); thread.IsBackground = true; diff --git a/src/tests/Regressions/coreclr/GitHub_13394/test13394.cs b/src/tests/Regressions/coreclr/GitHub_13394/test13394.cs index 8d5b0a32b05f0..077a1ef9a81d1 100644 --- a/src/tests/Regressions/coreclr/GitHub_13394/test13394.cs +++ b/src/tests/Regressions/coreclr/GitHub_13394/test13394.cs @@ -3,20 +3,21 @@ using System; using System.Numerics; +using Xunit; -struct MyValueType +public struct MyValueType { object o; } -abstract class Test_test13394 +public abstract class Test_test13394 { public abstract void M(MyValueType v); - static int Main() + [Fact] + public static void TestEntryPoint() { new Concrete().M(default); - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_13394/test13394.csproj b/src/tests/Regressions/coreclr/GitHub_13394/test13394.csproj index 570644f1dbcb7..c8d7c17797c6c 100644 --- a/src/tests/Regressions/coreclr/GitHub_13394/test13394.csproj +++ b/src/tests/Regressions/coreclr/GitHub_13394/test13394.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/GitHub_1674/GitHub_1674.csproj b/src/tests/Regressions/coreclr/GitHub_1674/GitHub_1674.csproj index 51a46100025bb..f4691635d32c6 100644 --- a/src/tests/Regressions/coreclr/GitHub_1674/GitHub_1674.csproj +++ b/src/tests/Regressions/coreclr/GitHub_1674/GitHub_1674.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_1674/TestConstraintOnDefaultInterfaceMethod.cs b/src/tests/Regressions/coreclr/GitHub_1674/TestConstraintOnDefaultInterfaceMethod.cs index 69df32eaac803..64c7c6f448951 100644 --- a/src/tests/Regressions/coreclr/GitHub_1674/TestConstraintOnDefaultInterfaceMethod.cs +++ b/src/tests/Regressions/coreclr/GitHub_1674/TestConstraintOnDefaultInterfaceMethod.cs @@ -4,12 +4,14 @@ using System; using System.Threading; using System.Threading.Tasks; +using Xunit; namespace TestConstraint { - class TestConstraintOnDefaultInterfaceMethod + public class TestConstraintOnDefaultInterfaceMethod { - static int Main() + [Fact] + public static void TestEntryPoint() { IAuditTrail auditTrail = new AuditTrail(); // This should not fail per C# specs here: @@ -22,9 +24,6 @@ static int Main() ((IBuggy)new Worky2()).Foo(); // This should not throw since Open meets the constraint of IBuggy.Foo where T2: T1 ((IBuggy)new Buggy()).Foo(); - - return 100; - } interface IBuggy diff --git a/src/tests/Regressions/coreclr/GitHub_16833/Test16833.csproj b/src/tests/Regressions/coreclr/GitHub_16833/Test16833.csproj index c4cfa059fa821..b42b41b54a731 100644 --- a/src/tests/Regressions/coreclr/GitHub_16833/Test16833.csproj +++ b/src/tests/Regressions/coreclr/GitHub_16833/Test16833.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_16833/test16833.cs b/src/tests/Regressions/coreclr/GitHub_16833/test16833.cs index a7e1186cd7858..95997fcb2cd62 100644 --- a/src/tests/Regressions/coreclr/GitHub_16833/test16833.cs +++ b/src/tests/Regressions/coreclr/GitHub_16833/test16833.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 TestShufflingThunk { @@ -162,7 +163,7 @@ public SLargeReturnStruct Test6MRB(int i1, int i2, int i3, int i4, int i5, SIntD } } - class Test16833 + public class Test16833 { delegate string Delegate2m(TestClass tc, int i1, int i2, int i3, int i4, SIntDouble s, double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10, int i5); delegate string Delegate6m(TestClass tc, int i1, int i2, int i3, int i4, int i5, SIntDouble s, double f1, double f2, double f3, double f4, double f5, double f6, double f7, double f8, double f9, double f10); @@ -178,7 +179,8 @@ static void CheckResult(ref int exitCode, string test, string result, string exp } } - static int Main() + [Fact] + public static int TestEntryPoint() { int exitCode = 100; diff --git a/src/tests/Regressions/coreclr/GitHub_17398/test17398.cs b/src/tests/Regressions/coreclr/GitHub_17398/test17398.cs index 893390b78bbfc..c0a788b21bee9 100644 --- a/src/tests/Regressions/coreclr/GitHub_17398/test17398.cs +++ b/src/tests/Regressions/coreclr/GitHub_17398/test17398.cs @@ -3,10 +3,11 @@ using System; using System.Runtime.CompilerServices; +using Xunit; // Repro case for https://github.com/dotnet/coreclr/pull/17398 -class X +public class X { static int v; @@ -63,7 +64,8 @@ public static void Test() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { v = 1; int r = 0; diff --git a/src/tests/Regressions/coreclr/GitHub_17398/test17398.csproj b/src/tests/Regressions/coreclr/GitHub_17398/test17398.csproj index 5844b7014c5de..e3832670314d6 100644 --- a/src/tests/Regressions/coreclr/GitHub_17398/test17398.csproj +++ b/src/tests/Regressions/coreclr/GitHub_17398/test17398.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/Regressions/coreclr/GitHub_22348/Test22348.csproj b/src/tests/Regressions/coreclr/GitHub_22348/Test22348.csproj index d8c14ff48c6fe..853964d109376 100644 --- a/src/tests/Regressions/coreclr/GitHub_22348/Test22348.csproj +++ b/src/tests/Regressions/coreclr/GitHub_22348/Test22348.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_22348/test22348.cs b/src/tests/Regressions/coreclr/GitHub_22348/test22348.cs index 65f9227d262b2..b9cd7ecf6fc62 100644 --- a/src/tests/Regressions/coreclr/GitHub_22348/test22348.cs +++ b/src/tests/Regressions/coreclr/GitHub_22348/test22348.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 Test22348 { - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/Regressions/coreclr/GitHub_22888/test22888.cs b/src/tests/Regressions/coreclr/GitHub_22888/test22888.cs index 53c3790bab40d..26b6d6ef8aad6 100644 --- a/src/tests/Regressions/coreclr/GitHub_22888/test22888.cs +++ b/src/tests/Regressions/coreclr/GitHub_22888/test22888.cs @@ -5,6 +5,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Loader; +using Xunit; class TestAssemblyLoadContext : AssemblyLoadContext { @@ -63,7 +64,8 @@ static bool LoadAndUnload(string assemblyPath, out WeakReference alcWeakRef) return success; } - public static int Main() + [Fact] + public static int TestEntryPoint() { string currentAssemblyDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string testAssemblyFullPath = Path.Combine(currentAssemblyDirectory, "test22888resources.dll"); diff --git a/src/tests/Regressions/coreclr/GitHub_22888/test22888.csproj b/src/tests/Regressions/coreclr/GitHub_22888/test22888.csproj index 79449c81e7184..f2a1d423be02a 100644 --- a/src/tests/Regressions/coreclr/GitHub_22888/test22888.csproj +++ b/src/tests/Regressions/coreclr/GitHub_22888/test22888.csproj @@ -1,6 +1,7 @@ - Exe + + true true @@ -8,6 +9,10 @@ - + + false + Content + Always + diff --git a/src/tests/Regressions/coreclr/GitHub_22888/test22888resources.csproj b/src/tests/Regressions/coreclr/GitHub_22888/test22888resources.csproj index d6ca55a6d57e9..ca6163be24fcd 100644 --- a/src/tests/Regressions/coreclr/GitHub_22888/test22888resources.csproj +++ b/src/tests/Regressions/coreclr/GitHub_22888/test22888resources.csproj @@ -1,8 +1,9 @@ - Exe + true + Library + SharedLibrary true - BuildOnly @@ -12,7 +13,4 @@ ResXFileCodeGenerator - - - diff --git a/src/tests/Regressions/coreclr/GitHub_24524/test24524.il b/src/tests/Regressions/coreclr/GitHub_24524/test24524.il index 9822fa2b4f8f9..2a88c3573bcb4 100644 --- a/src/tests/Regressions/coreclr/GitHub_24524/test24524.il +++ b/src/tests/Regressions/coreclr/GitHub_24524/test24524.il @@ -8,13 +8,18 @@ // in other cases. // .assembly extern System.Runtime { auto } +.assembly extern xunit.core {} .assembly extern System.Console { auto } .assembly test24524{} -.method private hidebysig static int32 +.class public auto ansi test24524 { +.method public hidebysig static int32 Main() cil managed { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint .maxstack 2 @@ -25,3 +30,4 @@ ldc.i4 100 ret } +} diff --git a/src/tests/Regressions/coreclr/GitHub_24524/test24524.ilproj b/src/tests/Regressions/coreclr/GitHub_24524/test24524.ilproj index 5474af5e3b477..a1842e845aae0 100644 --- a/src/tests/Regressions/coreclr/GitHub_24524/test24524.ilproj +++ b/src/tests/Regressions/coreclr/GitHub_24524/test24524.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_24701/test24701.cs b/src/tests/Regressions/coreclr/GitHub_24701/test24701.cs index 43a1ee2c7c46b..d972dd9fd70f8 100644 --- a/src/tests/Regressions/coreclr/GitHub_24701/test24701.cs +++ b/src/tests/Regressions/coreclr/GitHub_24701/test24701.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public struct Data { @@ -81,7 +82,8 @@ static int AssertEqual(T actual, T expected) return 0; } - static int Main() + [Fact] + public static int TestEntryPoint() { int numFailures = 0; var foo = new StructAPITest(); foo._id = "ABC"; diff --git a/src/tests/Regressions/coreclr/GitHub_24701/test24701.csproj b/src/tests/Regressions/coreclr/GitHub_24701/test24701.csproj index 7be17f879dd3b..a89be41ed3ae1 100644 --- a/src/tests/Regressions/coreclr/GitHub_24701/test24701.csproj +++ b/src/tests/Regressions/coreclr/GitHub_24701/test24701.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 None diff --git a/src/tests/Regressions/coreclr/GitHub_27937/Test27937.csproj b/src/tests/Regressions/coreclr/GitHub_27937/Test27937.csproj index 50a7b3693c21e..74b42c2dec365 100644 --- a/src/tests/Regressions/coreclr/GitHub_27937/Test27937.csproj +++ b/src/tests/Regressions/coreclr/GitHub_27937/Test27937.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_27937/test27937.cs b/src/tests/Regressions/coreclr/GitHub_27937/test27937.cs index 093775a2e332d..7a36079058d24 100644 --- a/src/tests/Regressions/coreclr/GitHub_27937/test27937.cs +++ b/src/tests/Regressions/coreclr/GitHub_27937/test27937.cs @@ -1,8 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.Intrinsics; +using Xunit; -class Test27937 +public class Test27937 { static unsafe void calc(float* fa, float* fb) { @@ -26,13 +27,12 @@ static unsafe void calc(float* fa, float* fb) } while (pb < eb); } - static unsafe int Main() + [Fact] + public static unsafe void TestEntryPoint() { float* a = stackalloc float[16]; float* b = stackalloc float[16]; calc(a, b); - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_34094/Test34094.csproj b/src/tests/Regressions/coreclr/GitHub_34094/Test34094.csproj index 031c77ed2950c..8151ace38ac25 100644 --- a/src/tests/Regressions/coreclr/GitHub_34094/Test34094.csproj +++ b/src/tests/Regressions/coreclr/GitHub_34094/Test34094.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/Regressions/coreclr/GitHub_34094/test34094.cs b/src/tests/Regressions/coreclr/GitHub_34094/test34094.cs index 59bc8bb08dc27..2abd0dd7ec1cb 100644 --- a/src/tests/Regressions/coreclr/GitHub_34094/test34094.cs +++ b/src/tests/Regressions/coreclr/GitHub_34094/test34094.cs @@ -4,8 +4,9 @@ using System; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.X86; +using Xunit; -class Test34094 +public class Test34094 { static bool TestSseCompareGreaterThan() { @@ -511,7 +512,8 @@ static bool TestAvxCompareNotGreaterThanOrEqualDouble() return true; } - static unsafe int Main() + [Fact] + public static unsafe int TestEntryPoint() { if (!Sse.IsSupported) { diff --git a/src/tests/Regressions/coreclr/GitHub_35000/test35000.cs b/src/tests/Regressions/coreclr/GitHub_35000/test35000.cs index a40374691ffb2..86546d982ceb1 100644 --- a/src/tests/Regressions/coreclr/GitHub_35000/test35000.cs +++ b/src/tests/Regressions/coreclr/GitHub_35000/test35000.cs @@ -2,8 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Reflection; +using Xunit; -class Test35000 +public class Test35000 { public class TestData0 { @@ -15,7 +16,8 @@ public class TestData1 : TestData0 public override object MyMethod(int a, int b, int c, int d, int e, int f, int g, int h) { return null; } } - static int Main() + [Fact] + public static int TestEntryPoint() { var method = typeof(TestData0).GetMethod(nameof(TestData0.MyMethod)); var func = (Func)Delegate.CreateDelegate(typeof(Func), null, method); diff --git a/src/tests/Regressions/coreclr/GitHub_35000/test35000.csproj b/src/tests/Regressions/coreclr/GitHub_35000/test35000.csproj index 571dc8c9333db..c582ecf0fa694 100644 --- a/src/tests/Regressions/coreclr/GitHub_35000/test35000.csproj +++ b/src/tests/Regressions/coreclr/GitHub_35000/test35000.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_41674/genericldtoken.il b/src/tests/Regressions/coreclr/GitHub_41674/genericldtoken.il index 3cd4f38719159..51a1947c5b55e 100644 --- a/src/tests/Regressions/coreclr/GitHub_41674/genericldtoken.il +++ b/src/tests/Regressions/coreclr/GitHub_41674/genericldtoken.il @@ -19,10 +19,10 @@ } } -.class private auto ansi beforefieldinit Program +.class public auto ansi beforefieldinit Program extends [System.Runtime]System.Object { - .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/Regressions/coreclr/GitHub_41674/genericldtoken.ilproj b/src/tests/Regressions/coreclr/GitHub_41674/genericldtoken.ilproj index 965f5a4ef7527..a2512f352d624 100644 --- a/src/tests/Regressions/coreclr/GitHub_41674/genericldtoken.ilproj +++ b/src/tests/Regressions/coreclr/GitHub_41674/genericldtoken.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/GitHub_42732/test42732.cs b/src/tests/Regressions/coreclr/GitHub_42732/test42732.cs index 182801f05fa78..5098f29deea59 100644 --- a/src/tests/Regressions/coreclr/GitHub_42732/test42732.cs +++ b/src/tests/Regressions/coreclr/GitHub_42732/test42732.cs @@ -9,6 +9,7 @@ using System; using System.Runtime.CompilerServices; +using Xunit; public class Test11611 { @@ -36,12 +37,12 @@ public static void Test() } [MethodImpl(MethodImplOptions.NoInlining)] - public static int Main() + [Fact] + public static void TestEntryPoint() { Console.WriteLine("About to run test"); d = test; Test(); Console.WriteLine("Test complete run test"); - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_42732/test42732.csproj b/src/tests/Regressions/coreclr/GitHub_42732/test42732.csproj index ac0fdb7c3381d..1633d0b54a943 100644 --- a/src/tests/Regressions/coreclr/GitHub_42732/test42732.csproj +++ b/src/tests/Regressions/coreclr/GitHub_42732/test42732.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_43763/test43763.cs b/src/tests/Regressions/coreclr/GitHub_43763/test43763.cs index e03d8eaf52ece..6916c4b5a37bd 100644 --- a/src/tests/Regressions/coreclr/GitHub_43763/test43763.cs +++ b/src/tests/Regressions/coreclr/GitHub_43763/test43763.cs @@ -1,17 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -class Program +using Xunit; +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { System.Console.WriteLine(System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription); CallC(); CallB(); CallC2(); CallB2(); - - return 100; } static void CallB() => new B(); diff --git a/src/tests/Regressions/coreclr/GitHub_43763/test43763.csproj b/src/tests/Regressions/coreclr/GitHub_43763/test43763.csproj index 35f6c65e28593..4e8c90d3731b8 100644 --- a/src/tests/Regressions/coreclr/GitHub_43763/test43763.csproj +++ b/src/tests/Regressions/coreclr/GitHub_43763/test43763.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_45037/test45037.cs b/src/tests/Regressions/coreclr/GitHub_45037/test45037.cs index 0d1ef19a28d4a..2c1a95fa06f4a 100644 --- a/src/tests/Regressions/coreclr/GitHub_45037/test45037.cs +++ b/src/tests/Regressions/coreclr/GitHub_45037/test45037.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Reflection; +using Xunit; public abstract class Base { @@ -44,14 +45,13 @@ class Child : Parent where T : class class Foo { } -class Program +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { Type[] t = Assembly.GetExecutingAssembly().GetTypes(); new Child(); new CovariantReturn(); - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_45037/test45037.csproj b/src/tests/Regressions/coreclr/GitHub_45037/test45037.csproj index 56fbdf26ad007..7f04643684a47 100644 --- a/src/tests/Regressions/coreclr/GitHub_45037/test45037.csproj +++ b/src/tests/Regressions/coreclr/GitHub_45037/test45037.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs b/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs index 90fb03ce024ea..4b7190f48f373 100644 --- a/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs +++ b/src/tests/Regressions/coreclr/GitHub_45053/test45053.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Xunit; public abstract class T { @@ -28,12 +29,11 @@ public class A { } public class B : A { } -class Program +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { System.Console.WriteLine((new TB() as T).GetA().GetType().FullName); - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_45053/test45053.csproj b/src/tests/Regressions/coreclr/GitHub_45053/test45053.csproj index f972ee82dcb9d..26bfd51f07c29 100644 --- a/src/tests/Regressions/coreclr/GitHub_45053/test45053.csproj +++ b/src/tests/Regressions/coreclr/GitHub_45053/test45053.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_45082/test45082.cs b/src/tests/Regressions/coreclr/GitHub_45082/test45082.cs index 304720631506d..742c42e00f7bf 100644 --- a/src/tests/Regressions/coreclr/GitHub_45082/test45082.cs +++ b/src/tests/Regressions/coreclr/GitHub_45082/test45082.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Xunit; public abstract class AComponent { } public class Component : AComponent { } @@ -18,12 +19,11 @@ public sealed class Concrete : Abstract public override IReadOnlyList New => throw null; } -class Program +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { new Concrete(); - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_45082/test45082.csproj b/src/tests/Regressions/coreclr/GitHub_45082/test45082.csproj index 1f2757d8d44a7..cdc27aa935f92 100644 --- a/src/tests/Regressions/coreclr/GitHub_45082/test45082.csproj +++ b/src/tests/Regressions/coreclr/GitHub_45082/test45082.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_45929/test45929.cs b/src/tests/Regressions/coreclr/GitHub_45929/test45929.cs index ba783a498a7de..d59b42e7d5985 100644 --- a/src/tests/Regressions/coreclr/GitHub_45929/test45929.cs +++ b/src/tests/Regressions/coreclr/GitHub_45929/test45929.cs @@ -7,12 +7,14 @@ using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; +using Xunit; namespace test45929 { public class Program { - static int Main(string[] _) + [Fact] + public static void TestEntryPoint() { Console.WriteLine("The test started."); Console.WriteLine("Progress:"); @@ -23,8 +25,6 @@ static int Main(string[] _) Test.Run(); Console.WriteLine("Finished successfully"); - - return 100; } class Test diff --git a/src/tests/Regressions/coreclr/GitHub_45929/test45929.csproj b/src/tests/Regressions/coreclr/GitHub_45929/test45929.csproj index 409a596e97f5e..2d8e4ab387751 100644 --- a/src/tests/Regressions/coreclr/GitHub_45929/test45929.csproj +++ b/src/tests/Regressions/coreclr/GitHub_45929/test45929.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_47007/test47007.cs b/src/tests/Regressions/coreclr/GitHub_47007/test47007.cs index 4ec0849facbf9..2a1b766c3d63d 100644 --- a/src/tests/Regressions/coreclr/GitHub_47007/test47007.cs +++ b/src/tests/Regressions/coreclr/GitHub_47007/test47007.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Xunit; class Base { @@ -13,12 +14,11 @@ class Derived : Base public override Derived Method() => null; } -class Program +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { _ = new Derived(); - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_47007/test47007.csproj b/src/tests/Regressions/coreclr/GitHub_47007/test47007.csproj index fd723a341898e..d25cbda79c776 100644 --- a/src/tests/Regressions/coreclr/GitHub_47007/test47007.csproj +++ b/src/tests/Regressions/coreclr/GitHub_47007/test47007.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_49826/test49826.cs b/src/tests/Regressions/coreclr/GitHub_49826/test49826.cs index f89706591b513..c7fcdbb4d0d88 100644 --- a/src/tests/Regressions/coreclr/GitHub_49826/test49826.cs +++ b/src/tests/Regressions/coreclr/GitHub_49826/test49826.cs @@ -5,10 +5,12 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; +using Xunit; -class Program +public class Program { - static int Main() + [Fact] + public static int TestEntryPoint() { JsonSerializerOptions options = new JsonSerializerOptions(); JsonConverter converter = options.GetConverter(typeof(DateTime)); diff --git a/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj b/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj index 55d1e87b634d6..61d726543657b 100644 --- a/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj +++ b/src/tests/Regressions/coreclr/GitHub_49826/test49826.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 enable diff --git a/src/tests/Regressions/coreclr/GitHub_49982/test49982.cs b/src/tests/Regressions/coreclr/GitHub_49982/test49982.cs index ec3ae4343df4c..3a1567acd2e04 100644 --- a/src/tests/Regressions/coreclr/GitHub_49982/test49982.cs +++ b/src/tests/Regressions/coreclr/GitHub_49982/test49982.cs @@ -9,8 +9,9 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Xunit; -class Program +public class Program { private class MockEndPoint : EndPoint { @@ -40,7 +41,8 @@ static bool TestExtendedSocketException() return extendedSocketException.EndPointEquals(endPoint); } - static int Main() + [Fact] + public static int TestEntryPoint() { Console.WriteLine("Extended socket exception:"); return TestExtendedSocketException() ? 100 : 1; diff --git a/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj b/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj index 0264633246cb5..8ea9dcb5f876b 100644 --- a/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj +++ b/src/tests/Regressions/coreclr/GitHub_49982/test49982.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 enable true diff --git a/src/tests/Regressions/coreclr/GitHub_54719/test54719.cs b/src/tests/Regressions/coreclr/GitHub_54719/test54719.cs index 64e60e5980085..1222a43615c65 100644 --- a/src/tests/Regressions/coreclr/GitHub_54719/test54719.cs +++ b/src/tests/Regressions/coreclr/GitHub_54719/test54719.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public class IA { } public class IB { } @@ -21,12 +22,11 @@ public abstract class Base : Base where B : IB public sealed override B Value => null; } -class Program +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { new Derived(); - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_54719/test54719.csproj b/src/tests/Regressions/coreclr/GitHub_54719/test54719.csproj index 3104bc4415c53..f192b9d2846de 100644 --- a/src/tests/Regressions/coreclr/GitHub_54719/test54719.csproj +++ b/src/tests/Regressions/coreclr/GitHub_54719/test54719.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_61104/test61104.csproj b/src/tests/Regressions/coreclr/GitHub_61104/test61104.csproj index b72e9a46cf95a..0b2387f808d38 100644 --- a/src/tests/Regressions/coreclr/GitHub_61104/test61104.csproj +++ b/src/tests/Regressions/coreclr/GitHub_61104/test61104.csproj @@ -1,7 +1,8 @@ - Exe + + true enable enable 1 diff --git a/src/tests/Regressions/coreclr/GitHub_62058/test62058.cs b/src/tests/Regressions/coreclr/GitHub_62058/test62058.cs index 3ddc7ef724354..63803aa77dc2f 100644 --- a/src/tests/Regressions/coreclr/GitHub_62058/test62058.cs +++ b/src/tests/Regressions/coreclr/GitHub_62058/test62058.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public class Program { @@ -15,7 +16,8 @@ private class Foo : IFoo public bool IsValid { get; set; } } - public static int Main() + [Fact] + public static void TestEntryPoint() { bool warmup = new Foo().IsValid; CatchIgnore(() => @@ -27,8 +29,6 @@ public static int Main() bool check = foo.IsValid; } })); - - return 100; } public static void CatchRethrow(Action action) diff --git a/src/tests/Regressions/coreclr/GitHub_62058/test62058.csproj b/src/tests/Regressions/coreclr/GitHub_62058/test62058.csproj index 0fce5a0556f40..f4da79cde0f8b 100644 --- a/src/tests/Regressions/coreclr/GitHub_62058/test62058.csproj +++ b/src/tests/Regressions/coreclr/GitHub_62058/test62058.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_66005/test66005.cs b/src/tests/Regressions/coreclr/GitHub_66005/test66005.cs index 39e370556482c..cea0d16f59d12 100644 --- a/src/tests/Regressions/coreclr/GitHub_66005/test66005.cs +++ b/src/tests/Regressions/coreclr/GitHub_66005/test66005.cs @@ -3,8 +3,9 @@ using System; using System.Runtime.CompilerServices; +using Xunit; -class Program +public class Program { [MethodImpl(MethodImplOptions.NoInlining)] static void Test() where TException : Exception @@ -19,17 +20,9 @@ static void Test() where TException : Exception } } - static int Main() + [Fact] + public static void TestEntryPoint() { - try - { - Test(); - } - catch - { - return -1; - } - - return 100; + Test(); } } diff --git a/src/tests/Regressions/coreclr/GitHub_66005/test66005.csproj b/src/tests/Regressions/coreclr/GitHub_66005/test66005.csproj index 59b9f6272434d..fdbd119b61085 100644 --- a/src/tests/Regressions/coreclr/GitHub_66005/test66005.csproj +++ b/src/tests/Regressions/coreclr/GitHub_66005/test66005.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.il b/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.il index 3d301026cf4d9..1eba2fb4bae79 100644 --- a/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.il +++ b/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.il @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. .assembly runtime68278 { } +.assembly extern xunit.core {} .class interface abstract IHasCctor { @@ -15,13 +16,16 @@ } } -.class interface abstract IUnrelated +.class public interface abstract IUnrelated { .field public static int8 s_fiftyEight } -.method static int32 main() +.method public static int32 main() { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint ldsfld int8 IHasCctor::s_fortyTwo ldsfld int8 IUnrelated::s_fiftyEight diff --git a/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.ilproj b/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.ilproj index bc34a245ff740..597da19629fd6 100644 --- a/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.ilproj +++ b/src/tests/Regressions/coreclr/GitHub_68278/runtime68278.ilproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/GitHub_7685/Test7685.csproj b/src/tests/Regressions/coreclr/GitHub_7685/Test7685.csproj index 21a7522103389..b012dc7c15001 100644 --- a/src/tests/Regressions/coreclr/GitHub_7685/Test7685.csproj +++ b/src/tests/Regressions/coreclr/GitHub_7685/Test7685.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_7685/test7685.cs b/src/tests/Regressions/coreclr/GitHub_7685/test7685.cs index be28c21e4862a..5fa36fc33c00f 100644 --- a/src/tests/Regressions/coreclr/GitHub_7685/test7685.cs +++ b/src/tests/Regressions/coreclr/GitHub_7685/test7685.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Reflection; +using Xunit; public class Test7685 { @@ -12,7 +13,8 @@ public class Test7685 static RectangleLSmall passedLongSmallStruct; static RectangleNestedF passedNestedSmallFStruct; - public static int Main() + [Fact] + public static int TestEntryPoint() { int iRetVal = 100; diff --git a/src/tests/Regressions/coreclr/GitHub_78635/test78635.cs b/src/tests/Regressions/coreclr/GitHub_78635/test78635.cs index 66bb3708de3bb..f2a83230c6c47 100644 --- a/src/tests/Regressions/coreclr/GitHub_78635/test78635.cs +++ b/src/tests/Regressions/coreclr/GitHub_78635/test78635.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public abstract class BaseProp { @@ -102,17 +103,9 @@ public static void Test () TestInstance (new DerivedVirtual32 ()); } - public static int Main (string[] args) + [Fact] + public static void TestEntryPoint() { - try { - Test (); - } catch (Exception e) { - Console.WriteLine ("NOK"); - Console.WriteLine (e); - return 1; - } - Console.WriteLine ("OK"); - return 100; + Test (); } } - diff --git a/src/tests/Regressions/coreclr/GitHub_78635/test78635.csproj b/src/tests/Regressions/coreclr/GitHub_78635/test78635.csproj index 6ac141631869e..18003f1800fc6 100644 --- a/src/tests/Regressions/coreclr/GitHub_78635/test78635.csproj +++ b/src/tests/Regressions/coreclr/GitHub_78635/test78635.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/GitHub_79022/test79022.cs b/src/tests/Regressions/coreclr/GitHub_79022/test79022.cs index d3dc57e0b1390..4f300cdff2aa8 100644 --- a/src/tests/Regressions/coreclr/GitHub_79022/test79022.cs +++ b/src/tests/Regressions/coreclr/GitHub_79022/test79022.cs @@ -3,8 +3,9 @@ using System; using System.Runtime.CompilerServices; +using Xunit; -class Program +public class Program { // This is a regression test for https://github.com/dotnet/runtime/issues/79022 static ulong[,] s_1; @@ -22,7 +23,8 @@ static void Test() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/Regressions/coreclr/GitHub_79022/test79022.csproj b/src/tests/Regressions/coreclr/GitHub_79022/test79022.csproj index 370aed7d68b59..a9d41f0dd474b 100644 --- a/src/tests/Regressions/coreclr/GitHub_79022/test79022.csproj +++ b/src/tests/Regressions/coreclr/GitHub_79022/test79022.csproj @@ -1,6 +1,7 @@ - Exe + + true 1 CS0649 diff --git a/src/tests/Regressions/coreclr/GitHub_84694/test84694.cs b/src/tests/Regressions/coreclr/GitHub_84694/test84694.cs index bab97fe9a35e1..4c77d9f7b7afa 100644 --- a/src/tests/Regressions/coreclr/GitHub_84694/test84694.cs +++ b/src/tests/Regressions/coreclr/GitHub_84694/test84694.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public struct S0 { @@ -14,9 +15,9 @@ public S0(object f1) : this() public class Program { - public static int Main() + [Fact] + public static void TestEntryPoint() { GC.KeepAlive(new S0[,] { { new S0(new object()) } }); - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_84694/test84694.csproj b/src/tests/Regressions/coreclr/GitHub_84694/test84694.csproj index 0e006cddbf8d3..992a7839bc421 100644 --- a/src/tests/Regressions/coreclr/GitHub_84694/test84694.csproj +++ b/src/tests/Regressions/coreclr/GitHub_84694/test84694.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/GitHub_85240/test85240.cs b/src/tests/Regressions/coreclr/GitHub_85240/test85240.cs index e56c7d4912853..ef2ce4c2b7f1a 100644 --- a/src/tests/Regressions/coreclr/GitHub_85240/test85240.cs +++ b/src/tests/Regressions/coreclr/GitHub_85240/test85240.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; #pragma warning disable 8500 @@ -17,7 +18,8 @@ static void AssertEqual(T actual, T expected) public static Type GrabPtr() => typeof(T*); public static Type GrabFnptr() => typeof(delegate*); - public static int Main() + [Fact] + public static void TestEntryPoint() { AssertEqual(GrabArray().GetElementType(), typeof(int)); AssertEqual(GrabArray().GetElementType(), typeof(string)); @@ -27,7 +29,5 @@ public static int Main() AssertEqual(GrabFnptr().GetFunctionPointerReturnType(), typeof(DateTime)); AssertEqual(GrabFnptr().GetFunctionPointerReturnType(), typeof(Action)); - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_85240/test85240.csproj b/src/tests/Regressions/coreclr/GitHub_85240/test85240.csproj index 2dc4ce74905d7..4738a79591e12 100644 --- a/src/tests/Regressions/coreclr/GitHub_85240/test85240.csproj +++ b/src/tests/Regressions/coreclr/GitHub_85240/test85240.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/Regressions/coreclr/GitHub_86865/test86865.cs b/src/tests/Regressions/coreclr/GitHub_86865/test86865.cs index a8d65dea58be9..84a3d3c161ebd 100644 --- a/src/tests/Regressions/coreclr/GitHub_86865/test86865.cs +++ b/src/tests/Regressions/coreclr/GitHub_86865/test86865.cs @@ -1,11 +1,13 @@ using System; using System.Reflection; +using Xunit; namespace test86865; public class test86865 { - public static int Main() + [Fact] + public static int TestEntryPoint() { // Regression test for https://github.com/dotnet/runtime/issues/86865 diff --git a/src/tests/Regressions/coreclr/GitHub_86865/test86865.csproj b/src/tests/Regressions/coreclr/GitHub_86865/test86865.csproj index 486a855b6ed8c..891a08d26c454 100644 --- a/src/tests/Regressions/coreclr/GitHub_86865/test86865.csproj +++ b/src/tests/Regressions/coreclr/GitHub_86865/test86865.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/Regressions/coreclr/GitHub_88128/test88128.cs b/src/tests/Regressions/coreclr/GitHub_88128/test88128.cs index c6975b198e66a..17ab2641a7a1a 100644 --- a/src/tests/Regressions/coreclr/GitHub_88128/test88128.cs +++ b/src/tests/Regressions/coreclr/GitHub_88128/test88128.cs @@ -3,10 +3,12 @@ using System; using System.Reflection; +using Xunit; public class test88113 { - public static int Main() + [Fact] + public static void TestEntryPoint() { try { @@ -24,7 +26,5 @@ public static int Main() Console.WriteLine($"2: {ex3}"); } } - - return 100; } } diff --git a/src/tests/Regressions/coreclr/GitHub_88128/test88128.csproj b/src/tests/Regressions/coreclr/GitHub_88128/test88128.csproj index 49e01e50f35df..955e54cf6e539 100644 --- a/src/tests/Regressions/coreclr/GitHub_88128/test88128.csproj +++ b/src/tests/Regressions/coreclr/GitHub_88128/test88128.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/Regressions/coreclr/GitHub_89834/test89834.csproj b/src/tests/Regressions/coreclr/GitHub_89834/test89834.csproj index 6fb353a366d90..4ebefb68769a2 100644 --- a/src/tests/Regressions/coreclr/GitHub_89834/test89834.csproj +++ b/src/tests/Regressions/coreclr/GitHub_89834/test89834.csproj @@ -1,6 +1,9 @@ - Exe + + true + false + true 1 diff --git a/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.cs b/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.cs index 009d31b41a90e..28cbf67ed394b 100644 --- a/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.cs +++ b/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.cs @@ -1,12 +1,13 @@ using System; +using Xunit; namespace InterfaceMain { - interface Program + public interface Program { - static int Main() + [Fact] + public static void TestEntryPoint() { - return 100; } } } diff --git a/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.csproj b/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.csproj index cfd28390d749f..a73cc74e29dbf 100644 --- a/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.csproj +++ b/src/tests/Regressions/coreclr/Runtime_49998/Runtime_49998.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/Regressions/coreclr/Runtimelab_578/arr.il b/src/tests/Regressions/coreclr/Runtimelab_578/arr.il index 803aa6711f8f7..e64923673b1eb 100644 --- a/src/tests/Regressions/coreclr/Runtimelab_578/arr.il +++ b/src/tests/Regressions/coreclr/Runtimelab_578/arr.il @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. .assembly extern mscorlib { } +.assembly extern xunit.core {} .assembly 'arr' { } .method static int32[] alloc() cil managed @@ -34,8 +35,12 @@ ret } +.class public auto ansi arr { .method public static int32 main() cil managed { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .locals init (int32[][] a) .entrypoint @@ -66,4 +71,5 @@ add // 99 + 1 = 100 ret -} \ No newline at end of file +} +} diff --git a/src/tests/Regressions/coreclr/Runtimelab_578/arr.ilproj b/src/tests/Regressions/coreclr/Runtimelab_578/arr.ilproj index 0285a3e4c7804..59a30d376753d 100644 --- a/src/tests/Regressions/coreclr/Runtimelab_578/arr.ilproj +++ b/src/tests/Regressions/coreclr/Runtimelab_578/arr.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/profiler/common/profiler_common.csproj b/src/tests/profiler/common/profiler_common.csproj index 61040a368a018..7ac75dfd5764a 100644 --- a/src/tests/profiler/common/profiler_common.csproj +++ b/src/tests/profiler/common/profiler_common.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/tests/profiler/eventpipe/reverse_startup.csproj b/src/tests/profiler/eventpipe/reverse_startup.csproj index 10e62f91ee46a..f88c09f1fc688 100644 --- a/src/tests/profiler/eventpipe/reverse_startup.csproj +++ b/src/tests/profiler/eventpipe/reverse_startup.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/tests/readytorun/Directory.Build.props b/src/tests/readytorun/Directory.Build.props index 338eecc40518a..3bfa9555fcda5 100644 --- a/src/tests/readytorun/Directory.Build.props +++ b/src/tests/readytorun/Directory.Build.props @@ -1,7 +1,13 @@ - - + + + + true + + true + $(NoWarn);xUnit1013 + false diff --git a/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.cs b/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.cs index eb4244dcc5d67..5f2d5ec7f4a88 100644 --- a/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.cs +++ b/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.cs @@ -6,10 +6,12 @@ using System.Reflection; using System.Reflection.Emit; using System.Threading; +using Xunit; -internal static class Program +public static class Program { - private static int Main() + [Fact] + public static void TestEntryPoint() { // Verify crst levels with GCs triggered during R2R code lookup in the Prestub on the main thread, during which dynamic // code from a background thread is deleted at the start of the GC in the main thread @@ -35,8 +37,6 @@ private static int Main() null, Array.Empty()); } - - return 100; } private static DynamicMethod CreateDynamicMethod(string name) diff --git a/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.csproj b/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.csproj index 07534199443cd..6847e75d5deb0 100644 --- a/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.csproj +++ b/src/tests/readytorun/DynamicMethodGCStress/DynamicMethodGCStress.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/readytorun/GenericCycleDetection/Breadth1Test.cs b/src/tests/readytorun/GenericCycleDetection/Breadth1Test.cs index 08a776381fd22..bfcbb88d6aaef 100644 --- a/src/tests/readytorun/GenericCycleDetection/Breadth1Test.cs +++ b/src/tests/readytorun/GenericCycleDetection/Breadth1Test.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using Xunit; -internal class Program +public class Program { // This test exercises the "breadth cutoff" parameter of generic cycle detector. // It mimics generic representation of expressions. @@ -193,9 +193,9 @@ public static int Construct(int seed) } [Fact] - public static int BreadthTest() + public static void BreadthTest() { - return Expression.Construct(2) * Expression.Construct(2); + Assert.Equal(100, Expression.Construct(2) * Expression.Construct(2)); } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/tests/readytorun/GenericCycleDetection/Breadth1Test.csproj b/src/tests/readytorun/GenericCycleDetection/Breadth1Test.csproj index 31b228022a976..6bd1a0699952a 100644 --- a/src/tests/readytorun/GenericCycleDetection/Breadth1Test.csproj +++ b/src/tests/readytorun/GenericCycleDetection/Breadth1Test.csproj @@ -1,6 +1,7 @@ - exe + + true true true diff --git a/src/tests/readytorun/GenericCycleDetection/Depth1Test.cs b/src/tests/readytorun/GenericCycleDetection/Depth1Test.cs index 2e20735c53c1d..3d1f4dc78c266 100644 --- a/src/tests/readytorun/GenericCycleDetection/Depth1Test.cs +++ b/src/tests/readytorun/GenericCycleDetection/Depth1Test.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using Xunit; -internal class Program +public class Program { // This test only works when the "depth cutoff" parameter of generic cycle detector // is reduced to 1, otherwise the combinatorical explosion overflows the code generator. @@ -34,10 +34,10 @@ private struct Oper4 {} private struct Oper5 {} [Fact] - public static int BreadthTest() + public static void BreadthTest() { const long Factorial20 = 20L * 19L * 18L * 17L * 16L * 15L * 14L * 13L * 12L * 11L * 10L * 9L * 8L * 7L * 6L * 5L * 4L * 3L * 2L; - return Breadth.TypeNestedFactorial(ReturnTwentyAndDontTellJIT()) == Factorial20 ? 100 : 101; + Assert.Equal(Factorial20, Breadth.TypeNestedFactorial(ReturnTwentyAndDontTellJIT())); } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/tests/readytorun/GenericCycleDetection/Depth1Test.csproj b/src/tests/readytorun/GenericCycleDetection/Depth1Test.csproj index 2c0617a43c5d9..f5275e4000a4b 100644 --- a/src/tests/readytorun/GenericCycleDetection/Depth1Test.csproj +++ b/src/tests/readytorun/GenericCycleDetection/Depth1Test.csproj @@ -1,6 +1,7 @@ - exe + + true true true diff --git a/src/tests/readytorun/GenericCycleDetection/Depth3Test.cs b/src/tests/readytorun/GenericCycleDetection/Depth3Test.cs index 565079d5d269c..0bff4df72e6a6 100644 --- a/src/tests/readytorun/GenericCycleDetection/Depth3Test.cs +++ b/src/tests/readytorun/GenericCycleDetection/Depth3Test.cs @@ -5,7 +5,7 @@ using System.Runtime.CompilerServices; using Xunit; -internal class Program +public class Program { // This test exercises the "depth cutoff" parameter of generic cycle detector. // It is a simple algorithm generating deep generic types of the form @@ -32,10 +32,10 @@ private struct Depth3 {} private struct Depth4 {} [Fact] - public static int DepthTest() + public static void DepthTest() { const long Factorial20 = 20L * 19L * 18L * 17L * 16L * 15L * 14L * 13L * 12L * 11L * 10L * 9L * 8L * 7L * 6L * 5L * 4L * 3L * 2L; - return Depth1.TypeNestedFactorial(ReturnTwentyAndDontTellJIT()) == Factorial20 ? 100 : 101; + Assert.Equal(Factorial20, Depth1.TypeNestedFactorial(ReturnTwentyAndDontTellJIT())); } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/tests/readytorun/GenericCycleDetection/Depth3Test.csproj b/src/tests/readytorun/GenericCycleDetection/Depth3Test.csproj index 9f6f94744e31e..03a3539c2c123 100644 --- a/src/tests/readytorun/GenericCycleDetection/Depth3Test.csproj +++ b/src/tests/readytorun/GenericCycleDetection/Depth3Test.csproj @@ -1,6 +1,7 @@ - exe + + true true true diff --git a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId.cs b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId.cs index eb50665684f6f..722edc429d613 100644 --- a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId.cs +++ b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId.cs @@ -9,6 +9,7 @@ using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics; using System.Reflection; +using Xunit; namespace XarchHardwareIntrinsicTest._CpuId { @@ -17,7 +18,8 @@ public class Program const int Pass = 100; const int Fail = 0; - public unsafe static int Main() + [Fact] + public unsafe static int TestEntryPoint() { int testResult = Pass; diff --git a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx.csproj b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx.csproj index daee971da7e53..1bc209963a25b 100644 --- a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx.csproj +++ b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx2.csproj b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx2.csproj index 12d60f10997b7..67381af11a88a 100644 --- a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx2.csproj +++ b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx2.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx512.csproj b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx512.csproj index 0e97652a33816..a28a93f0f16d6 100644 --- a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx512.csproj +++ b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx512.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx_NoAvx2.csproj b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx_NoAvx2.csproj index 6158eeeca5a15..6c6f2278d6952 100644 --- a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx_NoAvx2.csproj +++ b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Avx_NoAvx2.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Baseline.csproj b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Baseline.csproj index 5d9421ccebec9..419c5e21f2e62 100644 --- a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Baseline.csproj +++ b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Baseline.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Sse42.csproj b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Sse42.csproj index 3292e4ea0bf67..fca78ef4941a7 100644 --- a/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Sse42.csproj +++ b/src/tests/readytorun/HardwareIntrinsics/X86/CpuId_R2R_Sse42.csproj @@ -1,6 +1,7 @@ - Exe + + true true true diff --git a/src/tests/readytorun/JittedMethodsCountingTest/JittedMethodsCountingTest.csproj b/src/tests/readytorun/JittedMethodsCountingTest/JittedMethodsCountingTest.csproj index af743de313506..ee7c93028db6c 100644 --- a/src/tests/readytorun/JittedMethodsCountingTest/JittedMethodsCountingTest.csproj +++ b/src/tests/readytorun/JittedMethodsCountingTest/JittedMethodsCountingTest.csproj @@ -1,6 +1,8 @@ + + true pdbonly true true diff --git a/src/tests/readytorun/coreroot_determinism/Directory.Build.props b/src/tests/readytorun/coreroot_determinism/Directory.Build.props new file mode 100644 index 0000000000000..468da893df723 --- /dev/null +++ b/src/tests/readytorun/coreroot_determinism/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + + true + $(NoWarn);xUnit1013 + false + + diff --git a/src/tests/readytorun/coreroot_determinism/Program.cs b/src/tests/readytorun/coreroot_determinism/Program.cs index ea537f274e439..1a53f284c534a 100644 --- a/src/tests/readytorun/coreroot_determinism/Program.cs +++ b/src/tests/readytorun/coreroot_determinism/Program.cs @@ -7,8 +7,9 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; +using Xunit; -internal class Program +public class Program { public static int CompareDLLs(string folder1, string folder2) { @@ -103,7 +104,8 @@ public static bool CompileWithSeed(int seed, string coreRootPath, string compila return 0 == process.ExitCode; } - public static int Main() + [Fact] + public static int TestEntryPoint() { string coreRootPath = Environment.GetEnvironmentVariable("CORE_ROOT"); string compilationInputFolder = "TestAssemblies"; diff --git a/src/tests/readytorun/coreroot_determinism/coreroot_determinism.csproj b/src/tests/readytorun/coreroot_determinism/coreroot_determinism.csproj index 5f651694cc1c9..f6d4a241579db 100644 --- a/src/tests/readytorun/coreroot_determinism/coreroot_determinism.csproj +++ b/src/tests/readytorun/coreroot_determinism/coreroot_determinism.csproj @@ -1,6 +1,7 @@ - exe + + true true true diff --git a/src/tests/readytorun/coreroot_determinism/readytorun_coreroot_determinism.csproj b/src/tests/readytorun/coreroot_determinism/readytorun_coreroot_determinism.csproj new file mode 100644 index 0000000000000..87b4903514103 --- /dev/null +++ b/src/tests/readytorun/coreroot_determinism/readytorun_coreroot_determinism.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/tests/readytorun/crossboundarylayout/crossboundarytest/crossboundarytest.csproj b/src/tests/readytorun/crossboundarylayout/crossboundarytest/crossboundarytest.csproj index 8b9be8bff17a0..6df55d2bd328b 100644 --- a/src/tests/readytorun/crossboundarylayout/crossboundarytest/crossboundarytest.csproj +++ b/src/tests/readytorun/crossboundarylayout/crossboundarytest/crossboundarytest.csproj @@ -1,6 +1,7 @@ - exe + + true 1 diff --git a/src/tests/readytorun/crossboundarylayout/crossboundarytest/main.cs b/src/tests/readytorun/crossboundarylayout/crossboundarytest/main.cs index d167fb803506c..53c8171810a05 100644 --- a/src/tests/readytorun/crossboundarylayout/crossboundarytest/main.cs +++ b/src/tests/readytorun/crossboundarylayout/crossboundarytest/main.cs @@ -2,12 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; namespace CrossBoundaryLayout { - class Program + public class Program { - public static int Main() + [Fact] + public static int TestEntryPoint() { int failure = ATest.Test(); failure += BTest.Test(); diff --git a/src/tests/readytorun/crossgen2/Program.cs b/src/tests/readytorun/crossgen2/Program.cs index 6681eee308475..8c7fefd81b4c2 100644 --- a/src/tests/readytorun/crossgen2/Program.cs +++ b/src/tests/readytorun/crossgen2/Program.cs @@ -12,6 +12,7 @@ using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Text; +using Xunit; internal class ClassWithStatic { @@ -21,7 +22,7 @@ internal class ClassWithStatic public static int Static = StaticValue; } -internal class Program +public class Program { const int LineCountInitialValue = 0x12345678; @@ -2247,12 +2248,12 @@ public static int Main() } else { - Console.Error.WriteLine($@"{_failedTests.Count} test failed:"); + Console.Error.WriteLine($@"{_failedTests.Count} tests failed:"); foreach (string testName in _failedTests) { Console.Error.WriteLine($@" {testName}"); } - return 1; + return 101; } } diff --git a/src/tests/readytorun/crossgen2/smoketest.targets b/src/tests/readytorun/crossgen2/smoketest.targets index efa703dbd65b8..38af55e1c6dc8 100644 --- a/src/tests/readytorun/crossgen2/smoketest.targets +++ b/src/tests/readytorun/crossgen2/smoketest.targets @@ -1,8 +1,8 @@ - exe - BuildAndRun + true + false true diff --git a/src/tests/readytorun/determinism/Program.cs b/src/tests/readytorun/determinism/Program.cs index df67de8d2b2af..c39d1f8ab3819 100644 --- a/src/tests/readytorun/determinism/Program.cs +++ b/src/tests/readytorun/determinism/Program.cs @@ -3,10 +3,12 @@ using System; using System.IO; +using Xunit; -internal class Program +public class Program { - public static int Main() + [Fact] + public static int TestEntryPoint() { byte[] file1 = File.ReadAllBytes("crossgen2smoke1.ildll"); byte[] file2 = File.ReadAllBytes("crossgen2smoke2.ildll"); diff --git a/src/tests/readytorun/determinism/crossgen2determinism.csproj b/src/tests/readytorun/determinism/crossgen2determinism.csproj index 8544d11bd5257..f48f4be1d58a8 100644 --- a/src/tests/readytorun/determinism/crossgen2determinism.csproj +++ b/src/tests/readytorun/determinism/crossgen2determinism.csproj @@ -1,6 +1,7 @@ - exe + + true true true diff --git a/src/tests/readytorun/fieldlayout/fieldlayout.csproj b/src/tests/readytorun/fieldlayout/fieldlayout.csproj index 0fe534eba13d0..c64feba729444 100644 --- a/src/tests/readytorun/fieldlayout/fieldlayout.csproj +++ b/src/tests/readytorun/fieldlayout/fieldlayout.csproj @@ -1,7 +1,8 @@ - exe + + true true true true diff --git a/src/tests/readytorun/fieldlayout/fieldlayouttests.cs b/src/tests/readytorun/fieldlayout/fieldlayouttests.cs index cbd03e37abfeb..a7fccd4677abc 100644 --- a/src/tests/readytorun/fieldlayout/fieldlayouttests.cs +++ b/src/tests/readytorun/fieldlayout/fieldlayouttests.cs @@ -1,11 +1,13 @@ using System; using System.Runtime.Intrinsics; +using Xunit; -class Test +public class Test { // This test uses the same set of types as the type system unittests use, and attempts to validate that the R2R usage of said types works well. // This is done by touching the various types, and then relying on the verification logic in R2R images to detect failures. - static int Main() + [Fact] + public static void TestEntryPoint() { ContainsGCPointersFieldsTest.Test(); // ExplicitTest.Test(); // Explicit layout is known to not quite match the runtime, and if enabled this set of tests will fail. @@ -15,7 +17,6 @@ static int Main() AutoTestWithVector128.Test(); AutoTestWithVector256.Test(); AutoTestWithVector512.Test(); - return 100; } } diff --git a/src/tests/readytorun/multifolder/Root.cs b/src/tests/readytorun/multifolder/Root.cs index efb5810231221..e7fe27573bd22 100644 --- a/src/tests/readytorun/multifolder/Root.cs +++ b/src/tests/readytorun/multifolder/Root.cs @@ -5,13 +5,15 @@ using System.IO; using System.Reflection; using System.Runtime.Loader; +using Xunit; public class RootClass { - public static int Main() + [Fact] + public static int TestEntryPoint() { string currentFolder = Path.GetDirectoryName(typeof(RootClass).Assembly.Location); - string folderAPath = Path.Combine(currentFolder, "..", "FolderA", "FolderA", "FolderA.dll"); + string folderAPath = Path.Combine(currentFolder, "FolderA.dll"); Console.WriteLine("Loading FolderA: {0}", folderAPath); Assembly folderA = AssemblyLoadContext.Default.LoadFromAssemblyPath(folderAPath); Type classA = folderA.GetType("ClassA"); @@ -22,7 +24,7 @@ public static int Main() return 101; } - string folderBPath = Path.Combine(currentFolder, "..", "FolderB", "FolderB", "FolderB.dll"); + string folderBPath = Path.Combine(currentFolder, "FolderB.dll"); Console.WriteLine("Loading FolderB: {0}", folderBPath); Assembly folderB = AssemblyLoadContext.Default.LoadFromAssemblyPath(folderBPath); Type classB = folderB.GetType("ClassB"); diff --git a/src/tests/readytorun/multifolder/multifolder.csproj b/src/tests/readytorun/multifolder/multifolder.csproj index 0e1410f50bac0..1cf1e99bd976c 100644 --- a/src/tests/readytorun/multifolder/multifolder.csproj +++ b/src/tests/readytorun/multifolder/multifolder.csproj @@ -1,6 +1,7 @@ - exe + + true true false @@ -19,8 +20,16 @@ - - + + false + Content + Always + + + false + Content + Always + @@ -39,8 +48,8 @@ $(CLRTestBatchPreCommands) echo --targetarch:$(TargetArchitecture)>>%__ResponseFile% echo --targetos:$(TargetOS)>>%__ResponseFile% echo %scriptPath%\multifolder.dll>>%__ResponseFile% - echo %scriptPath%\..\FolderA\FolderA\FolderA.dll>>%__ResponseFile% - echo %scriptPath%\..\FolderB\FolderB\FolderB.dll>>%__ResponseFile% + echo %scriptPath%\FolderA.dll>>%__ResponseFile% + echo %scriptPath%\FolderB.dll>>%__ResponseFile% REM Suppress GC stand alone mode for the duration of Crossgen2 execution set __gcStandaloneModeToRestore=!DOTNET_GCName! @@ -90,8 +99,8 @@ $(CLRTestBashPreCommands) echo --targetarch:$(TargetArchitecture)>>$__ResponseFile echo --targetos:$(TargetOS)>>$__ResponseFile echo $__OutputDir/multifolder.dll>>$__ResponseFile - echo $__OutputDir/../FolderA/FolderA/FolderA.dll>>$__ResponseFile - echo $__OutputDir/../FolderB/FolderB/FolderB.dll>>$__ResponseFile + echo $__OutputDir/FolderA.dll>>$__ResponseFile + echo $__OutputDir/FolderB.dll>>$__ResponseFile # Suppress some DOTNET variables for the duration of Crossgen2 execution export -n DOTNET_GCName DOTNET_GCStress DOTNET_HeapVerify DOTNET_ReadyToRun DOTNET_TC_OnStackReplacement DOTNET_TC_PartialCompilation diff --git a/src/tests/readytorun/readytorun.csproj b/src/tests/readytorun/readytorun.csproj new file mode 100644 index 0000000000000..d815ac504e637 --- /dev/null +++ b/src/tests/readytorun/readytorun.csproj @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.il b/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.il index 9b671612d08eb..b956ba3e089f4 100644 --- a/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.il +++ b/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.il @@ -16,6 +16,7 @@ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 6:0:0:0 } +.assembly extern xunit.core {} .assembly extern NonexistentAssembly { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: @@ -120,7 +121,7 @@ } // end of class System.Runtime.CompilerServices.NullableAttribute -.class private auto ansi beforefieldinit GitHub_89337 +.class public auto ansi beforefieldinit GitHub_89337 extends [System.Runtime]System.Object { .class auto ansi nested private beforefieldinit Generic`1 @@ -176,9 +177,12 @@ IL_0006: ret } // end of method GitHub_89337::Passthru - .method private hidebysig static int32 + .method public hidebysig static int32 Main() cil managed { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint // Code size 8 (0x8) .maxstack 1 diff --git a/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.ilproj b/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.ilproj index f51eb88fcda4c..5db259c7606ea 100644 --- a/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.ilproj +++ b/src/tests/readytorun/regressions/GitHub_89337/GitHub_89337.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.cs b/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.cs index 5839087f883c5..65c0a59874772 100644 --- a/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.cs +++ b/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.cs @@ -2,10 +2,12 @@ using System.IO; using System.Runtime.CompilerServices; using System.Diagnostics; +using Xunit; public class Program { - public static int Main() + [Fact] + public static int TestEntryPoint() { return RunTest(); } diff --git a/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.csproj b/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.csproj index f4be7071fb89a..51bf258712466 100644 --- a/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.csproj +++ b/src/tests/readytorun/tests/fileversionpreservation/fileversionpreservation.csproj @@ -1,6 +1,7 @@ - exe + + true PdbOnly True true diff --git a/src/tests/readytorun/tests/generics.cs b/src/tests/readytorun/tests/generics.cs index d4dc2acd79cc2..ba8132f37ed76 100644 --- a/src/tests/readytorun/tests/generics.cs +++ b/src/tests/readytorun/tests/generics.cs @@ -9,10 +9,12 @@ using System.Runtime.CompilerServices; using System.Text; using System.Threading; +using Xunit; -class Program +public class Program { - static int Main() + [Fact] + public static int TestEntryPoint() { // Run all tests 3x times to exercise both slow and fast paths work for (int i = 0; i < 3; i++) diff --git a/src/tests/readytorun/tests/generics.csproj b/src/tests/readytorun/tests/generics.csproj index 9dbefb812fe4f..89b0712bfe6a3 100644 --- a/src/tests/readytorun/tests/generics.csproj +++ b/src/tests/readytorun/tests/generics.csproj @@ -1,7 +1,8 @@ + + true true - Exe 1 diff --git a/src/tests/readytorun/tests/genericsload/callgenericctor.cs b/src/tests/readytorun/tests/genericsload/callgenericctor.cs index 0a6d72988c84e..0681553bce88d 100644 --- a/src/tests/readytorun/tests/genericsload/callgenericctor.cs +++ b/src/tests/readytorun/tests/genericsload/callgenericctor.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; +using Xunit; class Foo { @@ -14,9 +15,10 @@ internal void M() } } -class Program +public class Program { - static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/readytorun/tests/genericsload/callgenericctor.csproj b/src/tests/readytorun/tests/genericsload/callgenericctor.csproj index d3ce5be6537db..bdd9a0b2a082e 100644 --- a/src/tests/readytorun/tests/genericsload/callgenericctor.csproj +++ b/src/tests/readytorun/tests/genericsload/callgenericctor.csproj @@ -1,6 +1,7 @@ - exe + + true 1 diff --git a/src/tests/readytorun/tests/genericsload/usegenericfield.cs b/src/tests/readytorun/tests/genericsload/usegenericfield.cs index ce4f0d613496e..5f3ea4712c827 100644 --- a/src/tests/readytorun/tests/genericsload/usegenericfield.cs +++ b/src/tests/readytorun/tests/genericsload/usegenericfield.cs @@ -4,6 +4,7 @@ using System; using System.Runtime.CompilerServices; +using Xunit; class Foo { @@ -14,9 +15,10 @@ internal bool M() } } -class Program +public class Program { - static int Main() + [Fact] + public static int TestEntryPoint() { try { diff --git a/src/tests/readytorun/tests/genericsload/usegenericfield.csproj b/src/tests/readytorun/tests/genericsload/usegenericfield.csproj index 0aa8dd097fc1e..67b266b8658fa 100644 --- a/src/tests/readytorun/tests/genericsload/usegenericfield.csproj +++ b/src/tests/readytorun/tests/genericsload/usegenericfield.csproj @@ -1,6 +1,7 @@ - exe + + true 1 1 diff --git a/src/tests/readytorun/tests/main.cs b/src/tests/readytorun/tests/main.cs index 8201652953e1a..e521ecfebcdef 100644 --- a/src/tests/readytorun/tests/main.cs +++ b/src/tests/readytorun/tests/main.cs @@ -10,6 +10,7 @@ using System.Runtime.Loader; using System.Reflection; using System.IO; +using Xunit; class InstanceFieldTest : MyClass { @@ -48,7 +49,7 @@ public static string OpenClosedDelegateTarget(this string x, string foo) } } -class Program +public class Program { static void TestVirtualMethodCalls() { @@ -547,7 +548,7 @@ static void RunAllTests() ILInliningVersioningTest.RunAllTests(typeof(Program).Assembly); } - static int Main() + public static int Main() { // Run all tests 3x times to exercise both slow and fast paths work for (int i = 0; i < 3; i++) diff --git a/src/tests/readytorun/tests/mainv1.csproj b/src/tests/readytorun/tests/mainv1.csproj index 1b9c55e1eac58..1b80a5c999de5 100644 --- a/src/tests/readytorun/tests/mainv1.csproj +++ b/src/tests/readytorun/tests/mainv1.csproj @@ -1,6 +1,7 @@ - exe + true + false false true @@ -43,7 +44,7 @@ if not exist IL_DLLS\mainv1.dll ( ) IF "%__TestDotNetCmd%"=="" set __TestDotNetCmd=dotnet -%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:%25CD%\IL_DLLS\mainv1.dll -o:test.dll ..\testv1\test\test.dll +%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:%25CD%\IL_DLLS\mainv1.dll -o:test.dll testv1\test.dll set CrossGenStatus=!ERRORLEVEL! IF NOT !CrossGenStatus!==0 ( @@ -55,7 +56,7 @@ if not exist test.map ( exit /b 1 ) -%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\mainv1.dll -r:..\testv1\test\test.dll -o:fieldgetter.dll IL_DLLS\fieldgetter.dll +%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\mainv1.dll -r:testv1\test.dll -o:fieldgetter.dll IL_DLLS\fieldgetter.dll set CrossGenStatus=!ERRORLEVEL! IF NOT !CrossGenStatus!==0 ( @@ -67,7 +68,7 @@ if not exist fieldgetter.map ( exit /b 1 ) -%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:..\testv1\test\test.dll --opt-cross-module:test -o:mainv1.dll IL_DLLS\mainv1.dll +%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:testv1\test.dll --opt-cross-module:test -o:mainv1.dll IL_DLLS\mainv1.dll set CrossGenStatus=!ERRORLEVEL! IF NOT !CrossGenStatus!==0 ( @@ -109,7 +110,7 @@ then exit 1 fi -$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:IL_DLLS/fieldgetter.dll -r:IL_DLLS/mainv1.dll -o:test.dll ../testv1/test/test.dll +$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:IL_DLLS/fieldgetter.dll -r:IL_DLLS/mainv1.dll -o:test.dll testv1/test.dll __cgExitCode=$? if [ $__cgExitCode -ne 0 ] @@ -123,7 +124,7 @@ then exit 1 fi -$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:../testv1/test/test.dll -r:IL_DLLS/mainv1.dll -o:fieldgetter.dll IL_DLLS/fieldgetter.dll +$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:testv1/test.dll -r:IL_DLLS/mainv1.dll -o:fieldgetter.dll IL_DLLS/fieldgetter.dll __cgExitCode=$? if [ $__cgExitCode -ne 0 ] @@ -137,7 +138,7 @@ then exit 1 fi -$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:../testv1/test/test.dll -r:IL_DLLS/fieldgetter.dll --opt-cross-module:test -o:mainv1.dll IL_DLLS/mainv1.dll +$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:testv1/test.dll -r:IL_DLLS/fieldgetter.dll --opt-cross-module:test -o:mainv1.dll IL_DLLS/mainv1.dll __cgExitCode=$? if [ $__cgExitCode -ne 0 ] @@ -154,4 +155,15 @@ fi export DOTNET_GCName DOTNET_GCStress DOTNET_HeapVerify DOTNET_ReadyToRun ]]> + + + + test.dll + $(OutputPath)/../testv1/test/ + $(OutputPath)/testv1 + + + + + diff --git a/src/tests/readytorun/tests/mainv2.csproj b/src/tests/readytorun/tests/mainv2.csproj index 458297faf72fd..9ff6350fef141 100644 --- a/src/tests/readytorun/tests/mainv2.csproj +++ b/src/tests/readytorun/tests/mainv2.csproj @@ -1,6 +1,7 @@ - exe + true + false false true @@ -8,6 +9,7 @@ + @@ -43,7 +45,7 @@ if not exist IL_DLLS\mainv2.dll ( IF "%__TestDotNetCmd%"=="" set __TestDotNetCmd=dotnet REM NOTE THAT THIS IS WHERE WE BUILD THE R2R IMAGE using V2 of test not V1 -%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:%25CD%\IL_DLLS\mainv2.dll -o:test.dll ..\testv2\test\test.dll +%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:%25CD%\IL_DLLS\mainv2.dll -o:test.dll testv2\test.dll set CrossGenStatus=!ERRORLEVEL! IF NOT !CrossGenStatus!==0 ( @@ -55,7 +57,7 @@ if not exist test.map ( exit /b 1 ) -%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\mainv2.dll -r:..\testv1\test\test.dll -o:fieldgetter.dll IL_DLLS\fieldgetter.dll +%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\mainv2.dll -r:testv1\test.dll -o:fieldgetter.dll IL_DLLS\fieldgetter.dll set CrossGenStatus=!ERRORLEVEL! IF NOT !CrossGenStatus!==0 ( @@ -67,7 +69,7 @@ if not exist fieldgetter.map ( exit /b 1 ) -%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:..\testv1\test\test.dll --opt-cross-module:test -o:mainv2.dll IL_DLLS\mainv2.dll +%__TestDotNetCmd% %Core_Root%\crossgen2\crossgen2.dll --map -r:%Core_Root%\*.dll -r:%25CD%\IL_DLLS\fieldgetter.dll -r:testv1\test.dll --opt-cross-module:test -o:mainv2.dll IL_DLLS\mainv2.dll set CrossGenStatus=!ERRORLEVEL! IF NOT !CrossGenStatus!==0 ( @@ -110,7 +112,7 @@ then fi # NOTE THAT THIS IS WHERE WE BUILD THE R2R IMAGE using V2 of test not V1 -$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:IL_DLLS/fieldgetter.dll -r:IL_DLLS/mainv2.dll -o:test.dll ../testv2/test/test.dll +$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:IL_DLLS/fieldgetter.dll -r:IL_DLLS/mainv2.dll -o:test.dll testv2/test.dll __cgExitCode=$? if [ $__cgExitCode -ne 0 ] @@ -124,7 +126,7 @@ then exit 1 fi -$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:../testv1/test/test.dll -r:IL_DLLS/mainv2.dll -o:fieldgetter.dll IL_DLLS/fieldgetter.dll +$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:testv1/test.dll -r:IL_DLLS/mainv2.dll -o:fieldgetter.dll IL_DLLS/fieldgetter.dll __cgExitCode=$? if [ $__cgExitCode -ne 0 ] @@ -138,7 +140,7 @@ then exit 1 fi -$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:../testv1/test/test.dll -r:IL_DLLS/fieldgetter.dll --opt-cross-module:test -o:mainv2.dll IL_DLLS/mainv2.dll +$CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll --map -r:$CORE_ROOT/*.dll -r:testv1/test.dll -r:IL_DLLS/fieldgetter.dll --opt-cross-module:test -o:mainv2.dll IL_DLLS/mainv2.dll __cgExitCode=$? if [ $__cgExitCode -ne 0 ] @@ -155,4 +157,18 @@ fi export DOTNET_GCName DOTNET_GCStress DOTNET_HeapVerify DOTNET_ReadyToRun ]]> + + + + test.dll + $(OutputPath)/../testv1/test/ + $(OutputPath)/testv1 + $(OutputPath)/../testv2/test/ + $(OutputPath)/testv2 + + + + + + diff --git a/src/tests/readytorun/tests/newarray.cs b/src/tests/readytorun/tests/newarray.cs index 6aa4409458cdd..4f0ade86e5602 100644 --- a/src/tests/readytorun/tests/newarray.cs +++ b/src/tests/readytorun/tests/newarray.cs @@ -8,12 +8,14 @@ using System.Runtime.CompilerServices; using System.Text; using System.Threading; +using Xunit; -class Program +public class Program { const int ARRAY_SIZE = 1024; - static int Main() + [Fact] + public static int TestEntryPoint() { // Run all tests 3x times to exercise both slow and fast paths work for (int i = 0; i < 3; i++) diff --git a/src/tests/readytorun/tests/newarray.csproj b/src/tests/readytorun/tests/newarray.csproj index cf4ab52819de4..0b2ae224b8005 100644 --- a/src/tests/readytorun/tests/newarray.csproj +++ b/src/tests/readytorun/tests/newarray.csproj @@ -1,7 +1,8 @@ + + true true - Exe 1 diff --git a/src/tests/reflection/DefaultInterfaceMethods/Emit.cs b/src/tests/reflection/DefaultInterfaceMethods/Emit.cs index 2f54244151b55..8097a2e56f838 100644 --- a/src/tests/reflection/DefaultInterfaceMethods/Emit.cs +++ b/src/tests/reflection/DefaultInterfaceMethods/Emit.cs @@ -5,10 +5,12 @@ using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; +using Xunit; -class Program +public class Program { - static int Main() + [Fact] + public static int TestEntryPoint() { var ab = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Mine"), AssemblyBuilderAccess.Run); var modb = ab.DefineDynamicModule("Mine.dll"); diff --git a/src/tests/reflection/DefaultInterfaceMethods/Emit.csproj b/src/tests/reflection/DefaultInterfaceMethods/Emit.csproj index 361a12a968a0d..f3af7e5744c10 100644 --- a/src/tests/reflection/DefaultInterfaceMethods/Emit.csproj +++ b/src/tests/reflection/DefaultInterfaceMethods/Emit.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.cs b/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.cs index e7fbcaeb7dc5e..49d34a6211788 100644 --- a/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.cs +++ b/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.cs @@ -3,10 +3,12 @@ using System; using System.Reflection; +using Xunit; -class Program +public class Program { - static int Main() + [Fact] + public static int TestEntryPoint() { bool failed = false; diff --git a/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.csproj b/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.csproj index 87c9b9bfb0b87..217ae6232bd4b 100644 --- a/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.csproj +++ b/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.cs b/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.cs index ad3c78ca7e0fb..d06c558a074d0 100644 --- a/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.cs +++ b/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.cs @@ -3,10 +3,12 @@ using System; using System.Reflection; +using Xunit; -class Program +public class Program { - static int Main() + [Fact] + public static int TestEntryPoint() { if ((int)typeof(IFoo).GetMethod("StaticMethod").Invoke(null, new object[] { 1 }) != 31) return 1; diff --git a/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.csproj b/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.csproj index 759371a0928e8..a5efc87aeceb3 100644 --- a/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.csproj +++ b/src/tests/reflection/DefaultInterfaceMethods/InvokeConsumer.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/reflection/Directory.Build.props b/src/tests/reflection/Directory.Build.props new file mode 100644 index 0000000000000..17e80030ca09d --- /dev/null +++ b/src/tests/reflection/Directory.Build.props @@ -0,0 +1,11 @@ + + + + + + + true + $(NoWarn);xUnit1013 + false + + diff --git a/src/tests/reflection/GenericAttribute/GenericAttributeTests.cs b/src/tests/reflection/GenericAttribute/GenericAttributeTests.cs index 3359e038ee14b..3aa9f891d5a40 100644 --- a/src/tests/reflection/GenericAttribute/GenericAttributeTests.cs +++ b/src/tests/reflection/GenericAttribute/GenericAttributeTests.cs @@ -3,10 +3,12 @@ using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; +using Xunit; -class Program +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { Assembly assembly = typeof(Class).GetTypeInfo().Assembly; Assert(CustomAttributeExtensions.GetCustomAttribute>(assembly) != null); @@ -180,8 +182,6 @@ static int Main() AssertAny(a1_data, a => a.AttributeType == typeof(MultiAttribute) && a.ConstructorArguments.Count == 1 && a.NamedArguments.Count == 0 && a.ConstructorArguments[0].ArgumentType == typeof(Type) && ((Type)a.ConstructorArguments[0].Value) == typeof(Class)); AssertAny(a1_data, a => a.AttributeType == typeof(MultiAttribute) && a.ConstructorArguments.Count == 0 && a.NamedArguments.Count == 1 && a.NamedArguments[0].TypedValue.ArgumentType == typeof(Type) && ((Type)a.NamedArguments[0].TypedValue.Value) == typeof(Class.Derive)); - - return 100; } static void Assert(bool condition, [CallerLineNumberAttribute]int line = 0) diff --git a/src/tests/reflection/GenericAttribute/GenericAttributeTests.csproj b/src/tests/reflection/GenericAttribute/GenericAttributeTests.csproj index 98e2e5da3a0e9..3bbfd6a86af3c 100644 --- a/src/tests/reflection/GenericAttribute/GenericAttributeTests.csproj +++ b/src/tests/reflection/GenericAttribute/GenericAttributeTests.csproj @@ -1,7 +1,8 @@ + + true true - Exe diff --git a/src/tests/reflection/Modifiers/modifiers.cs b/src/tests/reflection/Modifiers/modifiers.cs index bf1c7358883c5..b8291b90cbd71 100644 --- a/src/tests/reflection/Modifiers/modifiers.cs +++ b/src/tests/reflection/Modifiers/modifiers.cs @@ -3,10 +3,12 @@ using System; using System.Reflection; +using Xunit; -class Program +public class Program { - static unsafe int Main() + [Fact] + public static unsafe int TestEntryPoint() { var baseClass = new BaseClass(); var derivedClass = new DerivedClass(); diff --git a/src/tests/reflection/Modifiers/modifiers.csproj b/src/tests/reflection/Modifiers/modifiers.csproj index 6e27508107a3c..03de6613cef5d 100644 --- a/src/tests/reflection/Modifiers/modifiers.csproj +++ b/src/tests/reflection/Modifiers/modifiers.csproj @@ -1,7 +1,8 @@ + + true true - Exe diff --git a/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.cs b/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.cs index 613d9f390e4c7..40e0453cd2fc8 100644 --- a/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.cs +++ b/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.cs @@ -5,13 +5,15 @@ using System.Linq; using System.Reflection; using System.Reflection.Emit; +using Xunit; class BaseClass1 { } -class Test_EmittingIgnoresAccessChecksToAttributeIsRespected +public class Test_EmittingIgnoresAccessChecksToAttributeIsRespected { - public static int Main() + [Fact] + public static void TestEntryPoint() { AssemblyBuilder assemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("testassembly"), AssemblyBuilderAccess.Run); ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("testmodule"); @@ -31,7 +33,6 @@ public static int Main() typeBuilder.CreateType(); } Console.WriteLine("PASS"); - return 100; } static void AddInstanceOfIgnoresAccessChecksToAttribute(AssemblyBuilder assemblyBuilder, ConstructorInfo ignoreAccessChecksToAttributeCtor, Assembly assembly) diff --git a/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.csproj b/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.csproj index dba1aca4a2131..4c54c1c679ea9 100644 --- a/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.csproj +++ b/src/tests/reflection/RefEmit/EmittingIgnoresAccessChecksToAttributeIsRespected.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/reflection/SetValue/TrySetReadonlyStaticField.cs b/src/tests/reflection/SetValue/TrySetReadonlyStaticField.cs index e3edc917202c9..7da9a2bb0757a 100644 --- a/src/tests/reflection/SetValue/TrySetReadonlyStaticField.cs +++ b/src/tests/reflection/SetValue/TrySetReadonlyStaticField.cs @@ -3,8 +3,9 @@ using System; using System.Reflection; +using Xunit; -class X +public class X { readonly static string S; readonly static string S_Expected; @@ -94,7 +95,8 @@ static bool SetDirect(string s, bool shouldThrow) return (shouldThrow == threw) && !unexpected; } - public static int Main() + [Fact] + public static int TestEntryPoint() { var s = S; bool b0 = Set("3", true); diff --git a/src/tests/reflection/SetValue/TrySetReadonlyStaticField.csproj b/src/tests/reflection/SetValue/TrySetReadonlyStaticField.csproj index 132b634343f00..d3410b888eba9 100644 --- a/src/tests/reflection/SetValue/TrySetReadonlyStaticField.csproj +++ b/src/tests/reflection/SetValue/TrySetReadonlyStaticField.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.cs b/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.cs index dbe8e3c5d909d..fb9a7df1d0a29 100644 --- a/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.cs +++ b/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.cs @@ -3,6 +3,7 @@ using System; using System.Reflection; +using Xunit; public class TestSetValue { @@ -14,9 +15,10 @@ public class TestSetValueDirect public static readonly string MagicString = ""; } -class Test_TrySetReadonlyStaticField2 +public class Test_TrySetReadonlyStaticField2 { - public static int Main() + [Fact] + public static int TestEntryPoint() { // Validate that the readonly static field cannot be set via reflection when the static constructor is triggered // by the reflection SetValue operation itself. diff --git a/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.csproj b/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.csproj index 2e607efdde537..df8a9a2c2381f 100644 --- a/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.csproj +++ b/src/tests/reflection/SetValue/TrySetReadonlyStaticField2.csproj @@ -1,6 +1,7 @@ - Exe + + true true diff --git a/src/tests/reflection/StaticInterfaceMembers/consumer.cs b/src/tests/reflection/StaticInterfaceMembers/consumer.cs index 7775c4c058681..78079b716c9c7 100644 --- a/src/tests/reflection/StaticInterfaceMembers/consumer.cs +++ b/src/tests/reflection/StaticInterfaceMembers/consumer.cs @@ -3,10 +3,12 @@ using System; using System.Reflection; +using Xunit; -class Program +public class Program { - static int Main() + [Fact] + public static void TestEntryPoint() { { FieldInfo fi = typeof(IFoo).GetField("O"); @@ -28,7 +30,5 @@ static int Main() if (!object.ReferenceEquals(val, typeof(string))) throw new Exception(); } - - return 100; } } diff --git a/src/tests/reflection/StaticInterfaceMembers/consumer.csproj b/src/tests/reflection/StaticInterfaceMembers/consumer.csproj index 4d483978e90ed..8473dab237899 100644 --- a/src/tests/reflection/StaticInterfaceMembers/consumer.csproj +++ b/src/tests/reflection/StaticInterfaceMembers/consumer.csproj @@ -1,6 +1,7 @@ - Exe + + true diff --git a/src/tests/reflection/Tier1Collectible/Tier1Collectible.cs b/src/tests/reflection/Tier1Collectible/Tier1Collectible.cs index 3214f396d9fdc..9893676dd5c6c 100644 --- a/src/tests/reflection/Tier1Collectible/Tier1Collectible.cs +++ b/src/tests/reflection/Tier1Collectible/Tier1Collectible.cs @@ -6,13 +6,13 @@ using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Threading; +using Xunit; public static class Program { - private static int Main() + [Fact] + public static void TestEntryPoint() { - const int Pass = 100, Fail = 1; - PromoteToTier1AndRun(() => { CollectibleTestIteration(); @@ -20,8 +20,6 @@ private static int Main() GC.WaitForPendingFinalizers(); GC.WaitForPendingFinalizers(); }); - - return Pass; } [MethodImpl(MethodImplOptions.NoInlining)] diff --git a/src/tests/reflection/Tier1Collectible/Tier1Collectible.csproj b/src/tests/reflection/Tier1Collectible/Tier1Collectible.csproj index a7eeee0ff34f9..0b22e5805e2ff 100644 --- a/src/tests/reflection/Tier1Collectible/Tier1Collectible.csproj +++ b/src/tests/reflection/Tier1Collectible/Tier1Collectible.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/reflection/ldtoken/byrefs.il b/src/tests/reflection/ldtoken/byrefs.il index b10808684d48f..0f42938d739d6 100644 --- a/src/tests/reflection/ldtoken/byrefs.il +++ b/src/tests/reflection/ldtoken/byrefs.il @@ -19,10 +19,10 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) } -.class private auto ansi beforefieldinit Test_byrefs +.class public auto ansi beforefieldinit Test_byrefs extends [mscorlib]System.Object { - .method private hidebysig static int32 Main() cil managed + .method public hidebysig static int32 Main() cil managed { .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 diff --git a/src/tests/reflection/ldtoken/byrefs.ilproj b/src/tests/reflection/ldtoken/byrefs.ilproj index 244f6fabfbb13..8ca80844d6179 100644 --- a/src/tests/reflection/ldtoken/byrefs.ilproj +++ b/src/tests/reflection/ldtoken/byrefs.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/reflection/ldtoken/ldtokenmember.il b/src/tests/reflection/ldtoken/ldtokenmember.il index 3d9f38e544230..4187a13f4f906 100644 --- a/src/tests/reflection/ldtoken/ldtokenmember.il +++ b/src/tests/reflection/ldtoken/ldtokenmember.il @@ -4,13 +4,18 @@ .assembly extern mscorlib { } +.assembly extern xunit.core {} .assembly ldtokenmember { } -.method private hidebysig static int32 Main() cil managed +.class public auto ansi ldtokenmember { +.method public hidebysig static int32 Main() cil managed { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint .maxstack 8 .locals init (class [mscorlib]System.Type nonGenericHolderType, @@ -291,6 +296,7 @@ OtherWeirdoGenericMethodOwningTypeOK: ldc.i4 100 ret } +} .class private auto ansi beforefieldinit NonGenericHolder extends [mscorlib]System.Object diff --git a/src/tests/reflection/ldtoken/ldtokenmember.ilproj b/src/tests/reflection/ldtoken/ldtokenmember.ilproj index 38e3ca9a8a4aa..364fa6e2741f6 100644 --- a/src/tests/reflection/ldtoken/ldtokenmember.ilproj +++ b/src/tests/reflection/ldtoken/ldtokenmember.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/reflection/ldtoken/modifiers.il b/src/tests/reflection/ldtoken/modifiers.il index 5786f8dc8fb86..d28fa98c92838 100644 --- a/src/tests/reflection/ldtoken/modifiers.il +++ b/src/tests/reflection/ldtoken/modifiers.il @@ -2,10 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. .assembly extern System.Runtime { auto } +.assembly extern xunit.core {} .assembly modifiers { } -.method private hidebysig static int32 Main() cil managed +.class public auto ansi modifiers { +.method public hidebysig static int32 Main() cil managed { + .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( + 01 00 00 00 + ) .entrypoint .locals init (valuetype [System.Runtime]System.RuntimeTypeHandle) @@ -95,6 +100,7 @@ ManagedVsUnmanagedIsPartOfFunctionPointerIdentityOK: ldc.i4 100 ret } +} .class public MyModifier { } diff --git a/src/tests/reflection/ldtoken/modifiers.ilproj b/src/tests/reflection/ldtoken/modifiers.ilproj index 9adb0b0e390d7..e01b7ec08ae9e 100644 --- a/src/tests/reflection/ldtoken/modifiers.ilproj +++ b/src/tests/reflection/ldtoken/modifiers.ilproj @@ -1,6 +1,7 @@ - Exe + + true 1 diff --git a/src/tests/reflection/reflection.csproj b/src/tests/reflection/reflection.csproj new file mode 100644 index 0000000000000..f751282d127da --- /dev/null +++ b/src/tests/reflection/reflection.csproj @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/tests/reflection/regression/github_25697/25697.cs b/src/tests/reflection/regression/github_25697/25697.cs index bf48dbfceaf70..3c2657b80fb76 100644 --- a/src/tests/reflection/regression/github_25697/25697.cs +++ b/src/tests/reflection/regression/github_25697/25697.cs @@ -3,10 +3,11 @@ using System; using System.Reflection; +using Xunit; #pragma warning disable CS8500 -unsafe class Program +unsafe public class Program { public static void AsTypedReference(ref T value, TypedReference* output) @@ -15,7 +16,8 @@ public static void AsTypedReference(ref T value, TypedReference* output) value = (T)(object)"Hello"; } - static int Main() + [Fact] + public static int TestEntryPoint() { // In this test, we try to reflect on a signature of a method that takes a TypedReference*. // This is not useful for much else than Reflection.Emit or Delegate.CreateDelegate. diff --git a/src/tests/reflection/regression/github_25697/25697.csproj b/src/tests/reflection/regression/github_25697/25697.csproj index 1b3326458f12e..96832200eb930 100644 --- a/src/tests/reflection/regression/github_25697/25697.csproj +++ b/src/tests/reflection/regression/github_25697/25697.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/reflection/regression/hfa/hfaParam.cs b/src/tests/reflection/regression/hfa/hfaParam.cs index 447428a997201..b283774507fa8 100644 --- a/src/tests/reflection/regression/hfa/hfaParam.cs +++ b/src/tests/reflection/regression/hfa/hfaParam.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using Xunit; public struct HFAStruct { @@ -38,7 +39,8 @@ public static int TestMethod(HFAStruct hfaStruct, IntStruct intStruct) return 100; } - public static int Main() + [Fact] + public static int TestEntryPoint() { HFAStruct hfaStruct = new HFAStruct(); hfaStruct.f1 = 1.0f; diff --git a/src/tests/reflection/regression/hfa/hfaParam.csproj b/src/tests/reflection/regression/hfa/hfaParam.csproj index 795a5ef028bfa..b25451686f141 100644 --- a/src/tests/reflection/regression/hfa/hfaParam.csproj +++ b/src/tests/reflection/regression/hfa/hfaParam.csproj @@ -1,6 +1,7 @@ - Exe + + true true 1 diff --git a/src/tests/reflection/regression/manyStackArgs/manyStackArgs.cs b/src/tests/reflection/regression/manyStackArgs/manyStackArgs.cs index 11171e15c4088..97c9abda04fa5 100644 --- a/src/tests/reflection/regression/manyStackArgs/manyStackArgs.cs +++ b/src/tests/reflection/regression/manyStackArgs/manyStackArgs.cs @@ -5,6 +5,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using Xunit; public class TestSmallStackArgsClass { @@ -38,7 +39,8 @@ public static int InvokeReflection(object testClassObject, MethodInfo testMethod } - public static int Main() + [Fact] + public static int TestEntryPoint() { Type testClass = Type.GetType("TestSmallStackArgsClass"); ConstructorInfo testConstructor = testClass.GetConstructor(Type.EmptyTypes); diff --git a/src/tests/reflection/regression/manyStackArgs/manyStackArgs.csproj b/src/tests/reflection/regression/manyStackArgs/manyStackArgs.csproj index f3e1cbd44b404..91a9ad12a70aa 100644 --- a/src/tests/reflection/regression/manyStackArgs/manyStackArgs.csproj +++ b/src/tests/reflection/regression/manyStackArgs/manyStackArgs.csproj @@ -1,6 +1,7 @@ - Exe + + true None diff --git a/src/tests/tracing/Directory.Build.props b/src/tests/tracing/Directory.Build.props index 4d3d8c7ee19c2..e6248e14a5959 100644 --- a/src/tests/tracing/Directory.Build.props +++ b/src/tests/tracing/Directory.Build.props @@ -1,8 +1,13 @@ - - + + + true + + true + $(NoWarn);xUnit1013 + false - \ No newline at end of file + diff --git a/src/tests/tracing/common/common.csproj b/src/tests/tracing/common/tracing_common.csproj similarity index 100% rename from src/tests/tracing/common/common.csproj rename to src/tests/tracing/common/tracing_common.csproj diff --git a/src/tests/tracing/eventactivityidcontrol/EventActivityIdControl.cs b/src/tests/tracing/eventactivityidcontrol/EventActivityIdControl.cs index c19e89fd33711..221b04bdb8f7f 100644 --- a/src/tests/tracing/eventactivityidcontrol/EventActivityIdControl.cs +++ b/src/tests/tracing/eventactivityidcontrol/EventActivityIdControl.cs @@ -6,9 +6,13 @@ using System.Threading; using System.Threading.Tasks; using Tracing.Tests.Common; +using Xunit; namespace Tracing.Tests { + using Xunit; + using Assert = Tracing.Tests.Common.Assert; + public static class EventActivityIdControlTest { internal enum ActivityControlCode : uint @@ -26,7 +30,8 @@ internal enum ActivityControlCode : uint private static MethodInfo s_EventActivityIdControl; private static bool s_FailureEncountered = false; - static int Main() + [Fact] + public static int TestEntryPoint() { if(!Initialize()) { diff --git a/src/tests/tracing/eventactivityidcontrol/eventactivityidcontrol.csproj b/src/tests/tracing/eventactivityidcontrol/eventactivityidcontrol.csproj index 8d08f4368a456..6445e5e4ef343 100644 --- a/src/tests/tracing/eventactivityidcontrol/eventactivityidcontrol.csproj +++ b/src/tests/tracing/eventactivityidcontrol/eventactivityidcontrol.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -8,7 +9,7 @@ - + diff --git a/src/tests/tracing/eventcounter/eventcounter.cs b/src/tests/tracing/eventcounter/eventcounter.cs index a38f8f0f17728..468ae575d78fd 100644 --- a/src/tests/tracing/eventcounter/eventcounter.cs +++ b/src/tests/tracing/eventcounter/eventcounter.cs @@ -9,6 +9,7 @@ using System; using System.Collections.Generic; using System.Threading; +using Xunit; namespace BasicEventSourceTests { @@ -108,7 +109,8 @@ public bool validateMean() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { // Create an EventListener. diff --git a/src/tests/tracing/eventcounter/eventcounter.csproj b/src/tests/tracing/eventcounter/eventcounter.csproj index 0659d4e5e8ba4..8b540a6439cd3 100644 --- a/src/tests/tracing/eventcounter/eventcounter.csproj +++ b/src/tests/tracing/eventcounter/eventcounter.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventcounter/gh53564.cs b/src/tests/tracing/eventcounter/gh53564.cs index 95ae21337fea6..9deea88fb676d 100644 --- a/src/tests/tracing/eventcounter/gh53564.cs +++ b/src/tests/tracing/eventcounter/gh53564.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using System.Diagnostics; +using Xunit; namespace gh53564Tests { @@ -80,7 +81,8 @@ public bool Verify() public partial class TestRuntimeEventCounter { - public static int Main() + [Fact] + public static int TestEntryPoint() { // Create an EventListener. using (RuntimeCounterListener myListener = new RuntimeCounterListener()) diff --git a/src/tests/tracing/eventcounter/gh53564.csproj b/src/tests/tracing/eventcounter/gh53564.csproj index 461e257260f15..d0308e7dbbca4 100644 --- a/src/tests/tracing/eventcounter/gh53564.csproj +++ b/src/tests/tracing/eventcounter/gh53564.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventcounter/incrementingeventcounter.cs b/src/tests/tracing/eventcounter/incrementingeventcounter.cs index a6287b9706f7f..4cffe2db8b29d 100644 --- a/src/tests/tracing/eventcounter/incrementingeventcounter.cs +++ b/src/tests/tracing/eventcounter/incrementingeventcounter.cs @@ -9,6 +9,7 @@ using System; using System.Collections.Generic; using System.Threading; +using Xunit; namespace BasicEventSourceTests { @@ -101,7 +102,8 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData) } } - public static int Main() + [Fact] + public static int TestEntryPoint() { int iter = 100; diff --git a/src/tests/tracing/eventcounter/incrementingeventcounter.csproj b/src/tests/tracing/eventcounter/incrementingeventcounter.csproj index 4c7e8c35777a0..323568ee89089 100644 --- a/src/tests/tracing/eventcounter/incrementingeventcounter.csproj +++ b/src/tests/tracing/eventcounter/incrementingeventcounter.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventcounter/incrementingpollingcounter.cs b/src/tests/tracing/eventcounter/incrementingpollingcounter.cs index 7ccbda6184289..ba2f70a81ccf3 100644 --- a/src/tests/tracing/eventcounter/incrementingpollingcounter.cs +++ b/src/tests/tracing/eventcounter/incrementingpollingcounter.cs @@ -9,6 +9,7 @@ using System; using System.Collections.Generic; using System.Threading; +using Xunit; namespace BasicEventSourceTests { @@ -111,7 +112,8 @@ public static double getMockedCount() mockedCountCalled++; return mockedCountCalled; } - public static int Main() + [Fact] + public static int TestEntryPoint() { // Create an EventListener. using (SimpleEventListener myListener = new SimpleEventListener("SimpleEventSource", EventLevel.Verbose)) diff --git a/src/tests/tracing/eventcounter/incrementingpollingcounter.csproj b/src/tests/tracing/eventcounter/incrementingpollingcounter.csproj index 78b4c466b1381..9f445388ed988 100644 --- a/src/tests/tracing/eventcounter/incrementingpollingcounter.csproj +++ b/src/tests/tracing/eventcounter/incrementingpollingcounter.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventcounter/pollingcounter.cs b/src/tests/tracing/eventcounter/pollingcounter.cs index 4ea32b5b4d27c..85634dac786ae 100644 --- a/src/tests/tracing/eventcounter/pollingcounter.cs +++ b/src/tests/tracing/eventcounter/pollingcounter.cs @@ -9,6 +9,7 @@ using System; using System.Collections.Generic; using System.Threading; +using Xunit; namespace BasicEventSourceTests { @@ -150,7 +151,8 @@ public static double getSuccessCount() return successCountCalled; } - public static int Main() + [Fact] + public static int TestEntryPoint() { // Create an EventListener. using (SimpleEventListener myListener = new SimpleEventListener("SimpleEventSource", EventLevel.Verbose)) diff --git a/src/tests/tracing/eventcounter/pollingcounter.csproj b/src/tests/tracing/eventcounter/pollingcounter.csproj index aa5bbc6055c9d..61815bdeeb3be 100644 --- a/src/tests/tracing/eventcounter/pollingcounter.csproj +++ b/src/tests/tracing/eventcounter/pollingcounter.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventcounter/regression-25709.cs b/src/tests/tracing/eventcounter/regression-25709.cs index 44d0f208739c9..f226d81916e26 100644 --- a/src/tests/tracing/eventcounter/regression-25709.cs +++ b/src/tests/tracing/eventcounter/regression-25709.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using System.Diagnostics; +using Xunit; namespace EventCounterRegressionTests { @@ -86,7 +87,8 @@ public static void ThrowExceptionTask() } } - public static int Main() + [Fact] + public static int TestEntryPoint() { Task exceptionTask = Task.Run(ThrowExceptionTask); Thread.Sleep(5000); diff --git a/src/tests/tracing/eventcounter/regression-25709.csproj b/src/tests/tracing/eventcounter/regression-25709.csproj index bf258349ee0d6..3e126c9160d5f 100644 --- a/src/tests/tracing/eventcounter/regression-25709.csproj +++ b/src/tests/tracing/eventcounter/regression-25709.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventcounter/regression-46938.cs b/src/tests/tracing/eventcounter/regression-46938.cs index a4d8977dce0d0..6780d230f7a50 100644 --- a/src/tests/tracing/eventcounter/regression-46938.cs +++ b/src/tests/tracing/eventcounter/regression-46938.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using System.Diagnostics; +using Xunit; namespace EventCounterRegressionTests { @@ -64,7 +65,8 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData) public partial class TestEventCounter { - public static int Main() + [Fact] + public static int TestEntryPoint() { // Create an EventListener. using (SimpleEventListener myListener = new SimpleEventListener()) diff --git a/src/tests/tracing/eventcounter/regression-46938.csproj b/src/tests/tracing/eventcounter/regression-46938.csproj index a9efeaf30d8ba..f3fe4155d447c 100644 --- a/src/tests/tracing/eventcounter/regression-46938.csproj +++ b/src/tests/tracing/eventcounter/regression-46938.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventcounter/runtimecounters.cs b/src/tests/tracing/eventcounter/runtimecounters.cs index dda0cb7038807..c89767a9fae18 100644 --- a/src/tests/tracing/eventcounter/runtimecounters.cs +++ b/src/tests/tracing/eventcounter/runtimecounters.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using System.Diagnostics; +using Xunit; namespace RuntimeEventCounterTests { @@ -97,7 +98,8 @@ public bool Verify() public partial class TestRuntimeEventCounter { - public static int Main() + [Fact] + public static int TestEntryPoint() { // Create an EventListener. using (RuntimeCounterListener myListener = new RuntimeCounterListener()) diff --git a/src/tests/tracing/eventcounter/runtimecounters.csproj b/src/tests/tracing/eventcounter/runtimecounters.csproj index 55c8e1d99e4d1..630b79389ca0d 100644 --- a/src/tests/tracing/eventcounter/runtimecounters.csproj +++ b/src/tests/tracing/eventcounter/runtimecounters.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,7 +11,7 @@ - + + true true true @@ -9,7 +10,7 @@ - - + + diff --git a/src/tests/tracing/eventlistener/eventlistener.csproj b/src/tests/tracing/eventlistener/eventlistener.csproj index b1c44c2bfdc79..4c7d13e1e2e0f 100644 --- a/src/tests/tracing/eventlistener/eventlistener.csproj +++ b/src/tests/tracing/eventlistener/eventlistener.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -8,6 +9,6 @@ - + diff --git a/src/tests/tracing/eventlistener/eventlistenerenabledisable.cs b/src/tests/tracing/eventlistener/eventlistenerenabledisable.cs index d115d346bd3a9..d17f3b24c47af 100644 --- a/src/tests/tracing/eventlistener/eventlistenerenabledisable.cs +++ b/src/tests/tracing/eventlistener/eventlistenerenabledisable.cs @@ -6,6 +6,7 @@ using System.Diagnostics.Tracing; using System.Threading; using Tracing.Tests.Common; +using Xunit; namespace Tracing.Tests { @@ -70,9 +71,10 @@ public void Dispose(bool disableEvents) } } - class EventListenerEnableDisableTest + public class EventListenerEnableDisableTest { - static int Main() + [Fact] + public static int TestEntryPoint() { bool pass = false; using(var source = new EnableDisableEventSource()) diff --git a/src/tests/tracing/eventlistener/eventlistenerenabledisable.csproj b/src/tests/tracing/eventlistener/eventlistenerenabledisable.csproj index 7ad98f416ce2e..4f6c69a74f9dc 100644 --- a/src/tests/tracing/eventlistener/eventlistenerenabledisable.csproj +++ b/src/tests/tracing/eventlistener/eventlistenerenabledisable.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -8,6 +9,6 @@ - + diff --git a/src/tests/tracing/eventpipe/applystartuphook/applystartuphook.csproj b/src/tests/tracing/eventpipe/applystartuphook/applystartuphook.csproj index 54aa82d39fd6b..5843dc449260a 100644 --- a/src/tests/tracing/eventpipe/applystartuphook/applystartuphook.csproj +++ b/src/tests/tracing/eventpipe/applystartuphook/applystartuphook.csproj @@ -1,7 +1,9 @@ + + true + false .NETCoreApp - exe true true true @@ -15,7 +17,7 @@ - + false diff --git a/src/tests/tracing/eventpipe/bigevent/bigevent.cs b/src/tests/tracing/eventpipe/bigevent/bigevent.cs index 90527e893f993..cf4ad9c6fc292 100644 --- a/src/tests/tracing/eventpipe/bigevent/bigevent.cs +++ b/src/tests/tracing/eventpipe/bigevent/bigevent.cs @@ -12,6 +12,7 @@ using Tracing.Tests.Common; using Microsoft.Diagnostics.Tracing.Parsers.Clr; using Microsoft.Diagnostics.NETCore.Client; +using Xunit; namespace Tracing.Tests.BigEventsValidation { @@ -41,7 +42,8 @@ public void SmallEvent() public class BigEventsValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { // This test tries to send a big event (>100KB) and checks that the app does not crash // See https://github.com/dotnet/runtime/issues/50515 for the regression issue diff --git a/src/tests/tracing/eventpipe/bigevent/bigevent.csproj b/src/tests/tracing/eventpipe/bigevent/bigevent.csproj index afca48eb51698..c96905fae181a 100644 --- a/src/tests/tracing/eventpipe/bigevent/bigevent.csproj +++ b/src/tests/tracing/eventpipe/bigevent/bigevent.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -10,7 +11,7 @@ - + diff --git a/src/tests/tracing/eventpipe/buffersize/buffersize.cs b/src/tests/tracing/eventpipe/buffersize/buffersize.cs index a0030311f61e3..c0333e7f6882f 100644 --- a/src/tests/tracing/eventpipe/buffersize/buffersize.cs +++ b/src/tests/tracing/eventpipe/buffersize/buffersize.cs @@ -11,6 +11,7 @@ using System.Text.RegularExpressions; using Tracing.Tests.Common; using Microsoft.Diagnostics.NETCore.Client; +using Xunit; namespace Tracing.Tests.BufferValidation { @@ -23,7 +24,8 @@ private MyEventSource() {} public class BufferValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { // This tests the resilience of message sending with // smaller buffers, specifically 1MB and 4MB diff --git a/src/tests/tracing/eventpipe/buffersize/buffersize.csproj b/src/tests/tracing/eventpipe/buffersize/buffersize.csproj index 18068018243a0..7d1d709f2b618 100644 --- a/src/tests/tracing/eventpipe/buffersize/buffersize.csproj +++ b/src/tests/tracing/eventpipe/buffersize/buffersize.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -10,7 +11,7 @@ - + diff --git a/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClient.cs b/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClient.cs index 20d8ccfb5d2f1..de53b9cbc0bd4 100644 --- a/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClient.cs +++ b/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClient.cs @@ -24,7 +24,7 @@ public DiagnosticsClient(int processId) : { } - internal DiagnosticsClient(IpcEndpointConfig config) : + public DiagnosticsClient(IpcEndpointConfig config) : this(new DiagnosticPortIpcEndpoint(config)) { } diff --git a/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcEndpointConfig.cs b/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcEndpointConfig.cs index 83f3085375da9..b61318e8ad71d 100644 --- a/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcEndpointConfig.cs +++ b/src/tests/tracing/eventpipe/common/Microsoft.Diagnostics.NETCore.Client/DiagnosticsIpc/IpcEndpointConfig.cs @@ -6,7 +6,7 @@ namespace Microsoft.Diagnostics.NETCore.Client { - internal class IpcEndpointConfig + public class IpcEndpointConfig { public enum PortType { diff --git a/src/tests/tracing/eventpipe/common/common.csproj b/src/tests/tracing/eventpipe/common/eventpipe_common.csproj similarity index 88% rename from src/tests/tracing/eventpipe/common/common.csproj rename to src/tests/tracing/eventpipe/common/eventpipe_common.csproj index cbeb2d89944c1..4a265f1994c7e 100644 --- a/src/tests/tracing/eventpipe/common/common.csproj +++ b/src/tests/tracing/eventpipe/common/eventpipe_common.csproj @@ -17,6 +17,6 @@ - + diff --git a/src/tests/tracing/eventpipe/config/name_config_with_pid.csproj b/src/tests/tracing/eventpipe/config/name_config_with_pid.csproj index c090cb1e64fbf..6aa6f80010875 100644 --- a/src/tests/tracing/eventpipe/config/name_config_with_pid.csproj +++ b/src/tests/tracing/eventpipe/config/name_config_with_pid.csproj @@ -1,6 +1,9 @@ - exe + + true + false + true true @@ -8,6 +11,6 @@ - + diff --git a/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.csproj b/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.csproj index e266e498b4219..62d0cdf3f072b 100644 --- a/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.csproj +++ b/src/tests/tracing/eventpipe/diagnosticport/diagnosticport.csproj @@ -1,7 +1,10 @@ + + true + false + .NETCoreApp - exe true true @@ -10,7 +13,7 @@ - - + + diff --git a/src/tests/tracing/eventpipe/enabledisable/enabledisable.cs b/src/tests/tracing/eventpipe/enabledisable/enabledisable.cs index b90468e7918d6..6c44673296f50 100644 --- a/src/tests/tracing/eventpipe/enabledisable/enabledisable.cs +++ b/src/tests/tracing/eventpipe/enabledisable/enabledisable.cs @@ -13,6 +13,7 @@ using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; +using Xunit; namespace Tracing.Tests.EnableDisableValidation { @@ -55,7 +56,8 @@ protected override void OnEventCommand(EventCommandEventArgs command) public class EnableDisableValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { // There is a potential deadlock because EventPipeEventSource uses ConcurrentDictionary, which // triggers loading the CDSCollectionETWBCLProvider EventSource, and registering the provider diff --git a/src/tests/tracing/eventpipe/enabledisable/enabledisable.csproj b/src/tests/tracing/eventpipe/enabledisable/enabledisable.csproj index 961ee4ce17c9b..b901330c4ec00 100644 --- a/src/tests/tracing/eventpipe/enabledisable/enabledisable.csproj +++ b/src/tests/tracing/eventpipe/enabledisable/enabledisable.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true $(DefineConstants);DIAGNOSTICS_RUNTIME true @@ -11,7 +12,7 @@ - + diff --git a/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.cs b/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.cs index 8fa524b7195a8..d3963f4a492aa 100644 --- a/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.cs +++ b/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.cs @@ -12,6 +12,7 @@ using Tracing.Tests.Common; using Microsoft.Diagnostics.Tracing.Parsers.Clr; using Microsoft.Diagnostics.NETCore.Client; +using Xunit; namespace Tracing.Tests.EventSourceError { @@ -44,7 +45,8 @@ protected override void OnEventCommand(EventCommandEventArgs command) public class EventSourceError { - public static int Main() + [Fact] + public static int TestEntryPoint() { // This test validates that if an EventSource generates an error // during construction it gets emitted over EventPipe diff --git a/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.csproj b/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.csproj index afca48eb51698..c96905fae181a 100644 --- a/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.csproj +++ b/src/tests/tracing/eventpipe/eventsourceerror/eventsourceerror.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -10,7 +11,7 @@ - + diff --git a/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.cs b/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.cs index 47512faeb1292..35bd99ead3e3b 100644 --- a/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.cs +++ b/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.cs @@ -6,12 +6,14 @@ using System.Collections.Generic; using Tracing.Tests.Common; using Microsoft.Diagnostics.NETCore.Client; +using Xunit; namespace Tracing.Tests.ExceptionThrown_V1 { public class ProviderValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { var providers = new List() { diff --git a/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.csproj b/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.csproj index 9454202eb4523..162613f9898ad 100644 --- a/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.csproj +++ b/src/tests/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true 1 true @@ -11,8 +12,8 @@ - + - + diff --git a/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.cs b/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.cs index 2d2f0bb2aff91..28c10fcec66fd 100644 --- a/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.cs +++ b/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.cs @@ -7,12 +7,14 @@ using Microsoft.Diagnostics.Tracing; using Tracing.Tests.Common; using Microsoft.Diagnostics.NETCore.Client; +using Xunit; namespace Tracing.Tests.GCEvents { public class ProviderValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { var providers = new List() { diff --git a/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.csproj b/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.csproj index ef843105ee839..23096737d1bcb 100644 --- a/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.csproj +++ b/src/tests/tracing/eventpipe/eventsvalidation/GCEvents.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true 1 true @@ -11,8 +12,8 @@ - + - + diff --git a/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.cs b/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.cs index a89b9f240c417..0d32839c5122f 100644 --- a/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.cs +++ b/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.cs @@ -7,12 +7,14 @@ using Microsoft.Diagnostics.NETCore.Client; using Microsoft.Diagnostics.Tracing; using Tracing.Tests.Common; +using Xunit; namespace Tracing.Tests.GCFinalizers { public class ProviderValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { var providers = new List() { diff --git a/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.csproj b/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.csproj index 7d5b89cdd57a3..4c45140d9121d 100644 --- a/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.csproj +++ b/src/tests/tracing/eventpipe/eventsvalidation/GCFinalizers.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true 1 true @@ -11,8 +12,8 @@ - + - + diff --git a/src/tests/tracing/eventpipe/gcdump/gcdump.cs b/src/tests/tracing/eventpipe/gcdump/gcdump.cs index 7819d9e93ecf2..8c49dd088f384 100644 --- a/src/tests/tracing/eventpipe/gcdump/gcdump.cs +++ b/src/tests/tracing/eventpipe/gcdump/gcdump.cs @@ -14,6 +14,7 @@ using Microsoft.Diagnostics.Tracing.Parsers; using Tracing.Tests.Common; using Microsoft.Diagnostics.Tracing.Parsers.Clr; +using Xunit; namespace Tracing.Tests.EventSourceError { @@ -31,7 +32,8 @@ public class GCDumpTest private static readonly ulong GC_HeapDump_Keyword = 0x100000UL; private static ManualResetEvent _gcStopReceived = new ManualResetEvent(false); - public static int Main() + [Fact] + public static int TestEntryPoint() { // This test validates that if an EventSource generates an error // during construction it gets emitted over EventPipe diff --git a/src/tests/tracing/eventpipe/gcdump/gcdump.csproj b/src/tests/tracing/eventpipe/gcdump/gcdump.csproj index 18068018243a0..7d1d709f2b618 100644 --- a/src/tests/tracing/eventpipe/gcdump/gcdump.csproj +++ b/src/tests/tracing/eventpipe/gcdump/gcdump.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -10,7 +11,7 @@ - + diff --git a/src/tests/tracing/eventpipe/pauseonstart/pauseonstart.csproj b/src/tests/tracing/eventpipe/pauseonstart/pauseonstart.csproj index e266e498b4219..62d0cdf3f072b 100644 --- a/src/tests/tracing/eventpipe/pauseonstart/pauseonstart.csproj +++ b/src/tests/tracing/eventpipe/pauseonstart/pauseonstart.csproj @@ -1,7 +1,10 @@ + + true + false + .NETCoreApp - exe true true @@ -10,7 +13,7 @@ - - + + diff --git a/src/tests/tracing/eventpipe/processenvironment/processenvironment.csproj b/src/tests/tracing/eventpipe/processenvironment/processenvironment.csproj index ddab20e07466b..d9ad626e57fae 100644 --- a/src/tests/tracing/eventpipe/processenvironment/processenvironment.csproj +++ b/src/tests/tracing/eventpipe/processenvironment/processenvironment.csproj @@ -1,7 +1,10 @@ + + true + false + .NETCoreApp - exe true true @@ -12,6 +15,6 @@ - + diff --git a/src/tests/tracing/eventpipe/processinfo/processinfo.cs b/src/tests/tracing/eventpipe/processinfo/processinfo.cs index b7b2b48de2776..1a4b2f0dd4c7d 100644 --- a/src/tests/tracing/eventpipe/processinfo/processinfo.cs +++ b/src/tests/tracing/eventpipe/processinfo/processinfo.cs @@ -14,6 +14,7 @@ using Microsoft.Diagnostics.Tools.RuntimeClient; using Microsoft.Diagnostics.Tracing; using Tracing.Tests.Common; +using Xunit; namespace Tracing.Tests.ProcessInfoValidation { @@ -88,7 +89,8 @@ public static string NormalizeCommandLine(string cmdline) return normalizedCommandLine; } - public static int Main() + [Fact] + public static void TestEntryPoint() { Process currentProcess = Process.GetCurrentProcess(); @@ -230,8 +232,6 @@ public static int Main() Utils.Assert(end == totalSize, $"Full payload should have been read. Expected: {totalSize}, Received: {end}"); Logger.logger.Log($"\n{{\n\tprocessId: {processId},\n\truntimeCookie: {runtimeCookie},\n\tcommandLine: {commandLine},\n\tOS: {OS},\n\tArch: {arch}\n}}"); - - return 100; } } } \ No newline at end of file diff --git a/src/tests/tracing/eventpipe/processinfo/processinfo.csproj b/src/tests/tracing/eventpipe/processinfo/processinfo.csproj index 2c913f467d9e2..35d4ad3fa10a3 100644 --- a/src/tests/tracing/eventpipe/processinfo/processinfo.csproj +++ b/src/tests/tracing/eventpipe/processinfo/processinfo.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -14,7 +15,7 @@ - - + + diff --git a/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs b/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs index 1564c142207e6..b93099bce3c73 100644 --- a/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs +++ b/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs @@ -15,6 +15,7 @@ using Microsoft.Diagnostics.Tools.RuntimeClient; using Microsoft.Diagnostics.Tracing; using Tracing.Tests.Common; +using Xunit; namespace Tracing.Tests.ProcessInfoValidation { @@ -89,7 +90,8 @@ public static string NormalizeCommandLine(string cmdline) return normalizedCommandLine; } - public static int Main() + [Fact] + public static void TestEntryPoint() { Process currentProcess = Process.GetCurrentProcess(); @@ -265,8 +267,6 @@ public static int Main() Utils.Assert(end == totalSize, $"Full payload should have been read. Expected: {totalSize}, Received: {end}"); Logger.logger.Log($"\n{{\n\tprocessId: {processId},\n\truntimeCookie: {runtimeCookie},\n\tcommandLine: {commandLine},\n\tOS: {OS},\n\tArch: {arch},\n\tManagedEntrypointAssemblyName: {managedEntrypointAssemblyName},\n\tClrProductVersion: {clrProductVersion}\n}}"); - - return 100; } } } \ No newline at end of file diff --git a/src/tests/tracing/eventpipe/processinfo2/processinfo2.csproj b/src/tests/tracing/eventpipe/processinfo2/processinfo2.csproj index 2c913f467d9e2..35d4ad3fa10a3 100644 --- a/src/tests/tracing/eventpipe/processinfo2/processinfo2.csproj +++ b/src/tests/tracing/eventpipe/processinfo2/processinfo2.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -14,7 +15,7 @@ - - + + diff --git a/src/tests/tracing/eventpipe/processinfo3/processinfo3.cs b/src/tests/tracing/eventpipe/processinfo3/processinfo3.cs index ec6591efccf6b..fcdc474470fe9 100644 --- a/src/tests/tracing/eventpipe/processinfo3/processinfo3.cs +++ b/src/tests/tracing/eventpipe/processinfo3/processinfo3.cs @@ -15,6 +15,7 @@ using Microsoft.Diagnostics.Tools.RuntimeClient; using Microsoft.Diagnostics.Tracing; using Tracing.Tests.Common; +using Xunit; namespace Tracing.Tests.ProcessInfoValidation { @@ -89,7 +90,8 @@ public static string NormalizeCommandLine(string cmdline) return normalizedCommandLine; } - public static int Main() + [Fact] + public static void TestEntryPoint() { Process currentProcess = Process.GetCurrentProcess(); @@ -337,8 +339,6 @@ public static int Main() Utils.Assert(end == totalSize, $"Full payload should have been read. Expected: {totalSize}, Received: {end}"); Logger.logger.Log($"\n{{\n\tprocessId: {processId},\n\truntimeCookie: {runtimeCookie},\n\tcommandLine: {commandLine},\n\tOS: {OS},\n\tArch: {arch},\n\tManagedEntrypointAssemblyName: {managedEntrypointAssemblyName},\n\tClrProductVersion: {clrProductVersion},\n\tPortableRid: {portableRid}\n}}"); - - return 100; } } } \ No newline at end of file diff --git a/src/tests/tracing/eventpipe/processinfo3/processinfo3.csproj b/src/tests/tracing/eventpipe/processinfo3/processinfo3.csproj index 2c913f467d9e2..35d4ad3fa10a3 100644 --- a/src/tests/tracing/eventpipe/processinfo3/processinfo3.csproj +++ b/src/tests/tracing/eventpipe/processinfo3/processinfo3.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -14,7 +15,7 @@ - - + + diff --git a/src/tests/tracing/eventpipe/providervalidation/providervalidation.cs b/src/tests/tracing/eventpipe/providervalidation/providervalidation.cs index 1f061e8456b24..953349409275c 100644 --- a/src/tests/tracing/eventpipe/providervalidation/providervalidation.cs +++ b/src/tests/tracing/eventpipe/providervalidation/providervalidation.cs @@ -11,6 +11,7 @@ using Microsoft.Diagnostics.Tracing; using Tracing.Tests.Common; using Microsoft.Diagnostics.NETCore.Client; +using Xunit; namespace Tracing.Tests.ProviderValidation { @@ -23,7 +24,8 @@ private MyEventSource() {} public class ProviderValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { // This test validates that the rundown events are present // and that providers turned on that generate events are being written to diff --git a/src/tests/tracing/eventpipe/providervalidation/providervalidation.csproj b/src/tests/tracing/eventpipe/providervalidation/providervalidation.csproj index 683e3dda99097..561b526ade438 100644 --- a/src/tests/tracing/eventpipe/providervalidation/providervalidation.csproj +++ b/src/tests/tracing/eventpipe/providervalidation/providervalidation.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -10,8 +11,8 @@ - + - + diff --git a/src/tests/tracing/eventpipe/reverse/reverse.csproj b/src/tests/tracing/eventpipe/reverse/reverse.csproj index a2fca0e2c1cca..8b5700bc95bbf 100644 --- a/src/tests/tracing/eventpipe/reverse/reverse.csproj +++ b/src/tests/tracing/eventpipe/reverse/reverse.csproj @@ -1,7 +1,10 @@ + + true + false + .NETCoreApp - exe true true true @@ -11,6 +14,6 @@ - + diff --git a/src/tests/tracing/eventpipe/reverseouter/reverseouter.csproj b/src/tests/tracing/eventpipe/reverseouter/reverseouter.csproj index c20471b62209e..5c4cd9c80b4b9 100644 --- a/src/tests/tracing/eventpipe/reverseouter/reverseouter.csproj +++ b/src/tests/tracing/eventpipe/reverseouter/reverseouter.csproj @@ -1,7 +1,10 @@ + + true + false + .NETCoreApp - exe true true @@ -10,6 +13,6 @@ - + diff --git a/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.cs b/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.cs index e7f2e78724570..583d30bf4d12f 100644 --- a/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.cs +++ b/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.cs @@ -12,13 +12,15 @@ using Tracing.Tests.Common; using Microsoft.Diagnostics.NETCore.Client; using Microsoft.Diagnostics.Tracing.Parsers.Clr; +using Xunit; namespace Tracing.Tests.RundownValidation { public class RundownValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { // This test validates that the rundown events are present // and that the rundown contains the necessary events to get diff --git a/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.csproj b/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.csproj index 65cc47f3ac80a..35ac7583ff474 100644 --- a/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.csproj +++ b/src/tests/tracing/eventpipe/rundownvalidation/rundownvalidation.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -14,7 +15,7 @@ - + diff --git a/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.cs b/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.cs index c07d97c62120a..23597c43dd83d 100644 --- a/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.cs +++ b/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.cs @@ -11,12 +11,14 @@ using Microsoft.Diagnostics.Tracing; using Tracing.Tests.Common; using Microsoft.Diagnostics.NETCore.Client; +using Xunit; namespace Tracing.Tests.SimpleRuntimeEventValidation { public class RuntimeEventValidation { - public static int Main() + [Fact] + public static int TestEntryPoint() { // This test validates GC and Exception events in the runtime var ret = IpcTraceTest.RunAndValidateEventCounts( diff --git a/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.csproj b/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.csproj index 18068018243a0..5b8da6f073881 100644 --- a/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.csproj +++ b/src/tests/tracing/eventpipe/simpleruntimeeventvalidation/simpleruntimeeventvalidation.csproj @@ -1,7 +1,8 @@ + + true .NETCoreApp - exe true true @@ -10,7 +11,7 @@ - + diff --git a/src/tests/tracing/runtimeeventsource/NativeRuntimeEventSourceTest.cs b/src/tests/tracing/runtimeeventsource/NativeRuntimeEventSourceTest.cs index eae91a5ea4388..7225e2b7a4a03 100644 --- a/src/tests/tracing/runtimeeventsource/NativeRuntimeEventSourceTest.cs +++ b/src/tests/tracing/runtimeeventsource/NativeRuntimeEventSourceTest.cs @@ -16,12 +16,14 @@ using System.Collections; using System.Collections.Generic; using System.Text; +using Xunit; namespace Tracing.Tests { public sealed class NativeRuntimeEventSourceTest { - private static int Main() + [Fact] + public static void TestEntryPoint() { // Access ArrayPool.Shared.Rent() before the test to avoid the deadlock reported // in https://github.com/dotnet/runtime/issues/86233. This is a real issue, @@ -108,8 +110,6 @@ private static int Main() // Ensure that we've seen no events. Assert2.True("noEventsListener.EventCount == 0", noEventsListener.EventCount == 0); } - - return 100; } private static unsafe void DoOverlappedIO() diff --git a/src/tests/tracing/runtimeeventsource/nativeruntimeeventsource.csproj b/src/tests/tracing/runtimeeventsource/nativeruntimeeventsource.csproj index aafdc6ee3207e..5f3635bd69e55 100644 --- a/src/tests/tracing/runtimeeventsource/nativeruntimeeventsource.csproj +++ b/src/tests/tracing/runtimeeventsource/nativeruntimeeventsource.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -10,6 +11,6 @@ - + diff --git a/src/tests/tracing/runtimeeventsource/runtimeeventsource.csproj b/src/tests/tracing/runtimeeventsource/runtimeeventsource.csproj index 1a5278c477f03..c458bbe0fe150 100644 --- a/src/tests/tracing/runtimeeventsource/runtimeeventsource.csproj +++ b/src/tests/tracing/runtimeeventsource/runtimeeventsource.csproj @@ -1,6 +1,7 @@ - Exe + + true true true @@ -11,7 +12,7 @@ - + diff --git a/src/tests/tracing/tracing.csproj b/src/tests/tracing/tracing.csproj new file mode 100644 index 0000000000000..f751282d127da --- /dev/null +++ b/src/tests/tracing/tracing.csproj @@ -0,0 +1,7 @@ + + + + + + +