From 1a49621bae8f5388a6f1aaa3ed9f8c944e67985f Mon Sep 17 00:00:00 2001 From: Hongtao Yu Date: Wed, 9 Dec 2015 15:27:40 -0800 Subject: [PATCH] Porting tests that have references jit\directed\perffix\primitivevt\callconv2_cs_d.csproj jit\directed\perffix\primitivevt\callconv2_cs_do.csproj jit\directed\perffix\primitivevt\callconv2_cs_r.csproj jit\directed\perffix\primitivevt\callconv2_cs_ro.csproj jit\methodical\cctor\xassem\xprecise1_cs_d.csproj jit\methodical\cctor\xassem\xprecise1_cs_do.csproj jit\methodical\cctor\xassem\xprecise1_cs_r.csproj jit\methodical\cctor\xassem\xprecise1_cs_ro.csproj jit\methodical\cctor\xassem\xprecise1b_cs_d.csproj jit\methodical\cctor\xassem\xprecise1b_cs_do.csproj jit\methodical\cctor\xassem\xprecise1b_cs_r.csproj jit\methodical\cctor\xassem\xprecise1b_cs_ro.csproj jit\methodical\cctor\xassem\xprecise2_cs_d.csproj jit\methodical\cctor\xassem\xprecise2_cs_do.csproj jit\methodical\cctor\xassem\xprecise2_cs_r.csproj jit\methodical\cctor\xassem\xprecise2_cs_ro.csproj jit\methodical\cctor\xassem\xprecise4_cs_d.csproj jit\methodical\cctor\xassem\xprecise4_cs_do.csproj jit\methodical\cctor\xassem\xprecise4_cs_r.csproj jit\methodical\cctor\xassem\xprecise4_cs_ro.csproj jit\regression\clr-x86-jit\v2.0-beta2\b423721\b423721.csproj Remove testing against Type.GetMethod(string) which is not in coreCLR. jit\jit64\eh\finallyexec\nestedTryRegionsWithSameOffset1.csproj jit\jit64\eh\finallyexec\nestedTryRegionsWithSameOffset1_o.csproj jit\jit64\eh\finallyexec\nestedTryRegionsWithSameOffset2.csproj jit\jit64\eh\finallyexec\nestedTryRegionsWithSameOffset2_o.csproj jit\jit64\eh\finallyexec\nestedTryRegionsWithSameOffset3.csproj jit\jit64\eh\finallyexec\nestedTryRegionsWithSameOffset3_o.csproj jit\jit64\eh\finallyexec\nonlocalgotoinatryblockinahandler.csproj jit\jit64\eh\leaves\nonlocalexitfromnestedcatch.csproj jit\methodical\boxing\xlang\_dbgsin_cs_cs.csproj jit\methodical\boxing\xlang\_odbgsin_cs_cs.csproj jit\methodical\boxing\xlang\_orelsin_cs_cs.csproj jit\methodical\boxing\xlang\_relsin_cs_cs.csproj jit\methodical\eh\basics\multihandler_d.csproj jit\methodical\eh\basics\multihandler_do.csproj jit\methodical\eh\basics\multihandler_r.csproj jit\methodical\eh\basics\multihandler_ro.csproj jit\methodical\eh\basics\throwincatch_d.csproj jit\methodical\eh\basics\throwincatch_do.csproj jit\methodical\eh\basics\throwincatch_r.csproj jit\methodical\eh\basics\throwincatch_ro.csproj jit\methodical\eh\basics\throwinclassconstructor_d.csproj jit\methodical\eh\basics\throwinclassconstructor_do.csproj jit\methodical\eh\basics\throwinclassconstructor_r.csproj jit\methodical\eh\basics\throwinclassconstructor_ro.csproj Porting jit\methodical\eh\basics Porting jit\methodical\eh\finallyexec Porting jit\methodical\eh\generics Porting jit\methodical\eh\interactions Porting jit\methodical\eh\leaves Porting jit\methodical\eh\rethrow Porting jit\methodical\eh\nested\general Porting jit\methodical\eh\nested\nonlocalexit Porting jit\methodical\eh\regress Porting more tests --- .../src/JIT/Directed/PREFIX/PrimitiveVT/app.config | 27 + .../JIT/Directed/PREFIX/PrimitiveVT/callconv1.cs | 115 ++ .../PREFIX/PrimitiveVT/callconv1_cs_d.csproj | 53 + .../PREFIX/PrimitiveVT/callconv1_cs_do.csproj | 53 + .../PREFIX/PrimitiveVT/callconv1_cs_r.csproj | 53 + .../PREFIX/PrimitiveVT/callconv1_cs_ro.csproj | 53 + .../JIT/Directed/PREFIX/PrimitiveVT/callconv2.cs | 117 ++ .../PREFIX/PrimitiveVT/callconv2_cs_d.csproj | 53 + .../PREFIX/PrimitiveVT/callconv2_cs_do.csproj | 53 + .../PREFIX/PrimitiveVT/callconv2_cs_r.csproj | 53 + .../PREFIX/PrimitiveVT/callconv2_cs_ro.csproj | 53 + .../src/JIT/Directed/PREFIX/PrimitiveVT/helper.cs | 55 + .../JIT/Directed/PREFIX/PrimitiveVT/helper.csproj | 49 + .../Methodical/Boxing/xlang/_dbgsin_cs_cs.csproj | 53 + .../Methodical/Boxing/xlang/_odbgsin_cs_cs.csproj | 53 + .../Methodical/Boxing/xlang/_orelsin_cs_cs.csproj | 53 + .../Methodical/Boxing/xlang/_relsin_cs_cs.csproj | 53 + tests/src/JIT/Methodical/Boxing/xlang/app.config | 27 + tests/src/JIT/Methodical/Boxing/xlang/sin.cs | 64 + tests/src/JIT/Methodical/Boxing/xlang/sinlib.cs | 35 + .../src/JIT/Methodical/Boxing/xlang/sinlib.csproj | 49 + tests/src/JIT/Methodical/cctor/xassem/app.config | 27 + tests/src/JIT/Methodical/cctor/xassem/testlib.cs | 44 + .../src/JIT/Methodical/cctor/xassem/testlib.csproj | 51 + tests/src/JIT/Methodical/cctor/xassem/xprecise1.cs | 38 + .../Methodical/cctor/xassem/xprecise1_cs_d.csproj | 52 + .../Methodical/cctor/xassem/xprecise1_cs_do.csproj | 52 + .../Methodical/cctor/xassem/xprecise1_cs_r.csproj | 52 + .../Methodical/cctor/xassem/xprecise1_cs_ro.csproj | 52 + .../src/JIT/Methodical/cctor/xassem/xprecise1b.cs | 44 + .../Methodical/cctor/xassem/xprecise1b_cs_d.csproj | 52 + .../cctor/xassem/xprecise1b_cs_do.csproj | 52 + .../Methodical/cctor/xassem/xprecise1b_cs_r.csproj | 52 + .../cctor/xassem/xprecise1b_cs_ro.csproj | 52 + tests/src/JIT/Methodical/cctor/xassem/xprecise2.cs | 45 + .../Methodical/cctor/xassem/xprecise2_cs_d.csproj | 52 + .../Methodical/cctor/xassem/xprecise2_cs_do.csproj | 52 + .../Methodical/cctor/xassem/xprecise2_cs_r.csproj | 52 + .../Methodical/cctor/xassem/xprecise2_cs_ro.csproj | 52 + tests/src/JIT/Methodical/cctor/xassem/xprecise4.cs | 44 + .../Methodical/cctor/xassem/xprecise4_cs_d.csproj | 52 + .../Methodical/cctor/xassem/xprecise4_cs_do.csproj | 52 + .../Methodical/cctor/xassem/xprecise4_cs_r.csproj | 52 + .../Methodical/cctor/xassem/xprecise4_cs_ro.csproj | 52 + tests/src/JIT/Methodical/eh/basics/app.config | 27 + tests/src/JIT/Methodical/eh/basics/multihandler.cs | 57 + .../JIT/Methodical/eh/basics/multihandler_d.csproj | 53 + .../Methodical/eh/basics/multihandler_do.csproj | 53 + .../JIT/Methodical/eh/basics/multihandler_r.csproj | 53 + .../Methodical/eh/basics/multihandler_ro.csproj | 53 + tests/src/JIT/Methodical/eh/basics/throwincatch.cs | 68 + .../JIT/Methodical/eh/basics/throwincatch_d.csproj | 53 + .../Methodical/eh/basics/throwincatch_do.csproj | 53 + .../JIT/Methodical/eh/basics/throwincatch_r.csproj | 53 + .../Methodical/eh/basics/throwincatch_ro.csproj | 53 + .../eh/basics/throwinclassconstructor.cs | 69 + .../eh/basics/throwinclassconstructor_d.csproj | 53 + .../eh/basics/throwinclassconstructor_do.csproj | 53 + .../eh/basics/throwinclassconstructor_r.csproj | 53 + .../eh/basics/throwinclassconstructor_ro.csproj | 53 + .../src/JIT/Methodical/eh/basics/throwinfinally.cs | 61 + .../Methodical/eh/basics/throwinfinally_d.csproj | 53 + .../Methodical/eh/basics/throwinfinally_do.csproj | 53 + .../Methodical/eh/basics/throwinfinally_r.csproj | 53 + .../Methodical/eh/basics/throwinfinally_ro.csproj | 53 + .../Methodical/eh/basics/throwinfinallyerrpath.cs | 78 + .../eh/basics/throwinfinallyerrpath_d.csproj | 53 + .../eh/basics/throwinfinallyerrpath_do.csproj | 53 + .../eh/basics/throwinfinallyerrpath_r.csproj | 53 + .../eh/basics/throwinfinallyerrpath_ro.csproj | 53 + .../eh/basics/throwinfinallyerrpathfn.cs | 61 + .../eh/basics/throwinfinallyerrpathfn_d.csproj | 53 + .../eh/basics/throwinfinallyerrpathfn_do.csproj | 53 + .../eh/basics/throwinfinallyerrpathfn_r.csproj | 53 + .../eh/basics/throwinfinallyerrpathfn_ro.csproj | 53 + tests/src/JIT/Methodical/eh/basics/throwoutside.cs | 52 + .../JIT/Methodical/eh/basics/throwoutside_d.csproj | 53 + .../Methodical/eh/basics/throwoutside_do.csproj | 53 + .../JIT/Methodical/eh/basics/throwoutside_r.csproj | 53 + .../Methodical/eh/basics/throwoutside_ro.csproj | 53 + tests/src/JIT/Methodical/eh/basics/trycatch.cs | 58 + .../src/JIT/Methodical/eh/basics/trycatch_d.csproj | 53 + .../JIT/Methodical/eh/basics/trycatch_do.csproj | 53 + .../src/JIT/Methodical/eh/basics/trycatch_r.csproj | 53 + .../JIT/Methodical/eh/basics/trycatch_ro.csproj | 53 + .../JIT/Methodical/eh/basics/trycatchtrycatch.cs | 70 + .../Methodical/eh/basics/trycatchtrycatch_d.csproj | 53 + .../eh/basics/trycatchtrycatch_do.csproj | 53 + .../Methodical/eh/basics/trycatchtrycatch_r.csproj | 53 + .../eh/basics/trycatchtrycatch_ro.csproj | 53 + tests/src/JIT/Methodical/eh/basics/tryfinally.cs | 58 + .../JIT/Methodical/eh/basics/tryfinally_d.csproj | 53 + .../JIT/Methodical/eh/basics/tryfinally_do.csproj | 53 + .../JIT/Methodical/eh/basics/tryfinally_r.csproj | 53 + .../JIT/Methodical/eh/basics/tryfinally_ro.csproj | 53 + .../JIT/Methodical/eh/basics/tryfinallytrycatch.cs | 77 + .../eh/basics/tryfinallytrycatch_d.csproj | 53 + .../eh/basics/tryfinallytrycatch_do.csproj | 53 + .../eh/basics/tryfinallytrycatch_r.csproj | 53 + .../eh/basics/tryfinallytrycatch_ro.csproj | 53 + .../Methodical/eh/basics/tryfinallytryfinally.cs | 55 + .../eh/basics/tryfinallytryfinally_d.csproj | 53 + .../eh/basics/tryfinallytryfinally_do.csproj | 53 + .../eh/basics/tryfinallytryfinally_r.csproj | 53 + .../eh/basics/tryfinallytryfinally_ro.csproj | 53 + .../src/JIT/Methodical/eh/basics/trythrowcatch.cs | 58 + .../Methodical/eh/basics/trythrowcatch_d.csproj | 53 + .../Methodical/eh/basics/trythrowcatch_do.csproj | 53 + .../Methodical/eh/basics/trythrowcatch_r.csproj | 53 + .../Methodical/eh/basics/trythrowcatch_ro.csproj | 53 + .../Methodical/eh/basics/trythrowcatchfinally.cs | 54 + .../eh/basics/trythrowcatchfinally_d.csproj | 53 + .../eh/basics/trythrowcatchfinally_do.csproj | 53 + .../eh/basics/trythrowcatchfinally_r.csproj | 53 + .../eh/basics/trythrowcatchfinally_ro.csproj | 53 + tests/src/JIT/Methodical/eh/common/app.config | 27 + tests/src/JIT/Methodical/eh/common/common.cs | 6 +- tests/src/JIT/Methodical/eh/common/common.csproj | 4 + tests/src/JIT/Methodical/eh/cs/app.config | 27 + tests/src/JIT/Methodical/eh/cs/unsafe.cs | 76 + tests/src/JIT/Methodical/eh/cs/unsafe_d.csproj | 53 + tests/src/JIT/Methodical/eh/cs/unsafe_do.csproj | 53 + tests/src/JIT/Methodical/eh/cs/unsafe_r.csproj | 53 + tests/src/JIT/Methodical/eh/cs/unsafe_ro.csproj | 53 + tests/src/JIT/Methodical/eh/finallyexec/app.config | 27 + .../eh/finallyexec/catchrettoinnertry.cs | 73 + .../eh/finallyexec/catchrettoinnertry_d.csproj | 53 + .../eh/finallyexec/catchrettoinnertry_do.csproj | 53 + .../eh/finallyexec/catchrettoinnertry_r.csproj | 53 + .../eh/finallyexec/catchrettoinnertry_ro.csproj | 53 + .../eh/finallyexec/localgotoinahandler.cs | 71 + .../eh/finallyexec/localgotoinahandler_d.csproj | 52 + .../eh/finallyexec/localgotoinahandler_do.csproj | 52 + .../eh/finallyexec/localgotoinahandler_r.csproj | 52 + .../eh/finallyexec/localgotoinahandler_ro.csproj | 52 + .../JIT/Methodical/eh/finallyexec/loopinfinally.cs | 67 + .../eh/finallyexec/loopinfinally_d.csproj | 52 + .../eh/finallyexec/loopinfinally_do.csproj | 52 + .../eh/finallyexec/loopinfinally_r.csproj | 52 + .../eh/finallyexec/loopinfinally_ro.csproj | 52 + .../eh/finallyexec/nonlocalexittobeginningoftry.cs | 69 + .../nonlocalexittobeginningoftry_d.csproj | 52 + .../nonlocalexittobeginningoftry_do.csproj | 52 + .../nonlocalexittobeginningoftry_r.csproj | 52 + .../nonlocalexittobeginningoftry_ro.csproj | 52 + .../nonlocalgotoinatryblockinahandler.cs | 65 + .../nonlocalgotoinatryblockinahandler_d.csproj | 52 + .../nonlocalgotoinatryblockinahandler_do.csproj | 52 + .../nonlocalgotoinatryblockinahandler_r.csproj | 52 + .../nonlocalgotoinatryblockinahandler_ro.csproj | 52 + .../eh/finallyexec/simplenonlocalexit.cs | 53 + .../eh/finallyexec/simplenonlocalexit_d.csproj | 52 + .../eh/finallyexec/simplenonlocalexit_do.csproj | 52 + .../eh/finallyexec/simplenonlocalexit_r.csproj | 52 + .../eh/finallyexec/simplenonlocalexit_ro.csproj | 52 + .../simplenonlocalexitnestedintrycatch.cs | 56 + .../simplenonlocalexitnestedintrycatch_d.csproj | 52 + .../simplenonlocalexitnestedintrycatch_do.csproj | 52 + .../simplenonlocalexitnestedintrycatch_r.csproj | 52 + .../simplenonlocalexitnestedintrycatch_ro.csproj | 52 + .../JIT/Methodical/eh/finallyexec/switchincatch.cs | 99 ++ .../eh/finallyexec/switchincatch_d.csproj | 52 + .../eh/finallyexec/switchincatch_do.csproj | 52 + .../eh/finallyexec/switchincatch_r.csproj | 52 + .../eh/finallyexec/switchincatch_ro.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit1.cs | 67 + .../tryCatchFinallyThrow_nonlocalexit1_d.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit1_do.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit1_r.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit1_ro.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit2.cs | 96 ++ .../tryCatchFinallyThrow_nonlocalexit2_d.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit2_do.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit2_r.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit2_ro.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit3.cs | 112 ++ .../tryCatchFinallyThrow_nonlocalexit3_d.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit3_do.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit3_r.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit3_ro.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit4.cs | 84 + .../tryCatchFinallyThrow_nonlocalexit4_d.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit4_do.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit4_r.csproj | 52 + .../tryCatchFinallyThrow_nonlocalexit4_ro.csproj | 52 + .../eh/finallyexec/tryfinallythrow_nonlocalexit.cs | 78 + .../tryfinallythrow_nonlocalexit_d.csproj | 52 + .../tryfinallythrow_nonlocalexit_do.csproj | 52 + .../tryfinallythrow_nonlocalexit_r.csproj | 52 + .../tryfinallythrow_nonlocalexit_ro.csproj | 52 + tests/src/JIT/Methodical/eh/generics/app.config | 27 + .../src/JIT/Methodical/eh/generics/throwincatch.cs | 105 ++ .../Methodical/eh/generics/throwincatch_d.csproj | 52 + .../Methodical/eh/generics/throwincatch_do.csproj | 52 + .../Methodical/eh/generics/throwincatch_r.csproj | 52 + .../Methodical/eh/generics/throwincatch_ro.csproj | 52 + .../Methodical/eh/generics/trycatchnestedtype.cs | 99 ++ .../eh/generics/trycatchnestedtype_d.csproj | 52 + .../eh/generics/trycatchnestedtype_do.csproj | 52 + .../eh/generics/trycatchnestedtype_r.csproj | 52 + .../eh/generics/trycatchnestedtype_ro.csproj | 52 + .../Methodical/eh/generics/trycatchsimpletype.cs | 89 ++ .../eh/generics/trycatchsimpletype_d.csproj | 52 + .../eh/generics/trycatchsimpletype_do.csproj | 52 + .../eh/generics/trycatchsimpletype_r.csproj | 52 + .../eh/generics/trycatchsimpletype_ro.csproj | 52 + .../JIT/Methodical/eh/interactions/gcincatch.cs | 95 ++ .../Methodical/eh/interactions/gcincatch_d.csproj | 52 + .../Methodical/eh/interactions/gcincatch_do.csproj | 52 + .../Methodical/eh/interactions/gcincatch_r.csproj | 52 + .../Methodical/eh/interactions/gcincatch_ro.csproj | 52 + .../eh/interactions/rangecheckinfinally.cs | 49 + .../eh/interactions/rangecheckinfinally_d.csproj | 52 + .../eh/interactions/rangecheckinfinally_do.csproj | 52 + .../eh/interactions/rangecheckinfinally_r.csproj | 52 + .../eh/interactions/rangecheckinfinally_ro.csproj | 52 + .../Methodical/eh/interactions/switchinfinally.cs | 102 ++ .../eh/interactions/switchinfinally_d.csproj | 52 + .../eh/interactions/switchinfinally_do.csproj | 52 + .../eh/interactions/switchinfinally_r.csproj | 52 + .../eh/interactions/switchinfinally_ro.csproj | 52 + tests/src/JIT/Methodical/eh/leaves/app.config | 27 + .../eh/leaves/catchretnonlocalexitinfunclet.cs | 65 + .../leaves/catchretnonlocalexitinfunclet_d.csproj | 52 + .../leaves/catchretnonlocalexitinfunclet_do.csproj | 52 + .../leaves/catchretnonlocalexitinfunclet_r.csproj | 52 + .../leaves/catchretnonlocalexitinfunclet_ro.csproj | 52 + .../eh/leaves/nonlocalexitfromnestedcatch.cs | 75 + .../eh/leaves/nonlocalexitfromnestedcatch_d.csproj | 52 + .../leaves/nonlocalexitfromnestedcatch_do.csproj | 52 + .../eh/leaves/nonlocalexitfromnestedcatch_r.csproj | 52 + .../leaves/nonlocalexitfromnestedcatch_ro.csproj | 52 + tests/src/JIT/Methodical/eh/leaves/oponerror.cs | 77 + .../JIT/Methodical/eh/leaves/oponerror_d.csproj | 52 + .../JIT/Methodical/eh/leaves/oponerror_do.csproj | 52 + .../JIT/Methodical/eh/leaves/oponerror_r.csproj | 52 + .../JIT/Methodical/eh/leaves/oponerror_ro.csproj | 52 + .../src/JIT/Methodical/eh/leaves/tryfinallyloop.cs | 72 + .../Methodical/eh/leaves/tryfinallyloop_d.csproj | 52 + .../Methodical/eh/leaves/tryfinallyloop_do.csproj | 52 + .../Methodical/eh/leaves/tryfinallyloop_r.csproj | 52 + .../Methodical/eh/leaves/tryfinallyloop_ro.csproj | 52 + .../JIT/Methodical/eh/nested/general/app.config | 27 + .../Methodical/eh/nested/general/cascadedcatch.cs | 157 ++ .../eh/nested/general/cascadedcatch_d.csproj | 52 + .../eh/nested/general/cascadedcatch_do.csproj | 52 + .../eh/nested/general/cascadedcatch_r.csproj | 52 + .../eh/nested/general/cascadedcatch_ro.csproj | 52 + .../eh/nested/general/methodthrowsinfinally.cs | 84 + .../nested/general/methodthrowsinfinally_d.csproj | 52 + .../nested/general/methodthrowsinfinally_do.csproj | 52 + .../nested/general/methodthrowsinfinally_r.csproj | 52 + .../nested/general/methodthrowsinfinally_ro.csproj | 52 + .../general/rethrowincatchnestedinfinally.cs | 87 + .../general/rethrowincatchnestedinfinally_d.csproj | 52 + .../rethrowincatchnestedinfinally_do.csproj | 52 + .../general/rethrowincatchnestedinfinally_r.csproj | 52 + .../rethrowincatchnestedinfinally_ro.csproj | 52 + .../Methodical/eh/nested/general/throwinfinally.cs | 70 + .../eh/nested/general/throwinfinally_d.csproj | 52 + .../eh/nested/general/throwinfinally_do.csproj | 52 + .../eh/nested/general/throwinfinally_r.csproj | 52 + .../eh/nested/general/throwinfinally_ro.csproj | 52 + .../eh/nested/general/throwinfinallynestedintry.cs | 80 + .../general/throwinfinallynestedintry_d.csproj | 52 + .../general/throwinfinallynestedintry_do.csproj | 52 + .../general/throwinfinallynestedintry_r.csproj | 52 + .../general/throwinfinallynestedintry_ro.csproj | 52 + .../eh/nested/general/throwinnestedfinally.cs | 80 + .../nested/general/throwinnestedfinally_d.csproj | 52 + .../nested/general/throwinnestedfinally_do.csproj | 52 + .../nested/general/throwinnestedfinally_r.csproj | 52 + .../nested/general/throwinnestedfinally_ro.csproj | 52 + .../eh/nested/general/trycatchintryfinally.cs | 63 + .../nested/general/trycatchintryfinally_d.csproj | 52 + .../nested/general/trycatchintryfinally_do.csproj | 52 + .../nested/general/trycatchintryfinally_r.csproj | 52 + .../nested/general/trycatchintryfinally_ro.csproj | 52 + .../Methodical/eh/nested/nonlocalexit/app.config | 27 + .../eh/nested/nonlocalexit/throwinfinally_50.cs | 853 ++++++++++ .../nested/nonlocalexit/throwinfinally_50_d.csproj | 52 + .../nonlocalexit/throwinfinally_50_do.csproj | 52 + .../nested/nonlocalexit/throwinfinally_50_r.csproj | 52 + .../nonlocalexit/throwinfinally_50_ro.csproj | 52 + .../nonlocalexit/throwinfinallynestedintry_30.cs | 1425 +++++++++++++++++ .../throwinfinallynestedintry_30_d.csproj | 52 + .../throwinfinallynestedintry_30_do.csproj | 52 + .../throwinfinallynestedintry_30_r.csproj | 52 + .../throwinfinallynestedintry_30_ro.csproj | 52 + .../nonlocalexit/throwinfinallyrecursive_20.cs | 1655 ++++++++++++++++++++ .../throwinfinallyrecursive_20_d.csproj | 52 + .../throwinfinallyrecursive_20_do.csproj | 52 + .../throwinfinallyrecursive_20_r.csproj | 52 + .../throwinfinallyrecursive_20_ro.csproj | 52 + .../Methodical/eh/regress/asurt/122239/app.config | 27 + .../eh/regress/asurt/122239/outermostFinally.cs | 69 + .../regress/asurt/122239/outermostFinally.csproj | 51 + .../Methodical/eh/regress/asurt/140713/app.config | 27 + .../eh/regress/asurt/140713/innerFinally.cs | 73 + .../eh/regress/asurt/140713/innerFinally_d.csproj | 52 + .../eh/regress/asurt/140713/innerFinally_do.csproj | 52 + .../eh/regress/asurt/140713/innerFinally_r.csproj | 52 + .../eh/regress/asurt/140713/innerFinally_ro.csproj | 52 + .../Methodical/eh/regress/asurt/141358/app.config | 27 + .../eh/regress/asurt/141358/uncaughtException.cs | 79 + .../asurt/141358/uncaughtException_d.csproj | 52 + .../asurt/141358/uncaughtException_do.csproj | 52 + .../asurt/141358/uncaughtException_r.csproj | 52 + .../asurt/141358/uncaughtException_ro.csproj | 52 + .../eh/regress/vswhidbey/148190/app.config | 27 + .../eh/regress/vswhidbey/148190/baduwinfo.cs | 136 ++ .../eh/regress/vswhidbey/148190/baduwinfo.csproj | 51 + .../eh/regress/vswhidbey/148190/baduwinfo1.cs | 136 ++ .../eh/regress/vswhidbey/148190/baduwinfo1.csproj | 51 + tests/src/JIT/Methodical/eh/rethrow/app.config | 27 + tests/src/JIT/Methodical/eh/rethrow/project.json | 12 + .../JIT/Methodical/eh/rethrow/project.lock.json | 1241 +++++++++++++++ .../eh/rethrow/rethrowinfinallyaftercatch.cs | 83 + .../eh/rethrow/rethrowinfinallyaftercatch_d.csproj | 52 + .../rethrow/rethrowinfinallyaftercatch_do.csproj | 52 + .../eh/rethrow/rethrowinfinallyaftercatch_r.csproj | 52 + .../rethrow/rethrowinfinallyaftercatch_ro.csproj | 52 + .../eh/rethrow/rethrowwithhandlerscatchingbase.cs | 80 + .../rethrowwithhandlerscatchingbase_d.csproj | 52 + .../rethrowwithhandlerscatchingbase_do.csproj | 52 + .../rethrowwithhandlerscatchingbase_r.csproj | 52 + .../rethrowwithhandlerscatchingbase_ro.csproj | 52 + .../JIT/Methodical/eh/rethrow/samerethrowtwice.cs | 101 ++ .../eh/rethrow/samerethrowtwice_d.csproj | 52 + .../eh/rethrow/samerethrowtwice_do.csproj | 52 + .../eh/rethrow/samerethrowtwice_r.csproj | 52 + .../eh/rethrow/samerethrowtwice_ro.csproj | 52 + .../JIT/Methodical/eh/rethrow/samethrowtwice.cs | 100 ++ .../Methodical/eh/rethrow/samethrowtwice_d.csproj | 52 + .../Methodical/eh/rethrow/samethrowtwice_do.csproj | 52 + .../Methodical/eh/rethrow/samethrowtwice_r.csproj | 52 + .../Methodical/eh/rethrow/samethrowtwice_ro.csproj | 52 + .../src/JIT/Methodical/eh/rethrow/simplerethrow.cs | 60 + .../Methodical/eh/rethrow/simplerethrow_d.csproj | 52 + .../Methodical/eh/rethrow/simplerethrow_do.csproj | 52 + .../Methodical/eh/rethrow/simplerethrow_r.csproj | 52 + .../Methodical/eh/rethrow/simplerethrow_ro.csproj | 52 + .../eh/rethrow/throwwithhandlerscatchingbase.cs | 79 + .../rethrow/throwwithhandlerscatchingbase_d.csproj | 52 + .../throwwithhandlerscatchingbase_do.csproj | 52 + .../rethrow/throwwithhandlerscatchingbase_r.csproj | 52 + .../throwwithhandlerscatchingbase_ro.csproj | 52 + .../flowgraph/bug619534/moduleHandleCache.cs | 52 + .../flowgraph/bug619534/moduleHandleCache.csproj | 52 + .../flowgraph/bug619534/moduleLibrary.cs | 16 + .../flowgraph/bug619534/moduleLibrary.csproj | 49 + .../Methodical/stringintern/test1-xassem.csproj | 53 + tests/src/JIT/Methodical/stringintern/test1.cs | 215 +++ .../Methodical/stringintern/test2-xassem.csproj | 53 + tests/src/JIT/Methodical/stringintern/test2.cs | 256 +++ .../Methodical/stringintern/test4-xassem.csproj | 53 + tests/src/JIT/Methodical/stringintern/test4.cs | 520 ++++++ .../src/JIT/Methodical/stringintern/testgenstr.cs | 19 + .../JIT/Methodical/stringintern/testgenstr.csproj | 49 + tests/src/JIT/Methodical/stringintern/teststr.cs | 18 + .../src/JIT/Methodical/stringintern/teststr.csproj | 49 + .../CLR-x86-JIT/V2.0-Beta2/b423721/app.config | 27 + .../CLR-x86-JIT/V2.0-Beta2/b423721/b423721.cs | 49 + .../CLR-x86-JIT/V2.0-Beta2/b423721/b423721.csproj | 52 + .../CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs | 27 + .../CLR-x86-JIT/V2.0-Beta2/b423721/c1.csproj | 51 + .../Dev11/External/Dev11_243742/app.config | 27 + .../Regression/Dev11/External/Dev11_243742/app.cs | 67 + .../Dev11/External/Dev11_243742/app.csproj | 53 + .../Regression/Dev11/External/Dev11_243742/dll.cs | 44 + .../Dev11/External/Dev11_243742/dll.csproj | 49 + tests/src/JIT/jit64/eh/Common/app.config | 27 + tests/src/JIT/jit64/eh/Common/common.cs | 279 ++++ tests/src/JIT/jit64/eh/Common/common.csproj | 51 + tests/src/JIT/jit64/eh/FinallyExec/app.config | 27 + .../FinallyExec/nestedTryRegionsWithSameOffset1.cs | 70 + .../nestedTryRegionsWithSameOffset1.csproj | 53 + .../nestedTryRegionsWithSameOffset1_o.csproj | 53 + .../FinallyExec/nestedTryRegionsWithSameOffset2.cs | 69 + .../nestedTryRegionsWithSameOffset2.csproj | 53 + .../nestedTryRegionsWithSameOffset2_o.csproj | 53 + .../FinallyExec/nestedTryRegionsWithSameOffset3.cs | 92 ++ .../nestedTryRegionsWithSameOffset3.csproj | 53 + .../nestedTryRegionsWithSameOffset3_o.csproj | 53 + .../nonlocalgotoinatryblockinahandler.cs | 65 + .../nonlocalgotoinatryblockinahandler.csproj | 52 + tests/src/JIT/jit64/eh/Leaves/app.config | 27 + .../jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs | 73 + .../eh/Leaves/nonlocalexitfromnestedcatch.csproj | 52 + .../JIT/jit64/gc/regress/vswhidbey/143837.csproj | 2 +- .../opt/virtualstubdispatch/manyintf/app.config | 27 + .../JIT/opt/virtualstubdispatch/manyintf/ctest.cs | 99 ++ .../virtualstubdispatch/manyintf/ctest_cs_d.csproj | 61 + .../manyintf/ctest_cs_do.csproj | 61 + .../virtualstubdispatch/manyintf/ctest_cs_r.csproj | 61 + .../manyintf/ctest_cs_ro.csproj | 61 + .../JIT/opt/virtualstubdispatch/manyintf/itest1.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest1.csproj | 49 + .../opt/virtualstubdispatch/manyintf/itest10.cs | 13 + .../virtualstubdispatch/manyintf/itest10.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest2.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest2.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest3.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest3.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest4.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest4.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest5.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest5.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest6.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest6.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest7.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest7.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest8.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest8.csproj | 49 + .../JIT/opt/virtualstubdispatch/manyintf/itest9.cs | 13 + .../opt/virtualstubdispatch/manyintf/itest9.csproj | 49 + 416 files changed, 28189 insertions(+), 3 deletions(-) create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/app.config create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1.cs create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_d.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_do.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_r.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_ro.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2.cs create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_d.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_do.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_r.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_ro.csproj create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.cs create mode 100644 tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.csproj create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/_dbgsin_cs_cs.csproj create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/_odbgsin_cs_cs.csproj create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/_orelsin_cs_cs.csproj create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/_relsin_cs_cs.csproj create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/app.config create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/sin.cs create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/sinlib.cs create mode 100644 tests/src/JIT/Methodical/Boxing/xlang/sinlib.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/app.config create mode 100644 tests/src/JIT/Methodical/cctor/xassem/testlib.cs create mode 100644 tests/src/JIT/Methodical/cctor/xassem/testlib.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1.cs create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_d.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_do.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_r.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_ro.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1b.cs create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_d.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_do.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_r.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_ro.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise2.cs create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_d.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_do.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_r.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_ro.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise4.cs create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_d.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_do.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_r.csproj create mode 100644 tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/app.config create mode 100644 tests/src/JIT/Methodical/eh/basics/multihandler.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/multihandler_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/multihandler_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/multihandler_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/multihandler_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwincatch.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/throwincatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwincatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwincatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwincatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinclassconstructor.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwoutside.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/throwoutside_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwoutside_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwoutside_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/throwoutside_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatch.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatchtrycatch.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatch.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/common/app.config create mode 100644 tests/src/JIT/Methodical/eh/cs/app.config create mode 100644 tests/src/JIT/Methodical/eh/cs/unsafe.cs create mode 100644 tests/src/JIT/Methodical/eh/cs/unsafe_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/cs/unsafe_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/cs/unsafe_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/cs/unsafe_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/app.config create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/loopinfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/switchincatch.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/switchincatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/switchincatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/switchincatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/switchincatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit.cs create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/app.config create mode 100644 tests/src/JIT/Methodical/eh/generics/throwincatch.cs create mode 100644 tests/src/JIT/Methodical/eh/generics/throwincatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/throwincatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/throwincatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/throwincatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchnestedtype.cs create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchsimpletype.cs create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/gcincatch.cs create mode 100644 tests/src/JIT/Methodical/eh/interactions/gcincatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/gcincatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/gcincatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/gcincatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/switchinfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/interactions/switchinfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/switchinfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/switchinfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/interactions/switchinfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/app.config create mode 100644 tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet.cs create mode 100644 tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch.cs create mode 100644 tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/oponerror.cs create mode 100644 tests/src/JIT/Methodical/eh/leaves/oponerror_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/oponerror_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/oponerror_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/oponerror_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/tryfinallyloop.cs create mode 100644 tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/app.config create mode 100644 tests/src/JIT/Methodical/eh/nested/general/cascadedcatch.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/app.config create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20.cs create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/122239/app.config create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.cs create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/140713/app.config create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally.cs create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/141358/app.config create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException.cs create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/app.config create mode 100644 tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.cs create mode 100644 tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.csproj create mode 100644 tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.cs create mode 100644 tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/app.config create mode 100644 tests/src/JIT/Methodical/eh/rethrow/project.json create mode 100644 tests/src/JIT/Methodical/eh/rethrow/project.lock.json create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch.cs create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase.cs create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice.cs create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samethrowtwice.cs create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/simplerethrow.cs create mode 100644 tests/src/JIT/Methodical/eh/rethrow/simplerethrow_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/simplerethrow_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/simplerethrow_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/simplerethrow_ro.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase.cs create mode 100644 tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_d.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_do.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_r.csproj create mode 100644 tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_ro.csproj create mode 100644 tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.cs create mode 100644 tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.csproj create mode 100644 tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.cs create mode 100644 tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.csproj create mode 100644 tests/src/JIT/Methodical/stringintern/test1-xassem.csproj create mode 100644 tests/src/JIT/Methodical/stringintern/test1.cs create mode 100644 tests/src/JIT/Methodical/stringintern/test2-xassem.csproj create mode 100644 tests/src/JIT/Methodical/stringintern/test2.cs create mode 100644 tests/src/JIT/Methodical/stringintern/test4-xassem.csproj create mode 100644 tests/src/JIT/Methodical/stringintern/test4.cs create mode 100644 tests/src/JIT/Methodical/stringintern/testgenstr.cs create mode 100644 tests/src/JIT/Methodical/stringintern/testgenstr.csproj create mode 100644 tests/src/JIT/Methodical/stringintern/teststr.cs create mode 100644 tests/src/JIT/Methodical/stringintern/teststr.csproj create mode 100644 tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/app.config create mode 100644 tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.cs create mode 100644 tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.csproj create mode 100644 tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs create mode 100644 tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.csproj create mode 100644 tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.config create mode 100644 tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.cs create mode 100644 tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.csproj create mode 100644 tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.cs create mode 100644 tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.csproj create mode 100644 tests/src/JIT/jit64/eh/Common/app.config create mode 100644 tests/src/JIT/jit64/eh/Common/common.cs create mode 100644 tests/src/JIT/jit64/eh/Common/common.csproj create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/app.config create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.cs create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.csproj create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1_o.csproj create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.cs create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.csproj create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2_o.csproj create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.cs create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.csproj create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3_o.csproj create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.cs create mode 100644 tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.csproj create mode 100644 tests/src/JIT/jit64/eh/Leaves/app.config create mode 100644 tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs create mode 100644 tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/app.config create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_d.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_do.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_r.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_ro.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.csproj create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.cs create mode 100644 tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.csproj diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/app.config b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1.cs b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1.cs new file mode 100644 index 0000000..079de0d --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +namespace PrimitiveVT +{ + + unsafe class CallConv1 + { + static Random rand = new Random(); + VT1A vt1a; + static VT1A x; + + static int f1(VT1B x, VT1B y) { return x.m + y.m; } + VT1B f2a(VT1A x, VT1B y) { VT1B z; z.m = x.m + y.m; return z; } + VT1B f2b(VT1A x, VT1B y) { return f2a(x, y); } + VT1B f2(VT1A x, VT1B y) { return f2b(x, y); } + static int f3(ref VT1B x, VT1B y) { return x.m - y.m; } + VT1B f4(VT1A x, VT1B y) { VT1B z; z.m = x.m - y.m; return z; } + static int f5(VT1B x, VT1A y) { return x.m * y.m; } + int f6(VT1B[] x, VT1B y) { return x[0].m * y.m; } + VT1B f7(VT1A x, VT1B y) { return f4(x, y); } + float f8(VT1A x, VT1B y) { return x.m / y.m; } + + static VT1B[,] f9a() { return new VT1B[1, 2]; } + static VT1B[,] f9() { return f9a(); } + int f10(params VT1B[] args) { int sum = 0; for (int i = 0; i < args.Length; sum += args[i], i++) { }; return sum; } + + + static int Main() + { + int a = rand.Next(); + + CallConv1 t = new CallConv1(); + t.vt1a.m = a; + + VT1B vt1b = (VT1B)t.vt1a; + + int b = vt1b; + if (b != a) + { + Console.WriteLine("FAILED, b!=a"); + return 1; + } + + int c = (int)(VT1B)(VT1A)(VT1B)(int)(VT1B)t.vt1a; + if (c != b) + { + Console.WriteLine("FAILED, c!=b"); + return 1; + } + + int d = rand.Next(); + int e = Int32.MinValue; + int f = Int32.MaxValue / 2; + x = new VT1A(); + VT1B[] yarr = new VT1B[2]; + yarr[0] = new VT1B(e); + VT1B y = yarr[0]; + x.m = d; + VT1B u = x * y - (new VT1B(f)) + yarr[0] + (VT1B)x + (VT1B)f + y * x + (int)(x / (d % 2 == 0 ? (VT1B)(d / 2) : (VT1B)(d + 1 / 2))); + int w = f5((VT1B)x, (VT1A)y) + t.f6(yarr, (VT1B)x) + f1(y, d) + (int)t.f8((VT1A)(VT1B)d, (d % 2 == 0 ? (VT1B)(d / 2) : (VT1B)(d + 1 / 2))); + if (u != w) + { + Console.WriteLine("FAILED, u!=w"); + Console.WriteLine(u); + Console.WriteLine(w); + return 1; + } + + for (VT1B z = 3; z <= 10; z++, t.f2((VT1A)y, 1)) { } + + if (f3(ref y, Int32.MinValue) != 0) + { + Console.WriteLine("FAILED, f3(y,Int32.MinValue)!=0"); + Console.WriteLine(f3(ref y, Int32.MinValue)); + return 1; + } + + VT1B* o = stackalloc VT1B[3]; + o[0] = 1; + o[1] = 2; + o[2] = 3; + + if ((t.f7((VT1A)o[2], o[0])) != 2) + { + Console.WriteLine("FAILED (t.f7((VT1A)o[2], o[0]))!=2"); + Console.WriteLine(t.f7((VT1A)o[2], o[0])); + return 1; + } + + VT1B[][,] arr = new VT1B[2][,]; + arr[1] = f9(); + arr[1][0, 0] = (VT1B)(*o); + + if ((t.f10(arr[1][0, 0])) != 1) + { + Console.WriteLine("FAILED (t.f10(arr[1][0,0]))!=1"); + Console.WriteLine(t.f10(arr[1][0, 0])); + return 1; + } + + if ((t.f10(arr[1][0, 0], t.f7((VT1A)(new VT1B(2)), (VT1B)o[0]), 4)) != 6) + { + Console.WriteLine("FAILED (t.f10(arr[1][0,0], t.f7((VT1A)(new VT1B(2)), (VT1B)o[0]), 4))!=6"); + Console.WriteLine(t.f10(arr[1][0, 0], t.f7((VT1A)(new VT1B(2)), (VT1B)o[0]), 4)); + return 1; + } + + Console.WriteLine("PASSED"); + return 100; + } + } +} + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_d.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_d.csproj new file mode 100644 index 0000000..9f68145 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_do.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_do.csproj new file mode 100644 index 0000000..8133416 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_r.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_r.csproj new file mode 100644 index 0000000..bf3ffd7 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_ro.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_ro.csproj new file mode 100644 index 0000000..c622fe5 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv1_cs_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2.cs b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2.cs new file mode 100644 index 0000000..6b463d7 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +namespace PrimitiveVT +{ + + unsafe class CallConv2 + { + static Random rand = new Random(); + VT2A vt1a; + static VT2A x; + + static uint f1(VT2B x, VT2B y) { return x.m + y.m; } + VT2B f2a(VT2A x, VT2B y) { VT2B z; z.m = x.m + y.m; return z; } + VT2B f2b(VT2A x, VT2B y) { return f2a(x, y); } + VT2B f2(VT2A x, VT2B y) { return f2b(x, y); } + static uint f3(ref VT2B x, VT2B y) { return x.m - y.m; } + VT2B f4(VT2A x, VT2B y) { VT2B z; z.m = x.m - y.m; return z; } + static uint f5(VT2B x, VT2A y) { return x.m * y.m; } + uint f6(VT2B[] x, VT2B y) { return x[0].m * y.m; } + VT2B f7(VT2A x, VT2B y) { return f4(x, y); } + float f8(VT2A x, VT2B y) { return x.m / y.m; } + + static VT2B[,] f9a() { return new VT2B[1, 2]; } + static VT2B[,] f9() { return f9a(); } + uint f10(params VT2B[] args) { uint sum = 0; for (uint i = 0; i < args.Length; sum += args[i], i++) { }; return sum; } + + + static int Main() + { + uint a = (uint)rand.Next(); + + CallConv2 t = new CallConv2(); + t.vt1a.m = a; + + VT2B vt1b = (VT2B)t.vt1a; + + uint b = vt1b; + if (b != a) + { + Console.WriteLine("FAILED, b!=a"); + return 1; + } + + uint c = (uint)(VT2B)(VT2A)(VT2B)(uint)(VT2B)t.vt1a; + if (c != b) + { + Console.WriteLine("FAILED, c!=b"); + return 1; + } + + uint d = (uint)rand.Next(); + uint e = UInt32.MinValue + 2; + uint f = UInt32.MaxValue / 2; + x = new VT2A(); + VT2B[] yarr = new VT2B[2]; + yarr[0] = new VT2B(e); + VT2B y = yarr[0]; + x.m = d; + VT2B u = x * y - (new VT2B(f)) + yarr[0] + (VT2B)x + (VT2B)f + y * x + (uint)(x / (d % 2 == 0 ? (VT2B)(d / 2) : (VT2B)(d + 1 / 2))); + uint w = f5((VT2B)x, (VT2A)y) + t.f6(yarr, (VT2B)x) + f1(y, d) + (uint)t.f8((VT2A)(VT2B)d, (d % 2 == 0 ? (VT2B)(d / 2) : (VT2B)(d + 1 / 2))); + if (u != w) + { + Console.WriteLine("FAILED, u!=w"); + Console.WriteLine(u); + Console.WriteLine(w); + return 1; + } + + for (VT2B z = 3; z <= 10; z++, t.f2((VT2A)y, 1)) { } + + if (f3(ref y, UInt32.MinValue) != 2) + { + Console.WriteLine("FAILED, f3(y,UInt32.MinValue)!=2"); + Console.WriteLine(f3(ref y, UInt32.MinValue)); + return 1; + } + + VT2B* o = stackalloc VT2B[3]; + o[0] = 1; + o[1] = 2; + o[2] = 3; + + if ((t.f7((VT2A)o[2], o[0])) != 2) + { + Console.WriteLine("FAILED (t.f7((VT2A)o[2], o[0]))!=2"); + Console.WriteLine(t.f7((VT2A)o[2], o[0])); + return 1; + } + + VT2B[][,] arr = new VT2B[2][,]; + arr[1] = f9(); + arr[1][0, 0] = (VT2B)(*o); + + if ((t.f10(arr[1][0, 0])) != 1) + { + Console.WriteLine("FAILED (t.f10(arr[1][0,0]))!=1"); + Console.WriteLine(t.f10(arr[1][0, 0])); + return 1; + } + + if ((t.f10(arr[1][0, 0], t.f7((VT2A)(new VT2B(2)), (VT2B)o[0]), 4)) != 6) + { + Console.WriteLine("FAILED (t.f10(arr[1][0,0], t.f7((VT2A)(new VT2B(2)), (VT2B)o[0]), 4))!=6"); + Console.WriteLine(t.f10(arr[1][0, 0], t.f7((VT2A)(new VT2B(2)), (VT2B)o[0]), 4)); + return 1; + } + + Console.WriteLine("PASSED"); + return 100; + } + + } + +} + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_d.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_d.csproj new file mode 100644 index 0000000..4a1a7d2 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_do.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_do.csproj new file mode 100644 index 0000000..b8d18c6 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_r.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_r.csproj new file mode 100644 index 0000000..ca2c90f --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_ro.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_ro.csproj new file mode 100644 index 0000000..f360d9b --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/callconv2_cs_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.cs b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.cs new file mode 100644 index 0000000..e5a642d --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace PrimitiveVT +{ + + public struct VT1A + { + public int m; + } + + public struct VT1B + { + public int m; + public VT1B(int x) { m = x; } + public static implicit operator int (VT1B x) { return x.m; } + public static implicit operator VT1B(int x) { VT1B y; y.m = x; return y; } + public static explicit operator VT1A(VT1B x) { VT1A y; y.m = x.m; return y; } + public static explicit operator VT1B(VT1A x) { VT1B y; y.m = x.m; return y; } + public static int operator +(VT1B x, VT1B y) { return x.m + y.m; } + public static VT1B operator +(VT1A x, VT1B y) { VT1B z; z.m = x.m + y.m; return z; } + public static int operator -(VT1B x, VT1B y) { return x.m - y.m; } + public static VT1B operator -(VT1A x, VT1B y) { VT1B z; z.m = x.m - y.m; return z; } + public static int operator *(VT1B x, VT1A y) { return x.m * y.m; } + public static int operator *(VT1B x, VT1B y) { return x.m * y.m; } + public static VT1B operator *(VT1A x, VT1B y) { VT1B z; z.m = x.m * y.m; return z; } + public static float operator /(VT1A x, VT1B y) { return x.m / y.m; } + public static VT1B operator ++(VT1B x) { return ++x.m; } + } + + public struct VT2A + { + public uint m; + } + + public struct VT2B + { + public uint m; + public VT2B(uint x) { m = x; } + public static implicit operator uint (VT2B x) { return x.m; } + public static implicit operator VT2B(uint x) { VT2B y; y.m = x; return y; } + public static explicit operator VT2A(VT2B x) { VT2A y; y.m = x.m; return y; } + public static explicit operator VT2B(VT2A x) { VT2B y; y.m = x.m; return y; } + public static uint operator +(VT2B x, VT2B y) { return x.m + y.m; } + public static VT2B operator +(VT2A x, VT2B y) { VT2B z; z.m = x.m + y.m; return z; } + public static uint operator -(VT2B x, VT2B y) { return x.m - y.m; } + public static VT2B operator -(VT2A x, VT2B y) { VT2B z; z.m = x.m - y.m; return z; } + public static uint operator *(VT2B x, VT2A y) { return x.m * y.m; } + public static uint operator *(VT2B x, VT2B y) { return x.m * y.m; } + public static VT2B operator *(VT2A x, VT2B y) { VT2B z; z.m = x.m * y.m; return z; } + public static float operator /(VT2A x, VT2B y) { return x.m / y.m; } + public static VT2B operator --(VT2B x) { return --x.m; } + public static VT2B operator ++(VT2B x) { return x.m + 1; } + } +} diff --git a/tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.csproj b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.csproj new file mode 100644 index 0000000..c281875 --- /dev/null +++ b/tests/src/JIT/Directed/PREFIX/PrimitiveVT/helper.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/Methodical/Boxing/xlang/_dbgsin_cs_cs.csproj b/tests/src/JIT/Methodical/Boxing/xlang/_dbgsin_cs_cs.csproj new file mode 100644 index 0000000..931d345 --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/_dbgsin_cs_cs.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/Boxing/xlang/_odbgsin_cs_cs.csproj b/tests/src/JIT/Methodical/Boxing/xlang/_odbgsin_cs_cs.csproj new file mode 100644 index 0000000..1e81a89 --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/_odbgsin_cs_cs.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/Boxing/xlang/_orelsin_cs_cs.csproj b/tests/src/JIT/Methodical/Boxing/xlang/_orelsin_cs_cs.csproj new file mode 100644 index 0000000..f1c8e1c --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/_orelsin_cs_cs.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/Boxing/xlang/_relsin_cs_cs.csproj b/tests/src/JIT/Methodical/Boxing/xlang/_relsin_cs_cs.csproj new file mode 100644 index 0000000..8a1152d --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/_relsin_cs_cs.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/Boxing/xlang/app.config b/tests/src/JIT/Methodical/Boxing/xlang/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/Boxing/xlang/sin.cs b/tests/src/JIT/Methodical/Boxing/xlang/sin.cs new file mode 100644 index 0000000..526cbf9 --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/sin.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace SinCalc +{ + using System; + using SinCalcLib; + + class SinCalc + { + static int Main() + { + object i; + object Angle; + object Result1, Result2; + object[] testresults = new object[10]; + testresults[0] = 0.000000000d; + testresults[1] = 0.309016994d; + testresults[2] = 0.587785252d; + testresults[3] = 0.809016994d; + testresults[4] = 0.951056516d; + testresults[5] = 1.000000000d; + testresults[6] = 0.951056516d; + testresults[7] = 0.809016994d; + testresults[8] = 0.587785252d; + testresults[9] = 0.309016994d; + + object mistake = 1e-9d; + for (i = 0; (int)i < 10; i = (int)i + 1) + { + Angle = ((PiVal)SinCalcLib.PI).Value * ((int)i / 10.0); + Console.Write("Classlib Sin("); + Console.Write(Angle); + Console.Write(")="); + Console.WriteLine(Result1 = Math.Sin((double)Angle)); + Console.Write("This Version("); + Console.Write(Angle); + Console.Write(")="); + Console.WriteLine(Result2 = (double)SinCalcLib.mySin(Angle)); + Console.Write("Error is:"); + Console.WriteLine((double)Result1 - (double)Result2); + Console.WriteLine(); + if (Math.Abs((double)Result1 - (double)Result2) > (double)mistake) // reasonable considering double + { + Console.WriteLine("ERROR, Versions too far apart!"); + return 1; + } + if (Math.Abs((double)testresults[(int)i] - (double)Result1) > (double)mistake) // reasonable considering double + { + Console.WriteLine("ERROR, Classlib version isnt right!"); + return 1; + } + if (Math.Abs((double)testresults[(int)i] - (double)Result2) > (double)mistake) // reasonable considering double + { + Console.WriteLine("ERROR, our version isnt right!"); + return 1; + } + + } + Console.WriteLine("Yippie, all correct"); + return 100; + } + } +} diff --git a/tests/src/JIT/Methodical/Boxing/xlang/sinlib.cs b/tests/src/JIT/Methodical/Boxing/xlang/sinlib.cs new file mode 100644 index 0000000..42c1191 --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/sinlib.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace SinCalcLib +{ + using System; + + public struct PiVal + { + public double Value; + public PiVal(double v) { Value = v; } + } + + public class SinCalcLib + { + public static object PI = new PiVal(3.1415926535897932384626433832795d); + + public static object mySin(object Angle) + { + object powX, sumOfTerms, term, fact = 1.0; + + powX = term = Angle; + sumOfTerms = 0.0; + + for (object i = 1; (int)i <= 200; i = (int)i + 2) + { + sumOfTerms = (double)sumOfTerms + (double)term; + powX = (double)powX * (-(double)Angle * (double)Angle); + fact = (double)fact * ((int)i + 1) * ((int)i + 2); + term = (double)powX / (double)fact; + } + return sumOfTerms; + } + } +} diff --git a/tests/src/JIT/Methodical/Boxing/xlang/sinlib.csproj b/tests/src/JIT/Methodical/Boxing/xlang/sinlib.csproj new file mode 100644 index 0000000..4c211ab --- /dev/null +++ b/tests/src/JIT/Methodical/Boxing/xlang/sinlib.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/app.config b/tests/src/JIT/Methodical/cctor/xassem/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/cctor/xassem/testlib.cs b/tests/src/JIT/Methodical/cctor/xassem/testlib.cs new file mode 100644 index 0000000..fedee5c --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/testlib.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +namespace Precise +{ + public class measure + { + public static int a = 0xCC; + } + public class test + { + public static byte b1 = 0xC; + public byte b2 = 0xC; + public static void f() + { + } + public static void f(ref byte b) + { + return; + } + + static test() + { + if (measure.a != 0xCC) + { + Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + throw new Exception(); + } + Console.WriteLine("in .cctor(), measure.a is {0}", measure.a); + measure.a = 8; + if (measure.a != 8) + { + Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + throw new Exception(); + } + Console.WriteLine("in .cctor() after measure.a=8, measure.a is {0}", measure.a); + } + } + +} + diff --git a/tests/src/JIT/Methodical/cctor/xassem/testlib.csproj b/tests/src/JIT/Methodical/cctor/xassem/testlib.csproj new file mode 100644 index 0000000..d215081 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/testlib.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1.cs b/tests/src/JIT/Methodical/cctor/xassem/xprecise1.cs new file mode 100644 index 0000000..d7f4fbf --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1.cs @@ -0,0 +1,38 @@ +// static method +using System; +namespace Precise { +class Driver +{ + public static int Main() + { + try { + byte b = 0xF; + Console.WriteLine("Testing .cctor() invocation by calling static method across assembly"); + Console.WriteLine(); + Console.WriteLine("Before calling static method"); + // .cctor should not run yet + if (measure.a!=0xCC) { + Console.WriteLine("in Main(), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return 1; + } + // the next line should trigger .cctor + test.f(ref b); + Console.WriteLine("After calling static method"); + if (measure.a!=8) { + Console.WriteLine("in Main() after f(ref b), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return -1; + } + } + catch (Exception e) + { + Console.WriteLine(e.StackTrace); + return -1; + } + Console.WriteLine(); + Console.WriteLine("PASSED"); + return 100; + } +} +} \ No newline at end of file diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_d.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_d.csproj new file mode 100644 index 0000000..dcbd4ce --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_do.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_do.csproj new file mode 100644 index 0000000..4641949 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_r.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_r.csproj new file mode 100644 index 0000000..3dde82a --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_ro.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_ro.csproj new file mode 100644 index 0000000..56eccf9 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1_cs_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1b.cs b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b.cs new file mode 100644 index 0000000..79fad59 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// static method +using System; +namespace Precise +{ + class Driver + { + public static int Main() + { + try + { + Console.WriteLine("Testing .cctor() invocation by calling static method across assembly"); + Console.WriteLine(); + Console.WriteLine("Before calling static method"); + // .cctor should not run yet + if (measure.a != 0xCC) + { + Console.WriteLine("in Main(), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return 1; + } + // the next line should trigger .cctor + test.f(); + Console.WriteLine("After calling static method"); + if (measure.a != 8) + { + Console.WriteLine("in Main() after f(ref b), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return -1; + } + } + catch (Exception e) + { + Console.WriteLine(e.StackTrace); + return -1; + } + Console.WriteLine(); + Console.WriteLine("PASSED"); + return 100; + } + } +} \ No newline at end of file diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_d.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_d.csproj new file mode 100644 index 0000000..fce71db --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_do.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_do.csproj new file mode 100644 index 0000000..1f5549a --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_r.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_r.csproj new file mode 100644 index 0000000..5237bcf --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_ro.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_ro.csproj new file mode 100644 index 0000000..d54cfc5 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise1b_cs_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise2.cs b/tests/src/JIT/Methodical/cctor/xassem/xprecise2.cs new file mode 100644 index 0000000..af8f78c --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise2.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// instance method +using System; +namespace Precise +{ + class Driver + { + public static int Main() + { + try + { + Console.WriteLine("Testing .cctor() invocation by calling instance method across assembly"); + Console.WriteLine(); + Console.WriteLine("Before calling instance method"); + // .cctor should not run yet + if (measure.a != 0xCC) + { + Console.WriteLine("in Main(), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return 1; + } + // the next line should trigger .cctor because .ctor is an instance method + test t = new test(); + Console.WriteLine("After calling instance method"); + if (measure.a != 8) + { + Console.WriteLine("in Main() after new test(), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return -1; + } + } + catch (Exception e) + { + Console.WriteLine(e.StackTrace); + return -1; + } + Console.WriteLine(); + Console.WriteLine("PASSED"); + return 100; + } + } + +} diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_d.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_d.csproj new file mode 100644 index 0000000..a7afb15 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_do.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_do.csproj new file mode 100644 index 0000000..cacc570 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_r.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_r.csproj new file mode 100644 index 0000000..37f5478 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_ro.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_ro.csproj new file mode 100644 index 0000000..5ca7341 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise2_cs_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise4.cs b/tests/src/JIT/Methodical/cctor/xassem/xprecise4.cs new file mode 100644 index 0000000..2f92218 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise4.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// static field +using System; +namespace Precise +{ + class Driver + { + public static int Main() + { + try + { + Console.WriteLine("Testing .cctor() invocation by accessing static field across assembly"); + Console.WriteLine(); + Console.WriteLine("Before calling static field"); + // .cctor should not run yet + if (measure.a != 0xCC) + { + Console.WriteLine("in Main(), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return 1; + } + // the next line should trigger .cctor + test.b1 = 0xF; + Console.WriteLine("After calling static field"); + if (measure.a != 8) + { + Console.WriteLine("in Main(), measure.a is {0}", measure.a); + Console.WriteLine("FAILED"); + return -1; + } + } + catch (Exception e) + { + Console.WriteLine(e.StackTrace); + return -1; + } + Console.WriteLine(); + Console.WriteLine("PASSED"); + return 100; + } + } +} diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_d.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_d.csproj new file mode 100644 index 0000000..d334675 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_do.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_do.csproj new file mode 100644 index 0000000..0863b7b --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_r.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_r.csproj new file mode 100644 index 0000000..7b8b224 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_ro.csproj b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_ro.csproj new file mode 100644 index 0000000..360da68 --- /dev/null +++ b/tests/src/JIT/Methodical/cctor/xassem/xprecise4_cs_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/app.config b/tests/src/JIT/Methodical/eh/basics/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/basics/multihandler.cs b/tests/src/JIT/Methodical/eh/basics/multihandler.cs new file mode 100644 index 0000000..2d35c88 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/multihandler.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Typed catches, multiple handler + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("Caught Arithmetic Exception"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine("In try"); + throw new ArithmeticException(); + // Console.WriteLine("Unreachable"); + } + catch (DivideByZeroException) + { + Console.WriteLine("Caught DivideByZeroException"); + } + catch (ArithmeticException) + { + Console.WriteLine("Caught Arithmetic Exception"); + } + catch (Exception) + { + Console.WriteLine("Caught Exception"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/multihandler_d.csproj b/tests/src/JIT/Methodical/eh/basics/multihandler_d.csproj new file mode 100644 index 0000000..0ccd9b3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/multihandler_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/multihandler_do.csproj b/tests/src/JIT/Methodical/eh/basics/multihandler_do.csproj new file mode 100644 index 0000000..c20e21f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/multihandler_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/multihandler_r.csproj b/tests/src/JIT/Methodical/eh/basics/multihandler_r.csproj new file mode 100644 index 0000000..54a59bd --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/multihandler_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/multihandler_ro.csproj b/tests/src/JIT/Methodical/eh/basics/multihandler_ro.csproj new file mode 100644 index 0000000..0465557 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/multihandler_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwincatch.cs b/tests/src/JIT/Methodical/eh/basics/throwincatch.cs new file mode 100644 index 0000000..f59e400 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwincatch.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw in catch handler + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("In try 2, 1st throw"); + expectedOut.WriteLine("In 1st catch, 2nd throw"); + expectedOut.WriteLine("In 2nd catch"); + expectedOut.WriteLine("Done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + try + { + Console.WriteLine("In try"); + try + { + Console.WriteLine("In try 2, 1st throw"); + throw new Exception(); + } + catch + { + Console.WriteLine("In 1st catch, 2nd throw"); + throw new Exception(); + } + } + catch + { + Console.WriteLine("In 2nd catch"); + } + } + catch + { + Console.WriteLine("Unreached"); + } + Console.WriteLine("Done"); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/throwincatch_d.csproj b/tests/src/JIT/Methodical/eh/basics/throwincatch_d.csproj new file mode 100644 index 0000000..05fb696 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwincatch_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwincatch_do.csproj b/tests/src/JIT/Methodical/eh/basics/throwincatch_do.csproj new file mode 100644 index 0000000..304c2c9 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwincatch_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwincatch_r.csproj b/tests/src/JIT/Methodical/eh/basics/throwincatch_r.csproj new file mode 100644 index 0000000..2e9c089 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwincatch_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwincatch_ro.csproj b/tests/src/JIT/Methodical/eh/basics/throwincatch_ro.csproj new file mode 100644 index 0000000..054803c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwincatch_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor.cs b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor.cs new file mode 100644 index 0000000..d501528 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throwing an exception in a class (static) constructor. +// NDPWhidbey 10958 + +using System; + +public class Foo +{ + public static int x; + + static Foo() + { + int y = 0; + x = 5 / y; + } +} + +public class Test +{ + private static TestUtil.TestLog testLog; + + static Test() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine(" try"); + expectedOut.WriteLine("\t try"); + expectedOut.WriteLine("\t finally"); + expectedOut.WriteLine(" catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static int Main() + { + //Start recording + testLog.StartRecording(); + + int i = 0; + try + { + System.Console.WriteLine(" try"); + try + { + System.Console.WriteLine("\t try"); + i = Foo.x; + } + finally + { + System.Console.WriteLine("\t finally"); + i = Foo.x; + } + } + catch (System.Exception) + { + System.Console.WriteLine(" catch"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_d.csproj b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_d.csproj new file mode 100644 index 0000000..a3d2d82 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_do.csproj b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_do.csproj new file mode 100644 index 0000000..a831201 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_r.csproj b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_r.csproj new file mode 100644 index 0000000..da2e3f1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_ro.csproj b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_ro.csproj new file mode 100644 index 0000000..69314d6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinclassconstructor_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinally.cs b/tests/src/JIT/Methodical/eh/basics/throwinfinally.cs new file mode 100644 index 0000000..378c649 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinally.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw from a finally block + +using System; + +public class a +{ + private static TestUtil.TestLog testLog; + + static a() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("Main: In Try"); + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("In finally"); + expectedOut.WriteLine("Main: Caught the exception"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void MiddleMethod() + { + try + { + Console.WriteLine("In try"); + } + finally + { + Console.WriteLine("In finally"); + throw new System.ArgumentException(); + // Console.WriteLine("Unreached..."); + } + } + + public static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine("Main: In Try"); + MiddleMethod(); + } + catch + { + Console.WriteLine("Main: Caught the exception"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinally_d.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinally_d.csproj new file mode 100644 index 0000000..cfb36d2 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinally_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinally_do.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinally_do.csproj new file mode 100644 index 0000000..2d26c2d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinally_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinally_r.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinally_r.csproj new file mode 100644 index 0000000..c715cfd --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinally_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinally_ro.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinally_ro.csproj new file mode 100644 index 0000000..e73121d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinally_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath.cs b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath.cs new file mode 100644 index 0000000..f076a79 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Try/finally error case, one function +using System; + +namespace hello +{ + + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in Try catch"); + expectedOut.WriteLine("in Try finally"); + expectedOut.WriteLine("in Finally"); + expectedOut.WriteLine("Caught exception"); + expectedOut.WriteLine("in Catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void inTry1() + { + Console.WriteLine("in Try catch"); + } + static public void inTry2() + { + Console.WriteLine("in Try finally"); + } + + static public void inCatch() + { + Console.WriteLine("in Catch"); + } + static public void inFinally() + { + Console.WriteLine("in Finally"); + } + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + inTry1(); + try + { + inTry2(); + throw new Exception(); + } + finally + { + inFinally(); + throw new Exception(); + } + } + catch (Exception) + { + Console.WriteLine("Caught exception"); + inCatch(); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_d.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_d.csproj new file mode 100644 index 0000000..af9cd89 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_do.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_do.csproj new file mode 100644 index 0000000..a7f012c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_r.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_r.csproj new file mode 100644 index 0000000..d0f60ee --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_ro.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_ro.csproj new file mode 100644 index 0000000..4c72cce --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpath_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn.cs b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn.cs new file mode 100644 index 0000000..9a646cc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw from a finally, error case + +using System; + +public class a +{ + private static TestUtil.TestLog testLog; + + static a() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try, throwing"); + expectedOut.WriteLine("In finally, throwing"); + expectedOut.WriteLine("Pass"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void MiddleMethod() + { + try + { + Console.WriteLine("In try, throwing"); + throw new Exception(); + Console.WriteLine("Unreached"); + } + finally + { + Console.WriteLine("In finally, throwing"); + throw new Exception(); + } + Console.WriteLine("Unreached..."); + } + + public static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + MiddleMethod(); + } + catch + { + Console.WriteLine("Pass"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_d.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_d.csproj new file mode 100644 index 0000000..1969f8f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_do.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_do.csproj new file mode 100644 index 0000000..5656821 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_r.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_r.csproj new file mode 100644 index 0000000..5f14945 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_ro.csproj b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_ro.csproj new file mode 100644 index 0000000..732450a --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwinfinallyerrpathfn_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwoutside.cs b/tests/src/JIT/Methodical/eh/basics/throwoutside.cs new file mode 100644 index 0000000..ca905a6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwoutside.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw from outside of an EH region + +using System; + +public class a +{ + private static TestUtil.TestLog testLog; + + static a() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In middle method, throwing"); + expectedOut.WriteLine("Caught"); + expectedOut.WriteLine("Pass"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void MiddleMethod() + { + Console.WriteLine("In middle method, throwing"); + throw new Exception(); + } + + public static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + MiddleMethod(); + } + catch + { + Console.WriteLine("Caught"); + } + Console.WriteLine("Pass"); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/throwoutside_d.csproj b/tests/src/JIT/Methodical/eh/basics/throwoutside_d.csproj new file mode 100644 index 0000000..6064555 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwoutside_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwoutside_do.csproj b/tests/src/JIT/Methodical/eh/basics/throwoutside_do.csproj new file mode 100644 index 0000000..8b49ba6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwoutside_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwoutside_r.csproj b/tests/src/JIT/Methodical/eh/basics/throwoutside_r.csproj new file mode 100644 index 0000000..a5c3b5d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwoutside_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/throwoutside_ro.csproj b/tests/src/JIT/Methodical/eh/basics/throwoutside_ro.csproj new file mode 100644 index 0000000..7622aa5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/throwoutside_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatch.cs b/tests/src/JIT/Methodical/eh/basics/trycatch.cs new file mode 100644 index 0000000..68f6fa4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatch.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Try catch, non error case, the code in catch should not be executed +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void inTry() + { + Console.WriteLine("In try"); + } + + static public void inCatch() + { + Console.WriteLine("In catch"); + } + + static public void inFinally() { } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + inTry(); + } + catch (Exception e) + { + inCatch(); + Console.WriteLine(e); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/trycatch_d.csproj b/tests/src/JIT/Methodical/eh/basics/trycatch_d.csproj new file mode 100644 index 0000000..704bb6c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatch_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatch_do.csproj b/tests/src/JIT/Methodical/eh/basics/trycatch_do.csproj new file mode 100644 index 0000000..1676a40 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatch_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatch_r.csproj b/tests/src/JIT/Methodical/eh/basics/trycatch_r.csproj new file mode 100644 index 0000000..2577d3d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatch_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatch_ro.csproj b/tests/src/JIT/Methodical/eh/basics/trycatch_ro.csproj new file mode 100644 index 0000000..0abeebc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatch_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch.cs b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch.cs new file mode 100644 index 0000000..5c444c3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("In try"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void inTry() + { + Console.WriteLine("In try"); + } + + static public void inCatch() + { + Console.WriteLine("In catch"); + } + + static public void inFinally() + { + Console.WriteLine("In finally"); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + inTry(); + } + catch (Exception e) + { + Console.WriteLine(e); + inCatch(); + } + try + { + inTry(); + } + catch (Exception e) + { + Console.WriteLine(e); + inCatch(); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_d.csproj b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_d.csproj new file mode 100644 index 0000000..b2f7841 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_do.csproj b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_do.csproj new file mode 100644 index 0000000..078a455 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_r.csproj b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_r.csproj new file mode 100644 index 0000000..b8a4a0a --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_ro.csproj b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_ro.csproj new file mode 100644 index 0000000..79b78ca --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trycatchtrycatch_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinally.cs b/tests/src/JIT/Methodical/eh/basics/tryfinally.cs new file mode 100644 index 0000000..c28d3d6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinally.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Try finally, non error case +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in Try"); + expectedOut.WriteLine("in Finally"); + expectedOut.WriteLine("done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void inTry() + { + Console.WriteLine("in Try"); + } + + static public void inFinally() + { + Console.WriteLine("in Finally"); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + inTry(); + } + finally + { + inFinally(); + } + Console.WriteLine("done"); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinally_d.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinally_d.csproj new file mode 100644 index 0000000..8dca73a --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinally_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinally_do.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinally_do.csproj new file mode 100644 index 0000000..61063e1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinally_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinally_r.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinally_r.csproj new file mode 100644 index 0000000..f29bbbe --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinally_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinally_ro.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinally_ro.csproj new file mode 100644 index 0000000..9619e25 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinally_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch.cs b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch.cs new file mode 100644 index 0000000..681f031 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Try/finally error case +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in Try catch"); + expectedOut.WriteLine("in Try finally"); + expectedOut.WriteLine("in Finally"); + expectedOut.WriteLine("Caught an exception"); + expectedOut.WriteLine("in Catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void inTry1() + { + Console.WriteLine("in Try catch"); + } + static public void inTry2() + { + Console.WriteLine("in Try finally"); + } + + static public void inCatch() + { + Console.WriteLine("in Catch"); + } + static public void inFinally() + { + Console.WriteLine("in Finally"); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + inTry1(); + try + { + inTry2(); + throw new Exception(); + } + finally + { + inFinally(); + } + } + catch (Exception) + { + Console.WriteLine("Caught an exception"); + inCatch(); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_d.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_d.csproj new file mode 100644 index 0000000..87ae035 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_do.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_do.csproj new file mode 100644 index 0000000..236a702 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_r.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_r.csproj new file mode 100644 index 0000000..3bf6f8f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_ro.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_ro.csproj new file mode 100644 index 0000000..c8023c9 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytrycatch_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally.cs b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally.cs new file mode 100644 index 0000000..fcca304 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("In finally"); + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("In finally"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine("In try"); + } + finally + { + Console.WriteLine("In finally"); + } + try + { + Console.WriteLine("In try"); + } + finally + { + Console.WriteLine("In finally"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_d.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_d.csproj new file mode 100644 index 0000000..724d6d1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_do.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_do.csproj new file mode 100644 index 0000000..94076d6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_r.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_r.csproj new file mode 100644 index 0000000..3e4278b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_ro.csproj b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_ro.csproj new file mode 100644 index 0000000..7a38379 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/tryfinallytryfinally_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatch.cs b/tests/src/JIT/Methodical/eh/basics/trythrowcatch.cs new file mode 100644 index 0000000..3829b27 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatch.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Try catch error case +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("In catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void inTry() + { + Console.WriteLine("In try"); + throw new Exception(); + } + + static public void inCatch() + { + Console.WriteLine("In catch"); + } + static public void inFinally() { } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + inTry(); + } + catch (Exception) + { + inCatch(); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatch_d.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_d.csproj new file mode 100644 index 0000000..3c5c050 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatch_do.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_do.csproj new file mode 100644 index 0000000..ff4080b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatch_r.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_r.csproj new file mode 100644 index 0000000..6538e6d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatch_ro.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_ro.csproj new file mode 100644 index 0000000..6d077f5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatch_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally.cs b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally.cs new file mode 100644 index 0000000..4cb5f03 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// try { throw } catch {} finally {} +using System; + +class test +{ + private static TestUtil.TestLog testLog; + + static test() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try1"); + expectedOut.WriteLine("In catch1"); + expectedOut.WriteLine("In finally1"); + expectedOut.WriteLine("Done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static int Main() + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine("In try1"); + + throw new Exception(); + } + catch (Exception) + { + Console.WriteLine("In catch1"); + + } + finally + { + Console.WriteLine("In finally1"); + } + + Console.WriteLine("Done"); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_d.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_d.csproj new file mode 100644 index 0000000..faa884e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_do.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_do.csproj new file mode 100644 index 0000000..d23d383 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_r.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_r.csproj new file mode 100644 index 0000000..2bed114 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_ro.csproj b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_ro.csproj new file mode 100644 index 0000000..6cd21fc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/basics/trythrowcatchfinally_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/common/app.config b/tests/src/JIT/Methodical/eh/common/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/common/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/common/common.cs b/tests/src/JIT/Methodical/eh/common/common.cs index dce2d0c..34a0de7 100644 --- a/tests/src/JIT/Methodical/eh/common/common.cs +++ b/tests/src/JIT/Methodical/eh/common/common.cs @@ -180,7 +180,8 @@ namespace TestUtil expectedLine = expectedLine.Substring(nextIgnore); actualLine = similar ? actualLine.Substring(at + expectedToken.Length) : actualLine; } - else { + else + { similar = (ignoreMode && actualLine.EndsWith(expectedLine)) || actualLine.Equals(expectedLine); expectedLine = String.Empty; actualLine = String.Empty; @@ -222,7 +223,8 @@ namespace TestUtil // this.stdOut.WriteLine("PASSED"); retCode = SUCC_RET_CODE; } - else { + else + { this.stdOut.WriteLine(); this.stdOut.WriteLine("FAILED!"); this.stdOut.WriteLine(); diff --git a/tests/src/JIT/Methodical/eh/common/common.csproj b/tests/src/JIT/Methodical/eh/common/common.csproj index 95ffb82..d70454c 100644 --- a/tests/src/JIT/Methodical/eh/common/common.csproj +++ b/tests/src/JIT/Methodical/eh/common/common.csproj @@ -17,6 +17,9 @@ 7a9bfb7d BuildOnly false + 7a9bfb7d + BuildOnly + false @@ -36,6 +39,7 @@ + diff --git a/tests/src/JIT/Methodical/eh/cs/app.config b/tests/src/JIT/Methodical/eh/cs/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/cs/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/cs/unsafe.cs b/tests/src/JIT/Methodical/eh/cs/unsafe.cs new file mode 100644 index 0000000..636ecfc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/cs/unsafe.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// unsafe memory access in a funclet + +using System; + +class Test +{ + + private static TestUtil.TestLog testLog; + + static Test() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("arr[1] at 0x1 is 2"); + expectedOut.WriteLine("arr[2] at 0x2 is 3"); + expectedOut.WriteLine("arr[3] at 0x3 is 4"); + expectedOut.WriteLine("arr[4] at 0x4 is 5"); + expectedOut.WriteLine("After try"); + expectedOut.WriteLine("Done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + unsafe static void WriteLocations(byte[] arr) + { + fixed (byte* p_arr = arr) + { + try + { + throw new Exception(); + } + catch + { + byte* p_elem = p_arr; + byte* p_prev = p_arr; + p_elem++; + for (int i = 1; i < arr.Length; i++) + { + byte value = *p_elem; + Console.WriteLine("arr[{0}] at 0x{1:X} is {2}", i, (uint)(p_elem - p_prev), value); + p_elem++; + } + } + } + } + + static int Main(String[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + byte[] arr = new byte[] { 1, 2, 3, 4, 5 }; + WriteLocations(arr); + } + catch + { + Console.WriteLine("In catch, Unreached\n"); + goto done; + } + Console.WriteLine("After try"); + done: + Console.WriteLine("Done"); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/cs/unsafe_d.csproj b/tests/src/JIT/Methodical/eh/cs/unsafe_d.csproj new file mode 100644 index 0000000..b9b0a8d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/cs/unsafe_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/cs/unsafe_do.csproj b/tests/src/JIT/Methodical/eh/cs/unsafe_do.csproj new file mode 100644 index 0000000..5fe3919 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/cs/unsafe_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/cs/unsafe_r.csproj b/tests/src/JIT/Methodical/eh/cs/unsafe_r.csproj new file mode 100644 index 0000000..fd17724 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/cs/unsafe_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/cs/unsafe_ro.csproj b/tests/src/JIT/Methodical/eh/cs/unsafe_ro.csproj new file mode 100644 index 0000000..2aafd8a --- /dev/null +++ b/tests/src/JIT/Methodical/eh/cs/unsafe_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/app.config b/tests/src/JIT/Methodical/eh/finallyexec/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry.cs b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry.cs new file mode 100644 index 0000000..cba6ca1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// catch ret to the beginning of the inner try +// we will need to use the il after the C# compiler is fixed + +using System; + +namespace strswitch +{ + + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("Caught an exception"); + expectedOut.WriteLine("In outer finally"); + expectedOut.WriteLine("bye"); + expectedOut.WriteLine("In outer finally"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + int i = 3; + + beginloop: + try + { + try + { + if (i == 3) + { + throw new IndexOutOfRangeException(); + } + else if (i == 4) + { + Console.WriteLine("bye"); + } + } + catch (Exception e) + { + Console.WriteLine("Caught an exception"); + i++; + goto beginloop; + } + } + finally + { + Console.WriteLine("In outer finally"); + } + + continueloop: + + finish: + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } // main + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_d.csproj new file mode 100644 index 0000000..0401a46 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_d.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_do.csproj new file mode 100644 index 0000000..1310e0f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_do.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_r.csproj new file mode 100644 index 0000000..3464f6c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_r.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_ro.csproj new file mode 100644 index 0000000..6d5beaa --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/catchrettoinnertry_ro.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler.cs b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler.cs new file mode 100644 index 0000000..d1dd4b6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// local goto in a handler should not cause us to add the goto into the nonlocal handler map +// 112209 +using System; + +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In main try..."); + expectedOut.WriteLine("In main finally..."); + expectedOut.WriteLine("In inner try 1..."); + expectedOut.WriteLine("In inner try 2..."); + expectedOut.WriteLine("Back in inner try 1..."); + expectedOut.WriteLine("Now in inner finally..."); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + public static int Main() + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine("In main try..."); + } + finally + { + Console.WriteLine("In main finally..."); + + try + { + Console.WriteLine("In inner try 1..."); + + try + { + Console.WriteLine("In inner try 2..."); + + goto LABEL; + } + catch + { + Console.WriteLine("Will never see this catch..."); + } + + Console.WriteLine("Will never see this code, jumping over it!"); + + LABEL: + Console.WriteLine("Back in inner try 1..."); + + } + finally + { + Console.WriteLine("Now in inner finally..."); + } + } + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_d.csproj new file mode 100644 index 0000000..a96af3d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_do.csproj new file mode 100644 index 0000000..0ed5a80 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_r.csproj new file mode 100644 index 0000000..b2fdf25 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_ro.csproj new file mode 100644 index 0000000..4d7435c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/localgotoinahandler_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally.cs b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally.cs new file mode 100644 index 0000000..be974ff --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("Caught an exception"); + expectedOut.WriteLine("In finally, i = 3"); + expectedOut.WriteLine("In finally, i = 4"); + expectedOut.WriteLine("In finally, i = 5"); + expectedOut.WriteLine("In finally, i = 6"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + int i = 3; + bool visited = false; + + before_try: + try + { + if (i == 3) + { + throw new IndexOutOfRangeException(); + } + } + catch (Exception) + { + //to prevent infinite loops + if (visited) { Console.WriteLine("Error, finally never called..."); goto early_exit; } + + Console.WriteLine("Caught an exception"); + + visited = true; + goto before_try; + } + finally + { + inside_finally: + Console.WriteLine("In finally, i = {0}", i); + i++; + if (i % 2 == 0) goto inside_finally; + } + + early_exit: + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_d.csproj new file mode 100644 index 0000000..d6931bc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_do.csproj new file mode 100644 index 0000000..901b3ae --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_r.csproj new file mode 100644 index 0000000..3779707 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_ro.csproj new file mode 100644 index 0000000..eda9284 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/loopinfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry.cs b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry.cs new file mode 100644 index 0000000..468aa38 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// try/finally embedded in a try catch with a nonlocal exit to the beginning of try block +// to make sure that we don't execute the finally unnecessarily +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in try1"); + expectedOut.WriteLine("in finally 2"); + expectedOut.WriteLine("in try1"); + expectedOut.WriteLine("in finally 1"); + expectedOut.WriteLine("done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + int i = 0; + try + { + begintry1: + Console.WriteLine("in try1"); + if (i > 0) goto done; + try + { + if (args.Length == 0) + { + i++; + goto begintry1; + } + } + finally + { + Console.WriteLine("in finally 2"); + } + } + finally + { + Console.WriteLine("in finally 1"); + } + Console.WriteLine("after finally"); + Console.WriteLine("unreached"); + done: + Console.WriteLine("done"); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + + } +} + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_d.csproj new file mode 100644 index 0000000..d5b086a --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_do.csproj new file mode 100644 index 0000000..ab187ec --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_r.csproj new file mode 100644 index 0000000..a52adf5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_ro.csproj new file mode 100644 index 0000000..ff21902 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalexittobeginningoftry_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler.cs b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler.cs new file mode 100644 index 0000000..8aac8c9 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +//112256 +// [karimf] If we happen to have a try that is in nested CATCHs, and the try has a nonLocalGoto +// [only legal if it gos all the way back to the root!], then we replace the nonlocal +// LEAVE with an OPGOTO to the beginning of the cascading CATCHRET chain to unwind the stack... + +using System; + +class simple +{ + private static TestUtil.TestLog testLog; + + static simple() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("Begin test..."); + expectedOut.WriteLine("In main try"); + expectedOut.WriteLine("In main catch"); + expectedOut.WriteLine("In inner try"); + expectedOut.WriteLine("End test..."); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + public static int Main() + { + //Start recording + testLog.StartRecording(); + Console.WriteLine("Begin test..."); + try + { + Console.WriteLine("In main try"); + + throw new Exception(); + } + catch + { + Console.WriteLine("In main catch"); + + try + { + Console.WriteLine("In inner try"); + goto L; + } + catch + { + Console.WriteLine("In inner catch"); + } + } + + Console.WriteLine("DEAD CODE!"); + + L: + + Console.WriteLine("End test..."); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_d.csproj new file mode 100644 index 0000000..0e1f962 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_do.csproj new file mode 100644 index 0000000..a5f6dd3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_r.csproj new file mode 100644 index 0000000..4a9a6a3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_ro.csproj new file mode 100644 index 0000000..45539fb --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/nonlocalgotoinatryblockinahandler_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit.cs b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit.cs new file mode 100644 index 0000000..c5c9595 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// try/finally embedded in a try catch with a nonlocal exit +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in finally"); + expectedOut.WriteLine("done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + if (args.Length == 0) goto done; + Console.WriteLine("in try"); + } + finally + { + Console.WriteLine("in finally"); + } + Console.WriteLine("after finally"); + Console.WriteLine("unreached"); + done: + Console.WriteLine("done"); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + + } +} + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_d.csproj new file mode 100644 index 0000000..e643904 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_do.csproj new file mode 100644 index 0000000..98b302e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_r.csproj new file mode 100644 index 0000000..2dd1181 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_ro.csproj new file mode 100644 index 0000000..6aae30d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexit_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch.cs b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch.cs new file mode 100644 index 0000000..22665b8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// try/finally embedded in a try catch with a nonlocal exit +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in finally"); + expectedOut.WriteLine("done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + try + { + try + { + if (args.Length == 0) goto done; + Console.WriteLine("in try"); + } + finally + { + Console.WriteLine("in finally"); + } + Console.WriteLine("after finally"); + } + catch + { + Console.WriteLine("caught in main"); + } + done: + Console.WriteLine("done"); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + + } +} + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_d.csproj new file mode 100644 index 0000000..5efa013 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_do.csproj new file mode 100644 index 0000000..4b678e3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_r.csproj new file mode 100644 index 0000000..5d6b180 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_ro.csproj new file mode 100644 index 0000000..8fe94b8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/simplenonlocalexitnestedintrycatch_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/switchincatch.cs b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch.cs new file mode 100644 index 0000000..0465275 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// switch in catch + +using System; + +namespace strswitch +{ + /// + /// Summary description for Class1. + /// + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("In outer finally\n"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("In outer finally\n"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("In outer finally\n"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("In outer finally\n"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("In outer finally\n"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("In outer finally\n"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + /// + /// The main entry point for the application. + /// + [STAThread] + static int Main(string[] args) + { + string[] s = { "one", "two", "three", "four", "five", "six" }; + //Start recording + testLog.StartRecording(); + + for (int i = 0; i < s.Length; i++) + { + + beginloop: + try + { + try + { + try + { + continue; + } + finally + { + Console.WriteLine("In inner finally"); + } + } + catch (Exception e) + { + Console.WriteLine(e); + switch (s[i]) + { + case "three": + i++; + goto beginloop; + default: + goto continueloop; + } + + } + + Console.WriteLine("Unreached"); + } + finally + { + Console.WriteLine("In outer finally\n"); + } + + continueloop: + Console.WriteLine("Continuing"); + + } + finish: + // stop recoding + testLog.StopRecording(); + return testLog.VerifyOutput(); + + } + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_d.csproj new file mode 100644 index 0000000..7115488 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_do.csproj new file mode 100644 index 0000000..280bd87 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_r.csproj new file mode 100644 index 0000000..99dd3dd --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_ro.csproj new file mode 100644 index 0000000..2cea824 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/switchincatch_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1.cs b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1.cs new file mode 100644 index 0000000..fb16387 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in main try"); + expectedOut.WriteLine(" in middle1 try"); + expectedOut.WriteLine(" in middle1 finally"); + expectedOut.WriteLine("in main catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void Middle1(int i) + { + try + { + Console.WriteLine(" in middle1 try"); + if (i == 0) goto L1; + } + catch + { + Console.WriteLine(" in middle1 catch"); + } + finally + { + Console.WriteLine(" in middle1 finally"); + if (i == 0) throw new Exception(); + } + Console.WriteLine("after finally"); + L1: + Console.WriteLine("middle1 L1"); + } + + static public int Main(string[] args) + { + // start recording + testLog.StartRecording(); + + int i = Environment.TickCount != 0 ? 0 : 1; + try + { + Console.WriteLine("in main try"); + Middle1(i); + } + catch + { + Console.WriteLine("in main catch"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_d.csproj new file mode 100644 index 0000000..b0ee195 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_do.csproj new file mode 100644 index 0000000..4a36442 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_r.csproj new file mode 100644 index 0000000..09df6b0 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_ro.csproj new file mode 100644 index 0000000..7d7a905 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit1_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2.cs b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2.cs new file mode 100644 index 0000000..87038d5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in main try"); + expectedOut.WriteLine(" in middle1 try"); + expectedOut.WriteLine(" in middle1 finally"); + expectedOut.WriteLine(" in middle2 try"); + expectedOut.WriteLine(" in middle2 finally"); + expectedOut.WriteLine("in main catch"); + expectedOut.WriteLine("in main finally"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void Middle1(int i) + { + try + { + Console.WriteLine(" in middle1 try"); + if (i == 0) goto L1; + } + catch + { + Console.WriteLine(" in middle1 catch"); + } + finally + { + Console.WriteLine(" in middle1 finally"); + Middle2(i); + if (i == 0) throw new Exception(); + } + Console.WriteLine("after middle1 finally"); + L1: + Console.WriteLine("middle1 L1"); + } + + static public void Middle2(int i) + { + try + { + Console.WriteLine(" in middle2 try"); + if (i == 0) goto L2; + } + catch + { + Console.WriteLine(" in middle2 catch"); + } + finally + { + Console.WriteLine(" in middle2 finally"); + if (i == 0) throw new Exception(); + } + Console.WriteLine("after middle2 finally"); + L2: + Console.WriteLine("middle2 L2"); + } + + static public int Main(string[] args) + { + // start recording + testLog.StartRecording(); + + int i = Environment.TickCount != 0 ? 0 : 1; + try + { + Console.WriteLine("in main try"); + Middle1(i); + } + catch + { + Console.WriteLine("in main catch"); + } + finally + { + Console.WriteLine("in main finally"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_d.csproj new file mode 100644 index 0000000..ad990fc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_do.csproj new file mode 100644 index 0000000..838eff7 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_r.csproj new file mode 100644 index 0000000..c813e91 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_ro.csproj new file mode 100644 index 0000000..92053fa --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit2_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3.cs b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3.cs new file mode 100644 index 0000000..78eafe8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in main try"); + expectedOut.WriteLine(" in middle1 L1A"); + expectedOut.WriteLine(" in middle1 try"); + expectedOut.WriteLine(" in middle1 finally"); + expectedOut.WriteLine(" in middle2 L2A"); + expectedOut.WriteLine(" in middle2 try"); + expectedOut.WriteLine(" in middle2 finally"); + expectedOut.WriteLine(" in middle2 L2A"); + expectedOut.WriteLine(" in middle2 try"); + expectedOut.WriteLine(" in middle2 finally"); + expectedOut.WriteLine(" in middle2 L2A"); + expectedOut.WriteLine(" in middle2 try"); + expectedOut.WriteLine(" in middle2 finally"); + expectedOut.WriteLine("in main catch"); + expectedOut.WriteLine("in main finally"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void Middle1(int i) + { + L1A: + Console.WriteLine(" in middle1 L1A"); + try + { + Console.WriteLine(" in middle1 try"); + if (i == 0) goto L1B; + goto L1A; + } + catch + { + Console.WriteLine(" in middle1 catch"); + } + finally + { + Console.WriteLine(" in middle1 finally"); + Middle2(i + 1); + if (i == 0) throw new Exception(); + i--; + } + Console.WriteLine(" after middle1 finally"); + L1B: + Console.WriteLine(" in middle1 L1"); + } + + static public void Middle2(int i) + { + L2A: + Console.WriteLine(" in middle2 L2A"); + try + { + Console.WriteLine(" in middle2 try"); + if (i == 0) goto L2B; + goto L2A; + } + catch + { + Console.WriteLine(" in middle2 catch"); + } + finally + { + Console.WriteLine(" in middle2 finally"); + if (i == 0) throw new Exception(); + i--; + } + Console.WriteLine(" after middle2 finally"); + L2B: + Console.WriteLine(" in middle2 L2B"); + } + + static public int Main(string[] args) + { + // start recording + testLog.StartRecording(); + + int i = Environment.TickCount != 0 ? 0 : 1; + try + { + Console.WriteLine("in main try"); + Middle1(i + 1); + } + catch + { + Console.WriteLine("in main catch"); + } + finally + { + Console.WriteLine("in main finally"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_d.csproj new file mode 100644 index 0000000..96ea7da --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_do.csproj new file mode 100644 index 0000000..e9b873d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_r.csproj new file mode 100644 index 0000000..afa6869 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_ro.csproj new file mode 100644 index 0000000..010407a --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit3_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4.cs b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4.cs new file mode 100644 index 0000000..45e5f53 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in main try"); + expectedOut.WriteLine("-in foo try [1]"); + expectedOut.WriteLine("--in foo try [2]"); + expectedOut.WriteLine("--in foo finally [2]"); + expectedOut.WriteLine("-in foo catch [1]"); + expectedOut.WriteLine("-in foo finally [1]"); + expectedOut.WriteLine("in main catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void foo(int i) + { + try + { + Console.WriteLine("-in foo try [1]"); + try + { + Console.WriteLine("--in foo try [2]"); + if (i == 0) goto L1; + } + catch + { + Console.WriteLine("--in foo catch [2]"); + } + finally + { + Console.WriteLine("--in foo finally [2]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-in foo catch [1]"); + } + finally + { + Console.WriteLine("-in foo finally [1]"); + if (i == 0) throw new Exception(); + } + Console.WriteLine("after finally"); + L1: + Console.WriteLine("foo L1"); + } + + + static public int Main(string[] args) + { + // start recording + testLog.StartRecording(); + + int i = Environment.TickCount != 0 ? 0 : 1; + try + { + Console.WriteLine("in main try"); + foo(i); + } + catch + { + Console.WriteLine("in main catch"); + } + + // stop recording + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_d.csproj new file mode 100644 index 0000000..1dd4aad --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_do.csproj new file mode 100644 index 0000000..2932de0 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_r.csproj new file mode 100644 index 0000000..dd871c4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_ro.csproj new file mode 100644 index 0000000..a377dd1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryCatchFinallyThrow_nonlocalexit4_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit.cs b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit.cs new file mode 100644 index 0000000..5391ec5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/* +A test to make sure that calls to finally for nonlocal exits are +done outside of trybody + try { + goto nonlocal_exit; + } finally { + throw; // if the finally is being called from trybody, the finally will be executed + // multiple times + } +*/ +using System; + +namespace hello +{ + class Class1 + { + + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In main's try"); + expectedOut.WriteLine("in finally"); + expectedOut.WriteLine("caught in main"); + expectedOut.WriteLine("Passed"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void Middle(int i) + { + try + { + if (i == 0) goto done; + Console.WriteLine("in try"); + } + finally + { + Console.WriteLine("in finally"); + if (i == 0) throw new Exception(); + } + Console.WriteLine("after finally"); + done: + Console.WriteLine("done"); + + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + try + { + Console.WriteLine("In main's try"); + Middle(args.Length); + } + catch + { + Console.WriteLine("caught in main"); + } + Console.WriteLine("Passed"); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_d.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_d.csproj new file mode 100644 index 0000000..e2519c7 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_do.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_do.csproj new file mode 100644 index 0000000..3c812cb --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_r.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_r.csproj new file mode 100644 index 0000000..be76115 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_ro.csproj b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_ro.csproj new file mode 100644 index 0000000..86c9ac6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/finallyexec/tryfinallythrow_nonlocalexit_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/app.config b/tests/src/JIT/Methodical/eh/generics/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/generics/throwincatch.cs b/tests/src/JIT/Methodical/eh/generics/throwincatch.cs new file mode 100644 index 0000000..63c6309 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/throwincatch.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; + + +public class GenException : Exception +{ +} + +public interface IGen +{ + bool ExceptionTest(); +} + +public class Gen : IGen +{ + public bool ExceptionTest() + { + try + { + Console.WriteLine("in try"); + try + { + Console.WriteLine(" in try"); + throw new GenException(); + } + catch (Exception exp) + { + Console.WriteLine(" in catch: " + exp.Message); + throw exp; + } + } + catch (GenException exp) + { + Console.WriteLine("in catch: " + exp.Message); + return true; + } + catch (Exception) + { + Console.WriteLine("in wrong catch!!"); + return false; + } + } +} + +public class Test +{ + private static TestUtil.TestLog testLog; + + static Test() + { + // Create test writer object to hold expected output + StringWriter expectedOut = new StringWriter(); + + // Write expected output to string writer object + Exception[] expList = new Exception[] { + new GenException(), + new GenException(), + new GenException(), + new GenException(), + new GenException() + }; + for (int i = 0; i < expList.Length; i++) + { + expectedOut.WriteLine("in try"); + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in catch: " + expList[i].Message); + expectedOut.WriteLine("in catch: " + expList[i].Message); + expectedOut.WriteLine("{0}", true); + } + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + + } + + public static int Main() + { + //Start recording + testLog.StartRecording(); + + // create test list + IGen[] genList = new IGen[] { + new Gen(), + new Gen(), + new Gen(), + new Gen(), + new Gen() + }; + + // run test + for (int i = 0; i < genList.Length; i++) + { + Console.WriteLine(genList[i].ExceptionTest()); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + +} diff --git a/tests/src/JIT/Methodical/eh/generics/throwincatch_d.csproj b/tests/src/JIT/Methodical/eh/generics/throwincatch_d.csproj new file mode 100644 index 0000000..a2e3104 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/throwincatch_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/throwincatch_do.csproj b/tests/src/JIT/Methodical/eh/generics/throwincatch_do.csproj new file mode 100644 index 0000000..14f20ed --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/throwincatch_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/throwincatch_r.csproj b/tests/src/JIT/Methodical/eh/generics/throwincatch_r.csproj new file mode 100644 index 0000000..50a2425 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/throwincatch_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/throwincatch_ro.csproj b/tests/src/JIT/Methodical/eh/generics/throwincatch_ro.csproj new file mode 100644 index 0000000..cb0487c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/throwincatch_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype.cs b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype.cs new file mode 100644 index 0000000..ca9f1af --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; + + +public class GenException : Exception +{ +} + +public interface IGen +{ + bool ExceptionTest(); +} + +public class Gen : IGen +{ + public bool ExceptionTest() + { + try + { + Console.WriteLine("in try"); + throw new GenException(); + } + catch (GenException exp) + { + Console.WriteLine("in catch: " + exp.Message); + return true; + } + } +} + +public class Test +{ + private static TestUtil.TestLog testLog; + + static Test() + { + // Create test writer object to hold expected output + StringWriter expectedOut = new StringWriter(); + + // Write expected output to string writer object + Exception[] expList = new Exception[] { + new GenException(), + new GenException>(), + new GenException>>(), + new GenException>>>(), + new GenException>>>>(), + new GenException>>>>>(), + new GenException>>>>>>(), + new GenException>>>>>>>(), + new GenException>>>>>>>>(), + new GenException>>>>>>>>>() + }; + for (int i = 0; i < expList.Length; i++) + { + expectedOut.WriteLine("in try"); + expectedOut.WriteLine("in catch: " + expList[i].Message); + expectedOut.WriteLine("{0}", true); + } + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + + } + + public static int Main() + { + //Start recording + testLog.StartRecording(); + + // create test list + IGen[] genList = new IGen[] { + new Gen(), + new Gen>(), + new Gen>>(), + new Gen>>>(), + new Gen>>>>(), + new Gen>>>>>(), + new Gen>>>>>>(), + new Gen>>>>>>>(), + new Gen>>>>>>>>(), + new Gen>>>>>>>>>() + }; + + // run test + for (int i = 0; i < genList.Length; i++) + { + Console.WriteLine(genList[i].ExceptionTest()); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + +} diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_d.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_d.csproj new file mode 100644 index 0000000..09f30a7 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_do.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_do.csproj new file mode 100644 index 0000000..ab3ade3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_r.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_r.csproj new file mode 100644 index 0000000..100b437 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_ro.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_ro.csproj new file mode 100644 index 0000000..13e29df --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchnestedtype_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype.cs b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype.cs new file mode 100644 index 0000000..5a81d72 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; + + +public class GenException : Exception +{ +} + +public interface IGen +{ + bool ExceptionTest(); +} + +public class Gen : IGen +{ + public bool ExceptionTest() + { + try + { + Console.WriteLine("in try"); + throw new GenException(); + } + catch (GenException exp) + { + Console.WriteLine("in catch: " + exp.Message); + return true; + } + } +} + +public class Test +{ + private static TestUtil.TestLog testLog; + + static Test() + { + // Create test writer object to hold expected output + StringWriter expectedOut = new StringWriter(); + + // Write expected output to string writer object + Exception[] expList = new Exception[] { + new GenException(), + new GenException(), + new GenException(), + new GenException(), + new GenException() + }; + for (int i = 0; i < expList.Length; i++) + { + expectedOut.WriteLine("in try"); + expectedOut.WriteLine("in catch: " + expList[i].Message); + expectedOut.WriteLine("{0}", true); + } + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + + } + + public static int Main() + { + //Start recording + testLog.StartRecording(); + + // create test list + IGen[] genList = new IGen[] { + new Gen(), + new Gen(), + new Gen(), + new Gen(), + new Gen() + }; + + // run test + for (int i = 0; i < genList.Length; i++) + { + Console.WriteLine(genList[i].ExceptionTest()); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + +} diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_d.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_d.csproj new file mode 100644 index 0000000..4c0f8dc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_do.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_do.csproj new file mode 100644 index 0000000..bd2a521 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_r.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_r.csproj new file mode 100644 index 0000000..c16e752 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_ro.csproj b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_ro.csproj new file mode 100644 index 0000000..574746b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/generics/trycatchsimpletype_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/gcincatch.cs b/tests/src/JIT/Methodical/eh/interactions/gcincatch.cs new file mode 100644 index 0000000..865e393 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/gcincatch.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// GC.Collect in a handler might corrupt values in gc heap if gcinfo is not correct + +using System; + +namespace test2 +{ + /// + /// Summary description for Class1. + /// + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try"); + expectedOut.WriteLine("ar[0]=1"); + expectedOut.WriteLine("ar[1]=2"); + expectedOut.WriteLine("ar[2]=3"); + expectedOut.WriteLine("ar[3]=4"); + expectedOut.WriteLine("ar[4]=5"); + expectedOut.WriteLine("In catch"); + expectedOut.WriteLine("x = 0"); + expectedOut.WriteLine("ar[0]=1"); + expectedOut.WriteLine("ar[1]=2"); + expectedOut.WriteLine("ar[2]=3"); + expectedOut.WriteLine("ar[3]=4"); + expectedOut.WriteLine("ar[4]=5"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + /// + /// The main entry point for the application. + /// + [STAThread] + public static int Main(String[] args) + { + int[] ar = new int[] { 1, 2, 3, 4, 5 }; + + //Start recording + testLog.StartRecording(); + + try + { + if (args.Length > 0) + { + for (int i = 0; i < ar.Length; i++) + { + Console.WriteLine("ar[" + i + "]=" + ar[i]); + } + } + Console.WriteLine("In try"); + GC.Collect(); + GC.WaitForPendingFinalizers(); + for (int i = 0; i < ar.Length; i++) + { + Console.WriteLine("ar[" + i + "]=" + ar[i]); + } + throw new Exception(); + } + catch + { + + Console.WriteLine("In catch"); + int x = new int(); + + Console.WriteLine("x = {0}", x); + + GC.Collect(); + GC.WaitForPendingFinalizers(); + for (int i = 0; i < ar.Length; i++) + { + Console.WriteLine("ar[" + i + "]=" + ar[i]); + } + ar = null; + GC.Collect(); + GC.WaitForPendingFinalizers(); + + } + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + + } +} diff --git a/tests/src/JIT/Methodical/eh/interactions/gcincatch_d.csproj b/tests/src/JIT/Methodical/eh/interactions/gcincatch_d.csproj new file mode 100644 index 0000000..4f4f141 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/gcincatch_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/gcincatch_do.csproj b/tests/src/JIT/Methodical/eh/interactions/gcincatch_do.csproj new file mode 100644 index 0000000..cb0b8d4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/gcincatch_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/gcincatch_r.csproj b/tests/src/JIT/Methodical/eh/interactions/gcincatch_r.csproj new file mode 100644 index 0000000..d04fd89 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/gcincatch_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/gcincatch_ro.csproj b/tests/src/JIT/Methodical/eh/interactions/gcincatch_ro.csproj new file mode 100644 index 0000000..b10e1c8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/gcincatch_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally.cs b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally.cs new file mode 100644 index 0000000..3125b0b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In finally"); + expectedOut.WriteLine("Done"); + expectedOut.WriteLine("1234"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + static public int Main(string[] args) + { + int[] a; + //Start recording + testLog.StartRecording(); + a = new int[2]; + try + { + } + finally + { + a[0] = 1234; + Console.WriteLine("In finally"); + } + Console.WriteLine("Done"); + Console.WriteLine(a[0]); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_d.csproj b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_d.csproj new file mode 100644 index 0000000..a023189 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_do.csproj b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_do.csproj new file mode 100644 index 0000000..96c5a82 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_r.csproj b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_r.csproj new file mode 100644 index 0000000..f22790e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_ro.csproj b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_ro.csproj new file mode 100644 index 0000000..083202b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/rangecheckinfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/switchinfinally.cs b/tests/src/JIT/Methodical/eh/interactions/switchinfinally.cs new file mode 100644 index 0000000..682c015 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/switchinfinally.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// switch statement in a finally + +using System; + +namespace test3 +{ + class MyClass + { + int m_i; + public MyClass(int i) + { + m_i = i; + Console.WriteLine("In MyClass"); + } + + public int val + { + get + { + return m_i; + } + set + { + m_i = value; + } + } + + + public void testit(int i) + { + try + { + + } + finally + { + switch (i) + { + case 0: + Console.WriteLine("In finally"); + break; + case 1: + Console.WriteLine("Wrong"); + goto endfin; + break; + default: + Console.WriteLine("bad"); + throw new Exception(); + } + Console.WriteLine("Still in finally\n"); + endfin: + Console.WriteLine("Exitting finally\n"); + } + done: + Console.WriteLine("done testing"); + } + } + /// + /// Summary description for Class1. + /// + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In MyClass"); + expectedOut.WriteLine("In finally"); + expectedOut.WriteLine("Still in finally\n"); + + expectedOut.WriteLine("Exitting finally\n"); + + expectedOut.WriteLine("done testing"); + expectedOut.WriteLine("1234"); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + /// + /// The main entry point for the application. + /// + [STAThread] + static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + MyClass x = new MyClass(1234); + x.testit(args.Length); + Console.WriteLine(x.val); + + // stop recoding + testLog.StopRecording(); + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/interactions/switchinfinally_d.csproj b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_d.csproj new file mode 100644 index 0000000..3da7bb9 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/switchinfinally_do.csproj b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_do.csproj new file mode 100644 index 0000000..b4ad835 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/switchinfinally_r.csproj b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_r.csproj new file mode 100644 index 0000000..d12f559 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/interactions/switchinfinally_ro.csproj b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_ro.csproj new file mode 100644 index 0000000..f3dc16d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/interactions/switchinfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/app.config b/tests/src/JIT/Methodical/eh/leaves/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet.cs b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet.cs new file mode 100644 index 0000000..273b915 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// A nonlocal exit and a catchret in a funclet where the destination label is also in the same funclet +// cause confusion when we're building FG for the funclet (114611) + + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("1234"); + expectedOut.WriteLine("end outer catch test"); + expectedOut.WriteLine("1234"); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + int i = 1234; + Console.WriteLine(i); + String s = "test"; + try + { + throw new Exception(); + } + catch + { + try + { + if (i != 0) goto incatch; + } + catch + { + if (i != 0) goto incatch; + Console.WriteLine("end inner catch"); + } + Console.WriteLine("unreached"); + + incatch: + Console.WriteLine("end outer catch " + s); + } + Console.WriteLine(i); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_d.csproj b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_d.csproj new file mode 100644 index 0000000..c7dd8c3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_do.csproj b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_do.csproj new file mode 100644 index 0000000..b60c19d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_r.csproj b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_r.csproj new file mode 100644 index 0000000..aa8fe88 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_ro.csproj b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_ro.csproj new file mode 100644 index 0000000..ddb9f72 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/catchretnonlocalexitinfunclet_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch.cs b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch.cs new file mode 100644 index 0000000..e7251c7 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Non local exit from a catch handler nested inside another catch handler + +using System; + +class test +{ + private static TestUtil.TestLog testLog; + + static test() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try1"); + expectedOut.WriteLine("In catch1"); + expectedOut.WriteLine("In try2"); + expectedOut.WriteLine("In try3"); + expectedOut.WriteLine("In catch3"); + expectedOut.WriteLine("In finally2"); + expectedOut.WriteLine("In finally1"); + expectedOut.WriteLine("Done"); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + public static int Main() + { + //Start recording + testLog.StartRecording(); + try + { + Console.WriteLine("In try1"); + throw new Exception(); + } + catch (Exception) + { + Console.WriteLine("In catch1"); + try + { + Console.WriteLine("In try2"); + try + { + Console.WriteLine("In try3"); + throw new Exception(); + } + catch + { + Console.WriteLine("In catch3"); + goto L; + } + } + finally + { + Console.WriteLine("In finally2"); + } + } + finally + { + Console.WriteLine("In finally1"); + } + + Console.WriteLine("Never executed"); + L: + Console.WriteLine("Done"); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + + + } +} \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_d.csproj b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_d.csproj new file mode 100644 index 0000000..9cbf367 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_do.csproj b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_do.csproj new file mode 100644 index 0000000..fb9de4f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_r.csproj b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_r.csproj new file mode 100644 index 0000000..2c1db77 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_ro.csproj b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_ro.csproj new file mode 100644 index 0000000..648325e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/nonlocalexitfromnestedcatch_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/oponerror.cs b/tests/src/JIT/Methodical/eh/leaves/oponerror.cs new file mode 100644 index 0000000..b3dc95b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/oponerror.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + + +// catch ret inside try region +// note: this is NOT the test case +// after vswhidbey:5875 is fixed, intry will be outside the outer try block + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("1234"); + expectedOut.WriteLine("test2"); + expectedOut.WriteLine("end outer catch test2"); + expectedOut.WriteLine("1234"); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + int i = 1234; + Console.WriteLine(i); + goto begin2; + + begin: + String s = "test1"; + + begin2: + s = "test2"; + + intry: + try + { + Console.WriteLine(s); + throw new Exception(); + } + catch + { + try + { + if (i == 3) goto intry; // catch ret + if (i >= 0) goto incatch; + if (i < 0) goto begin; // catch ret + + } + catch + { + if (i != 0) goto incatch; + Console.WriteLine("end inner catch"); + } + Console.WriteLine("unreached"); + + incatch: + Console.WriteLine("end outer catch " + s); + } + Console.WriteLine(i); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/leaves/oponerror_d.csproj b/tests/src/JIT/Methodical/eh/leaves/oponerror_d.csproj new file mode 100644 index 0000000..3dea025 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/oponerror_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/oponerror_do.csproj b/tests/src/JIT/Methodical/eh/leaves/oponerror_do.csproj new file mode 100644 index 0000000..129d734 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/oponerror_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/oponerror_r.csproj b/tests/src/JIT/Methodical/eh/leaves/oponerror_r.csproj new file mode 100644 index 0000000..002f3a2 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/oponerror_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/oponerror_ro.csproj b/tests/src/JIT/Methodical/eh/leaves/oponerror_ro.csproj new file mode 100644 index 0000000..b7e8945 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/oponerror_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop.cs b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop.cs new file mode 100644 index 0000000..f42fbee --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in loop, i = 0"); + expectedOut.WriteLine("in loop, i = 1"); + expectedOut.WriteLine("in loop, i = 2"); + expectedOut.WriteLine("in loop, i = 3"); + expectedOut.WriteLine("in loop, i = 4"); + expectedOut.WriteLine("in loop, i = 5"); + expectedOut.WriteLine("in loop, i = 6"); + expectedOut.WriteLine("in loop, i = 7"); + expectedOut.WriteLine("in loop, i = 8"); + expectedOut.WriteLine("in loop, i = 9"); + expectedOut.WriteLine("in Finally\n"); + expectedOut.WriteLine("Done"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + static public void inTry() + { + Console.WriteLine("in Try\n"); + throw new Exception(); + } + + static public void inFinally() + { + Console.WriteLine("in Finally\n"); + } + static public int Main(string[] args) + { + int i = 0; + //Start recording + testLog.StartRecording(); + try + { + L: + Console.WriteLine("in loop, i = " + i); + i += 1; + if (i == 10) goto finish; + goto L; + + } + finally + { + inFinally(); + } + finish: + Console.WriteLine("Done"); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_d.csproj b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_d.csproj new file mode 100644 index 0000000..74f6df3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_do.csproj b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_do.csproj new file mode 100644 index 0000000..f8df686 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_r.csproj b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_r.csproj new file mode 100644 index 0000000..29807fb --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_ro.csproj b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_ro.csproj new file mode 100644 index 0000000..b31170c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/leaves/tryfinallyloop_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/app.config b/tests/src/JIT/Methodical/eh/nested/general/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch.cs b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch.cs new file mode 100644 index 0000000..49e5802 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// non-local exits in a catch handler nested in another catch handler + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in Try"); + expectedOut.WriteLine("in Try"); + expectedOut.WriteLine("in Try"); + expectedOut.WriteLine("L5"); + expectedOut.WriteLine("in Catch"); + expectedOut.WriteLine("in Try"); + expectedOut.WriteLine("in Catch"); + expectedOut.WriteLine("L4"); + expectedOut.WriteLine("in Try"); + expectedOut.WriteLine("in Catch"); + expectedOut.WriteLine("L4"); + expectedOut.WriteLine("L5"); + expectedOut.WriteLine("in Catch"); + expectedOut.WriteLine("in Finally"); + expectedOut.WriteLine("in Finally"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static int i; + + static public void inTry() + { + Console.WriteLine("in Try"); + i++; + if (i > 3) + throw new Exception(); + } + + static public void inCatch() + { + Console.WriteLine("in Catch"); + } + + static public void inFinally() + { + Console.WriteLine("in Finally"); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + i = 0; + L1: + if (i > 0) goto L3; + try + { + inTry(); + try + { + inTry(); + L2: + try + { // catch Exception + inTry(); + throw new Exception(); + } + catch (Exception e) + { + L5: + Console.WriteLine("L5"); + inCatch(); + if (i == 5) goto L1; + try + { // catch System + inTry(); + } + catch (Exception e1) + { + inCatch(); + if (i == 0) goto L1; + if (i == 1) goto L2; + L4: + Console.WriteLine("L4"); + if (i == 5) goto L5; + try + { + inTry(); + } + catch (Exception e2) + { + inCatch(); + if (i == 0) goto L3; + if (i == 1) goto L2; + if (i > 1) goto L4; + Console.WriteLine("Unreached\n"); + try + { + for (int ii = 0; ii < 10; ii++) + { + try + { + Console.WriteLine(args[ii]); + } + finally + { + Console.WriteLine("Unreached finally\n"); + } + } + } + catch + { + Console.WriteLine("Unreached catch\n"); + switch (i) + { + case 0: goto L1; + case 3: goto L2; + case 4: goto L4; + default: break; + } + goto L5; + } + } + } + } + } + finally + { + inFinally(); + } + } + finally + { + inFinally(); + } + L3: + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } // Main + } // class +} // namespace + diff --git a/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_d.csproj b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_d.csproj new file mode 100644 index 0000000..20440d5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_do.csproj b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_do.csproj new file mode 100644 index 0000000..9e6ecd4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_r.csproj b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_r.csproj new file mode 100644 index 0000000..dfd2acc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_ro.csproj b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_ro.csproj new file mode 100644 index 0000000..95b32ef --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/cascadedcatch_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally.cs b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally.cs new file mode 100644 index 0000000..e4126ed --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// A method throws an exception in both try and finally nested in try/catch. +// NDPWhidbey 10962 + +using System; + +namespace Test +{ + class Class1 + { + + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("try 1"); + expectedOut.WriteLine("\ttry 1.1"); + expectedOut.WriteLine("\tfinally 1.1"); + expectedOut.WriteLine("finally 1"); + expectedOut.WriteLine("try 1"); + expectedOut.WriteLine("\ttry 1.1"); + expectedOut.WriteLine("\tfinally 1.1"); + expectedOut.WriteLine("finally 1"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + try + { + test(); + } + finally + { + test(); + } + } + catch + { + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + + static void test() + { + try + { + Console.WriteLine("try 1"); + try + { + Console.WriteLine("\ttry 1.1"); + } + finally + { + Console.WriteLine("\tfinally 1.1"); + throw new Exception(); + } + } + finally + { + Console.WriteLine("finally 1"); + } + } + + } + +} diff --git a/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_d.csproj b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_d.csproj new file mode 100644 index 0000000..bf451e4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_do.csproj b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_do.csproj new file mode 100644 index 0000000..53e68e9 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_r.csproj b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_r.csproj new file mode 100644 index 0000000..7409768 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_ro.csproj b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_ro.csproj new file mode 100644 index 0000000..a677425 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/methodthrowsinfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally.cs b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally.cs new file mode 100644 index 0000000..21ac0a4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Re-throw an exception in catch nested in finally which is nested in try with catch and finally. +// NDPWhidbey 10959 + +using System; + +namespace Test +{ + + class Class1 + { + + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine(" try"); + expectedOut.WriteLine("\t try"); + expectedOut.WriteLine("\t finally"); + expectedOut.WriteLine("\t\t try \t [throwing an exception here]"); + expectedOut.WriteLine("\t\t catch \t [re-throwing the same exception]"); + expectedOut.WriteLine(" catch"); + expectedOut.WriteLine(" finally"); + expectedOut.WriteLine(" inside loop i = 0"); + expectedOut.WriteLine(" inside loop i = 1"); + expectedOut.WriteLine(" inside loop i = 2"); + expectedOut.WriteLine(" inside loop i = 3"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine(" try"); + try + { + Console.WriteLine("\t try"); + } + finally + { + Console.WriteLine("\t finally"); + try + { + Console.WriteLine("\t\t try \t [throwing an exception here]"); + int x = 0; + int y = 5 / x; + } + catch (System.Exception) + { + Console.WriteLine("\t\t catch \t [re-throwing the same exception]"); + throw; + } + } + } + catch (System.Exception) + { + Console.WriteLine(" catch"); + } + finally + { + Console.WriteLine(" finally"); + } + for (int i = 0; i < 4; ++i) + { + Console.WriteLine(" inside loop i = " + i); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_d.csproj b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_d.csproj new file mode 100644 index 0000000..a755731 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_do.csproj b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_do.csproj new file mode 100644 index 0000000..594562b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_r.csproj b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_r.csproj new file mode 100644 index 0000000..1fddf7b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_ro.csproj b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_ro.csproj new file mode 100644 index 0000000..d1b4a80 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/rethrowincatchnestedinfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinally.cs b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally.cs new file mode 100644 index 0000000..80e921f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw from a try block nested in finally, non error case + +using System; + +public class a +{ + private static TestUtil.TestLog testLog; + + static a() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In outer try"); + expectedOut.WriteLine("In outer finally"); + expectedOut.WriteLine("In inner try"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("Pass"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void MiddleMethod() + { + try + { + Console.WriteLine("In outer try"); + } + finally + { + Console.WriteLine("In outer finally"); + try + { + Console.WriteLine("In inner try"); + throw new System.ArgumentException(); + Console.WriteLine("Unreached"); + } + finally + { + Console.WriteLine("In inner finally"); + } + } + Console.WriteLine("Unreached..."); + } + + public static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + MiddleMethod(); + } + catch + { + Console.WriteLine("Pass"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_d.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_d.csproj new file mode 100644 index 0000000..c5a3f3f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_do.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_do.csproj new file mode 100644 index 0000000..11b3b62 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_r.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_r.csproj new file mode 100644 index 0000000..323274b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_ro.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_ro.csproj new file mode 100644 index 0000000..fd64d29 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry.cs b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry.cs new file mode 100644 index 0000000..417c925 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw from a try block nested in a finally which in turn nested in a try block + +using System; + +public class a +{ + private static TestUtil.TestLog testLog; + + static a() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In outer try - 0"); + expectedOut.WriteLine("In outer try - 1"); + expectedOut.WriteLine("In outer finally - 1"); + expectedOut.WriteLine("In inner try"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("In outer finally - 0"); + expectedOut.WriteLine("Pass"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void MiddleMethod() + { + try + { + Console.WriteLine("In outer try - 0"); + try + { + Console.WriteLine("In outer try - 1"); + } + finally + { + Console.WriteLine("In outer finally - 1"); + try + { + Console.WriteLine("In inner try"); + throw new System.ArgumentException(); + Console.WriteLine("Unreached"); + } + finally + { + Console.WriteLine("In inner finally"); + } + } + } + finally + { + Console.WriteLine("In outer finally - 0"); + } + Console.WriteLine("Unreached..."); + } + + public static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + MiddleMethod(); + } + catch + { + Console.WriteLine("Pass"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_d.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_d.csproj new file mode 100644 index 0000000..6537624 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_do.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_do.csproj new file mode 100644 index 0000000..69acfdf --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_r.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_r.csproj new file mode 100644 index 0000000..24df5dc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_ro.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_ro.csproj new file mode 100644 index 0000000..296998d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinfinallynestedintry_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally.cs b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally.cs new file mode 100644 index 0000000..fb6a597 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw from a try block nested in 2 finallys + +using System; + +public class a +{ + private static TestUtil.TestLog testLog; + + static a() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In outer try - 0"); + expectedOut.WriteLine("In outer finally - 0"); + expectedOut.WriteLine("In outer try - 1"); + expectedOut.WriteLine("In outer finally - 1"); + expectedOut.WriteLine("In inner try"); + expectedOut.WriteLine("In inner finally"); + expectedOut.WriteLine("Pass"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void MiddleMethod() + { + try + { + Console.WriteLine("In outer try - 0"); + } + finally + { + Console.WriteLine("In outer finally - 0"); + try + { + Console.WriteLine("In outer try - 1"); + } + finally + { + Console.WriteLine("In outer finally - 1"); + try + { + Console.WriteLine("In inner try"); + throw new System.ArgumentException(); + Console.WriteLine("Unreached"); + } + finally + { + Console.WriteLine("In inner finally"); + } + } + } + Console.WriteLine("Unreached..."); + } + + public static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + MiddleMethod(); + } + catch + { + Console.WriteLine("Pass"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_d.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_d.csproj new file mode 100644 index 0000000..15fa09f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_do.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_do.csproj new file mode 100644 index 0000000..1d9f4c1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_r.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_r.csproj new file mode 100644 index 0000000..6d2ea8d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_ro.csproj b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_ro.csproj new file mode 100644 index 0000000..262c55e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/throwinnestedfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally.cs b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally.cs new file mode 100644 index 0000000..7b8dad1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw from a try block nested in finally, non error case + +using System; + +public class a +{ + private static TestUtil.TestLog testLog; + + static a() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In outer try"); + expectedOut.WriteLine("In outer finally"); + expectedOut.WriteLine("In inner try"); + expectedOut.WriteLine("In inner catch"); + expectedOut.WriteLine("Done."); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void MiddleMethod() + { + try + { + Console.WriteLine("In outer try"); + } + finally + { + Console.WriteLine("In outer finally"); + try + { + Console.WriteLine("In inner try"); + throw new System.ArgumentException(); + Console.WriteLine("Unreached"); + } + catch + { + Console.WriteLine("In inner catch"); + } + } + Console.WriteLine("Done."); + } + + public static int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + MiddleMethod(); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_d.csproj b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_d.csproj new file mode 100644 index 0000000..91be234 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_do.csproj b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_do.csproj new file mode 100644 index 0000000..3b02575 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_r.csproj b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_r.csproj new file mode 100644 index 0000000..9778be4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_ro.csproj b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_ro.csproj new file mode 100644 index 0000000..6842b7e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/general/trycatchintryfinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/app.config b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50.cs b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50.cs new file mode 100644 index 0000000..9a51fec --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50.cs @@ -0,0 +1,853 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +// levels of nesting = 50 +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in main try"); + expectedOut.WriteLine("-in foo try [1]"); + expectedOut.WriteLine("--in foo try [2]"); + expectedOut.WriteLine("---in foo try [3]"); + expectedOut.WriteLine("----in foo try [4]"); + expectedOut.WriteLine("-----in foo try [5]"); + expectedOut.WriteLine("------in foo try [6]"); + expectedOut.WriteLine("-------in foo try [7]"); + expectedOut.WriteLine("--------in foo try [8]"); + expectedOut.WriteLine("---------in foo try [9]"); + expectedOut.WriteLine("----------in foo try [10]"); + expectedOut.WriteLine("-----------in foo try [11]"); + expectedOut.WriteLine("------------in foo try [12]"); + expectedOut.WriteLine("-------------in foo try [13]"); + expectedOut.WriteLine("--------------in foo try [14]"); + expectedOut.WriteLine("---------------in foo try [15]"); + expectedOut.WriteLine("----------------in foo try [16]"); + expectedOut.WriteLine("-----------------in foo try [17]"); + expectedOut.WriteLine("------------------in foo try [18]"); + expectedOut.WriteLine("-------------------in foo try [19]"); + expectedOut.WriteLine("--------------------in foo try [20]"); + expectedOut.WriteLine("---------------------in foo try [21]"); + expectedOut.WriteLine("----------------------in foo try [22]"); + expectedOut.WriteLine("-----------------------in foo try [23]"); + expectedOut.WriteLine("------------------------in foo try [24]"); + expectedOut.WriteLine("-------------------------in foo try [25]"); + expectedOut.WriteLine("--------------------------in foo try [26]"); + expectedOut.WriteLine("---------------------------in foo try [27]"); + expectedOut.WriteLine("----------------------------in foo try [28]"); + expectedOut.WriteLine("-----------------------------in foo try [29]"); + expectedOut.WriteLine("------------------------------in foo try [30]"); + expectedOut.WriteLine("-------------------------------in foo try [31]"); + expectedOut.WriteLine("--------------------------------in foo try [32]"); + expectedOut.WriteLine("---------------------------------in foo try [33]"); + expectedOut.WriteLine("----------------------------------in foo try [34]"); + expectedOut.WriteLine("-----------------------------------in foo try [35]"); + expectedOut.WriteLine("------------------------------------in foo try [36]"); + expectedOut.WriteLine("-------------------------------------in foo try [37]"); + expectedOut.WriteLine("--------------------------------------in foo try [38]"); + expectedOut.WriteLine("---------------------------------------in foo try [39]"); + expectedOut.WriteLine("----------------------------------------in foo try [40]"); + expectedOut.WriteLine("-----------------------------------------in foo try [41]"); + expectedOut.WriteLine("------------------------------------------in foo try [42]"); + expectedOut.WriteLine("-------------------------------------------in foo try [43]"); + expectedOut.WriteLine("--------------------------------------------in foo try [44]"); + expectedOut.WriteLine("---------------------------------------------in foo try [45]"); + expectedOut.WriteLine("----------------------------------------------in foo try [46]"); + expectedOut.WriteLine("-----------------------------------------------in foo try [47]"); + expectedOut.WriteLine("------------------------------------------------in foo try [48]"); + expectedOut.WriteLine("-------------------------------------------------in foo try [49]"); + expectedOut.WriteLine("--------------------------------------------------in foo try [50]"); + expectedOut.WriteLine("--------------------------------------------------in foo finally [50]"); + expectedOut.WriteLine("-------------------------------------------------in foo catch [49]"); + expectedOut.WriteLine("-------------------------------------------------in foo finally [49]"); + expectedOut.WriteLine("------------------------------------------------in foo catch [48]"); + expectedOut.WriteLine("------------------------------------------------in foo finally [48]"); + expectedOut.WriteLine("-----------------------------------------------in foo catch [47]"); + expectedOut.WriteLine("-----------------------------------------------in foo finally [47]"); + expectedOut.WriteLine("----------------------------------------------in foo catch [46]"); + expectedOut.WriteLine("----------------------------------------------in foo finally [46]"); + expectedOut.WriteLine("---------------------------------------------in foo catch [45]"); + expectedOut.WriteLine("---------------------------------------------in foo finally [45]"); + expectedOut.WriteLine("--------------------------------------------in foo catch [44]"); + expectedOut.WriteLine("--------------------------------------------in foo finally [44]"); + expectedOut.WriteLine("-------------------------------------------in foo catch [43]"); + expectedOut.WriteLine("-------------------------------------------in foo finally [43]"); + expectedOut.WriteLine("------------------------------------------in foo catch [42]"); + expectedOut.WriteLine("------------------------------------------in foo finally [42]"); + expectedOut.WriteLine("-----------------------------------------in foo catch [41]"); + expectedOut.WriteLine("-----------------------------------------in foo finally [41]"); + expectedOut.WriteLine("----------------------------------------in foo catch [40]"); + expectedOut.WriteLine("----------------------------------------in foo finally [40]"); + expectedOut.WriteLine("---------------------------------------in foo catch [39]"); + expectedOut.WriteLine("---------------------------------------in foo finally [39]"); + expectedOut.WriteLine("--------------------------------------in foo catch [38]"); + expectedOut.WriteLine("--------------------------------------in foo finally [38]"); + expectedOut.WriteLine("-------------------------------------in foo catch [37]"); + expectedOut.WriteLine("-------------------------------------in foo finally [37]"); + expectedOut.WriteLine("------------------------------------in foo catch [36]"); + expectedOut.WriteLine("------------------------------------in foo finally [36]"); + expectedOut.WriteLine("-----------------------------------in foo catch [35]"); + expectedOut.WriteLine("-----------------------------------in foo finally [35]"); + expectedOut.WriteLine("----------------------------------in foo catch [34]"); + expectedOut.WriteLine("----------------------------------in foo finally [34]"); + expectedOut.WriteLine("---------------------------------in foo catch [33]"); + expectedOut.WriteLine("---------------------------------in foo finally [33]"); + expectedOut.WriteLine("--------------------------------in foo catch [32]"); + expectedOut.WriteLine("--------------------------------in foo finally [32]"); + expectedOut.WriteLine("-------------------------------in foo catch [31]"); + expectedOut.WriteLine("-------------------------------in foo finally [31]"); + expectedOut.WriteLine("------------------------------in foo catch [30]"); + expectedOut.WriteLine("------------------------------in foo finally [30]"); + expectedOut.WriteLine("-----------------------------in foo catch [29]"); + expectedOut.WriteLine("-----------------------------in foo finally [29]"); + expectedOut.WriteLine("----------------------------in foo catch [28]"); + expectedOut.WriteLine("----------------------------in foo finally [28]"); + expectedOut.WriteLine("---------------------------in foo catch [27]"); + expectedOut.WriteLine("---------------------------in foo finally [27]"); + expectedOut.WriteLine("--------------------------in foo catch [26]"); + expectedOut.WriteLine("--------------------------in foo finally [26]"); + expectedOut.WriteLine("-------------------------in foo catch [25]"); + expectedOut.WriteLine("-------------------------in foo finally [25]"); + expectedOut.WriteLine("------------------------in foo catch [24]"); + expectedOut.WriteLine("------------------------in foo finally [24]"); + expectedOut.WriteLine("-----------------------in foo catch [23]"); + expectedOut.WriteLine("-----------------------in foo finally [23]"); + expectedOut.WriteLine("----------------------in foo catch [22]"); + expectedOut.WriteLine("----------------------in foo finally [22]"); + expectedOut.WriteLine("---------------------in foo catch [21]"); + expectedOut.WriteLine("---------------------in foo finally [21]"); + expectedOut.WriteLine("--------------------in foo catch [20]"); + expectedOut.WriteLine("--------------------in foo finally [20]"); + expectedOut.WriteLine("-------------------in foo catch [19]"); + expectedOut.WriteLine("-------------------in foo finally [19]"); + expectedOut.WriteLine("------------------in foo catch [18]"); + expectedOut.WriteLine("------------------in foo finally [18]"); + expectedOut.WriteLine("-----------------in foo catch [17]"); + expectedOut.WriteLine("-----------------in foo finally [17]"); + expectedOut.WriteLine("----------------in foo catch [16]"); + expectedOut.WriteLine("----------------in foo finally [16]"); + expectedOut.WriteLine("---------------in foo catch [15]"); + expectedOut.WriteLine("---------------in foo finally [15]"); + expectedOut.WriteLine("--------------in foo catch [14]"); + expectedOut.WriteLine("--------------in foo finally [14]"); + expectedOut.WriteLine("-------------in foo catch [13]"); + expectedOut.WriteLine("-------------in foo finally [13]"); + expectedOut.WriteLine("------------in foo catch [12]"); + expectedOut.WriteLine("------------in foo finally [12]"); + expectedOut.WriteLine("-----------in foo catch [11]"); + expectedOut.WriteLine("-----------in foo finally [11]"); + expectedOut.WriteLine("----------in foo catch [10]"); + expectedOut.WriteLine("----------in foo finally [10]"); + expectedOut.WriteLine("---------in foo catch [9]"); + expectedOut.WriteLine("---------in foo finally [9]"); + expectedOut.WriteLine("--------in foo catch [8]"); + expectedOut.WriteLine("--------in foo finally [8]"); + expectedOut.WriteLine("-------in foo catch [7]"); + expectedOut.WriteLine("-------in foo finally [7]"); + expectedOut.WriteLine("------in foo catch [6]"); + expectedOut.WriteLine("------in foo finally [6]"); + expectedOut.WriteLine("-----in foo catch [5]"); + expectedOut.WriteLine("-----in foo finally [5]"); + expectedOut.WriteLine("----in foo catch [4]"); + expectedOut.WriteLine("----in foo finally [4]"); + expectedOut.WriteLine("---in foo catch [3]"); + expectedOut.WriteLine("---in foo finally [3]"); + expectedOut.WriteLine("--in foo catch [2]"); + expectedOut.WriteLine("--in foo finally [2]"); + expectedOut.WriteLine("-in foo catch [1]"); + expectedOut.WriteLine("-in foo finally [1]"); + expectedOut.WriteLine("in main catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void foo(int i) + { + try + { + Console.WriteLine("-in foo try [1]"); + try + { + Console.WriteLine("--in foo try [2]"); + try + { + Console.WriteLine("---in foo try [3]"); + try + { + Console.WriteLine("----in foo try [4]"); + try + { + Console.WriteLine("-----in foo try [5]"); + try + { + Console.WriteLine("------in foo try [6]"); + try + { + Console.WriteLine("-------in foo try [7]"); + try + { + Console.WriteLine("--------in foo try [8]"); + try + { + Console.WriteLine("---------in foo try [9]"); + try + { + Console.WriteLine("----------in foo try [10]"); + try + { + Console.WriteLine("-----------in foo try [11]"); + try + { + Console.WriteLine("------------in foo try [12]"); + try + { + Console.WriteLine("-------------in foo try [13]"); + try + { + Console.WriteLine("--------------in foo try [14]"); + try + { + Console.WriteLine("---------------in foo try [15]"); + try + { + Console.WriteLine("----------------in foo try [16]"); + try + { + Console.WriteLine("-----------------in foo try [17]"); + try + { + Console.WriteLine("------------------in foo try [18]"); + try + { + Console.WriteLine("-------------------in foo try [19]"); + try + { + Console.WriteLine("--------------------in foo try [20]"); + try + { + Console.WriteLine("---------------------in foo try [21]"); + try + { + Console.WriteLine("----------------------in foo try [22]"); + try + { + Console.WriteLine("-----------------------in foo try [23]"); + try + { + Console.WriteLine("------------------------in foo try [24]"); + try + { + Console.WriteLine("-------------------------in foo try [25]"); + try + { + Console.WriteLine("--------------------------in foo try [26]"); + try + { + Console.WriteLine("---------------------------in foo try [27]"); + try + { + Console.WriteLine("----------------------------in foo try [28]"); + try + { + Console.WriteLine("-----------------------------in foo try [29]"); + try + { + Console.WriteLine("------------------------------in foo try [30]"); + try + { + Console.WriteLine("-------------------------------in foo try [31]"); + try + { + Console.WriteLine("--------------------------------in foo try [32]"); + try + { + Console.WriteLine("---------------------------------in foo try [33]"); + try + { + Console.WriteLine("----------------------------------in foo try [34]"); + try + { + Console.WriteLine("-----------------------------------in foo try [35]"); + try + { + Console.WriteLine("------------------------------------in foo try [36]"); + try + { + Console.WriteLine("-------------------------------------in foo try [37]"); + try + { + Console.WriteLine("--------------------------------------in foo try [38]"); + try + { + Console.WriteLine("---------------------------------------in foo try [39]"); + try + { + Console.WriteLine("----------------------------------------in foo try [40]"); + try + { + Console.WriteLine("-----------------------------------------in foo try [41]"); + try + { + Console.WriteLine("------------------------------------------in foo try [42]"); + try + { + Console.WriteLine("-------------------------------------------in foo try [43]"); + try + { + Console.WriteLine("--------------------------------------------in foo try [44]"); + try + { + Console.WriteLine("---------------------------------------------in foo try [45]"); + try + { + Console.WriteLine("----------------------------------------------in foo try [46]"); + try + { + Console.WriteLine("-----------------------------------------------in foo try [47]"); + try + { + Console.WriteLine("------------------------------------------------in foo try [48]"); + try + { + Console.WriteLine("-------------------------------------------------in foo try [49]"); + try + { + Console.WriteLine("--------------------------------------------------in foo try [50]"); + if (i == 0) goto L1; + } + catch + { + Console.WriteLine("--------------------------------------------------in foo catch [50]"); + } + finally + { + Console.WriteLine("--------------------------------------------------in foo finally [50]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------------------------------------------------in foo catch [49]"); + } + finally + { + Console.WriteLine("-------------------------------------------------in foo finally [49]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------------------------------------------------in foo catch [48]"); + } + finally + { + Console.WriteLine("------------------------------------------------in foo finally [48]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----------------------------------------------in foo catch [47]"); + } + finally + { + Console.WriteLine("-----------------------------------------------in foo finally [47]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----------------------------------------------in foo catch [46]"); + } + finally + { + Console.WriteLine("----------------------------------------------in foo finally [46]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---------------------------------------------in foo catch [45]"); + } + finally + { + Console.WriteLine("---------------------------------------------in foo finally [45]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--------------------------------------------in foo catch [44]"); + } + finally + { + Console.WriteLine("--------------------------------------------in foo finally [44]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------------------------------------------in foo catch [43]"); + } + finally + { + Console.WriteLine("-------------------------------------------in foo finally [43]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------------------------------------------in foo catch [42]"); + } + finally + { + Console.WriteLine("------------------------------------------in foo finally [42]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----------------------------------------in foo catch [41]"); + } + finally + { + Console.WriteLine("-----------------------------------------in foo finally [41]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----------------------------------------in foo catch [40]"); + } + finally + { + Console.WriteLine("----------------------------------------in foo finally [40]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---------------------------------------in foo catch [39]"); + } + finally + { + Console.WriteLine("---------------------------------------in foo finally [39]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--------------------------------------in foo catch [38]"); + } + finally + { + Console.WriteLine("--------------------------------------in foo finally [38]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------------------------------------in foo catch [37]"); + } + finally + { + Console.WriteLine("-------------------------------------in foo finally [37]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------------------------------------in foo catch [36]"); + } + finally + { + Console.WriteLine("------------------------------------in foo finally [36]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----------------------------------in foo catch [35]"); + } + finally + { + Console.WriteLine("-----------------------------------in foo finally [35]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----------------------------------in foo catch [34]"); + } + finally + { + Console.WriteLine("----------------------------------in foo finally [34]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---------------------------------in foo catch [33]"); + } + finally + { + Console.WriteLine("---------------------------------in foo finally [33]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--------------------------------in foo catch [32]"); + } + finally + { + Console.WriteLine("--------------------------------in foo finally [32]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------------------------------in foo catch [31]"); + } + finally + { + Console.WriteLine("-------------------------------in foo finally [31]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------------------------------in foo catch [30]"); + } + finally + { + Console.WriteLine("------------------------------in foo finally [30]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----------------------------in foo catch [29]"); + } + finally + { + Console.WriteLine("-----------------------------in foo finally [29]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----------------------------in foo catch [28]"); + } + finally + { + Console.WriteLine("----------------------------in foo finally [28]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---------------------------in foo catch [27]"); + } + finally + { + Console.WriteLine("---------------------------in foo finally [27]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--------------------------in foo catch [26]"); + } + finally + { + Console.WriteLine("--------------------------in foo finally [26]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------------------------in foo catch [25]"); + } + finally + { + Console.WriteLine("-------------------------in foo finally [25]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------------------------in foo catch [24]"); + } + finally + { + Console.WriteLine("------------------------in foo finally [24]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----------------------in foo catch [23]"); + } + finally + { + Console.WriteLine("-----------------------in foo finally [23]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----------------------in foo catch [22]"); + } + finally + { + Console.WriteLine("----------------------in foo finally [22]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---------------------in foo catch [21]"); + } + finally + { + Console.WriteLine("---------------------in foo finally [21]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--------------------in foo catch [20]"); + } + finally + { + Console.WriteLine("--------------------in foo finally [20]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------------------in foo catch [19]"); + } + finally + { + Console.WriteLine("-------------------in foo finally [19]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------------------in foo catch [18]"); + } + finally + { + Console.WriteLine("------------------in foo finally [18]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----------------in foo catch [17]"); + } + finally + { + Console.WriteLine("-----------------in foo finally [17]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----------------in foo catch [16]"); + } + finally + { + Console.WriteLine("----------------in foo finally [16]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---------------in foo catch [15]"); + } + finally + { + Console.WriteLine("---------------in foo finally [15]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--------------in foo catch [14]"); + } + finally + { + Console.WriteLine("--------------in foo finally [14]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------------in foo catch [13]"); + } + finally + { + Console.WriteLine("-------------in foo finally [13]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------------in foo catch [12]"); + } + finally + { + Console.WriteLine("------------in foo finally [12]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----------in foo catch [11]"); + } + finally + { + Console.WriteLine("-----------in foo finally [11]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----------in foo catch [10]"); + } + finally + { + Console.WriteLine("----------in foo finally [10]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---------in foo catch [9]"); + } + finally + { + Console.WriteLine("---------in foo finally [9]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--------in foo catch [8]"); + } + finally + { + Console.WriteLine("--------in foo finally [8]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-------in foo catch [7]"); + } + finally + { + Console.WriteLine("-------in foo finally [7]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("------in foo catch [6]"); + } + finally + { + Console.WriteLine("------in foo finally [6]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-----in foo catch [5]"); + } + finally + { + Console.WriteLine("-----in foo finally [5]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("----in foo catch [4]"); + } + finally + { + Console.WriteLine("----in foo finally [4]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("---in foo catch [3]"); + } + finally + { + Console.WriteLine("---in foo finally [3]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("--in foo catch [2]"); + } + finally + { + Console.WriteLine("--in foo finally [2]"); + if (i == 0) throw new Exception(); + } + } + catch + { + Console.WriteLine("-in foo catch [1]"); + } + finally + { + Console.WriteLine("-in foo finally [1]"); + if (i == 0) throw new Exception(); + } + Console.WriteLine("after finally"); + L1: + Console.WriteLine("foo L1"); + } + + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + int i = Environment.TickCount != 0 ? 0 : 1; + try + { + Console.WriteLine("in main try"); + foo(i); + } + catch + { + Console.WriteLine("in main catch"); + } + + //Stop recording + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_d.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_d.csproj new file mode 100644 index 0000000..b11c60f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_do.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_do.csproj new file mode 100644 index 0000000..7646119 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_r.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_r.csproj new file mode 100644 index 0000000..3895ce5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_ro.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_ro.csproj new file mode 100644 index 0000000..6fe978b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinally_50_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30.cs b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30.cs new file mode 100644 index 0000000..2608573 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30.cs @@ -0,0 +1,1425 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +// levels of nesting = 30 +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in main try"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("---------------------in foo try"); + expectedOut.WriteLine("----------------------in foo try"); + expectedOut.WriteLine("-----------------------in foo try"); + expectedOut.WriteLine("------------------------in foo try"); + expectedOut.WriteLine("-------------------------in foo try"); + expectedOut.WriteLine("--------------------------in foo try"); + expectedOut.WriteLine("---------------------------in foo try"); + expectedOut.WriteLine("----------------------------in foo try"); + expectedOut.WriteLine("-----------------------------in foo try"); + expectedOut.WriteLine("------------------------------in foo try"); + expectedOut.WriteLine("------------------------------in foo finally"); + expectedOut.WriteLine("------------------------------foo L30"); + expectedOut.WriteLine("-----------------------------in foo finally"); + expectedOut.WriteLine("------------------------------in foo try"); + expectedOut.WriteLine("------------------------------in foo finally"); + expectedOut.WriteLine("------------------------------throwing an exception [i = 0]"); + expectedOut.WriteLine("----------------------------in foo finally"); + expectedOut.WriteLine("-----------------------------in foo try"); + expectedOut.WriteLine("-----------------------------throwing an exception [i = 0]"); + expectedOut.WriteLine("-----------------------------in foo catch"); + expectedOut.WriteLine("-----------------------------in foo finally"); + expectedOut.WriteLine("-----------------------------throwing an exception [i = 1]"); + expectedOut.WriteLine("---------------------------in foo finally"); + expectedOut.WriteLine("----------------------------in foo try"); + expectedOut.WriteLine("----------------------------throwing an exception [i = 1]"); + expectedOut.WriteLine("----------------------------in foo catch"); + expectedOut.WriteLine("----------------------------in foo finally"); + expectedOut.WriteLine("----------------------------throwing an exception [i = 2]"); + expectedOut.WriteLine("--------------------------in foo finally"); + expectedOut.WriteLine("---------------------------in foo try"); + expectedOut.WriteLine("---------------------------throwing an exception [i = 2]"); + expectedOut.WriteLine("---------------------------in foo catch"); + expectedOut.WriteLine("---------------------------in foo finally"); + expectedOut.WriteLine("---------------------------throwing an exception [i = 3]"); + expectedOut.WriteLine("-------------------------in foo finally"); + expectedOut.WriteLine("--------------------------in foo try"); + expectedOut.WriteLine("--------------------------throwing an exception [i = 3]"); + expectedOut.WriteLine("--------------------------in foo catch"); + expectedOut.WriteLine("--------------------------in foo finally"); + expectedOut.WriteLine("--------------------------throwing an exception [i = 4]"); + expectedOut.WriteLine("------------------------in foo finally"); + expectedOut.WriteLine("-------------------------in foo try"); + expectedOut.WriteLine("-------------------------throwing an exception [i = 4]"); + expectedOut.WriteLine("-------------------------in foo catch"); + expectedOut.WriteLine("-------------------------in foo finally"); + expectedOut.WriteLine("-------------------------throwing an exception [i = 5]"); + expectedOut.WriteLine("-----------------------in foo finally"); + expectedOut.WriteLine("------------------------in foo try"); + expectedOut.WriteLine("------------------------throwing an exception [i = 5]"); + expectedOut.WriteLine("------------------------in foo catch"); + expectedOut.WriteLine("------------------------in foo finally"); + expectedOut.WriteLine("------------------------throwing an exception [i = 6]"); + expectedOut.WriteLine("----------------------in foo finally"); + expectedOut.WriteLine("-----------------------in foo try"); + expectedOut.WriteLine("-----------------------throwing an exception [i = 6]"); + expectedOut.WriteLine("-----------------------in foo catch"); + expectedOut.WriteLine("-----------------------in foo finally"); + expectedOut.WriteLine("-----------------------throwing an exception [i = 7]"); + expectedOut.WriteLine("---------------------in foo finally"); + expectedOut.WriteLine("----------------------in foo try"); + expectedOut.WriteLine("----------------------throwing an exception [i = 7]"); + expectedOut.WriteLine("----------------------in foo catch"); + expectedOut.WriteLine("----------------------in foo finally"); + expectedOut.WriteLine("----------------------throwing an exception [i = 8]"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("---------------------in foo try"); + expectedOut.WriteLine("---------------------throwing an exception [i = 8]"); + expectedOut.WriteLine("---------------------in foo catch"); + expectedOut.WriteLine("---------------------in foo finally"); + expectedOut.WriteLine("---------------------throwing an exception [i = 9]"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------throwing an exception [i = 9]"); + expectedOut.WriteLine("--------------------in foo catch"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("--------------------throwing an exception [i = 10]"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("-------------------throwing an exception [i = 10]"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("-------------------throwing an exception [i = 11]"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("------------------throwing an exception [i = 11]"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("------------------throwing an exception [i = 12]"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("-----------------throwing an exception [i = 12]"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("-----------------throwing an exception [i = 13]"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("----------------throwing an exception [i = 13]"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("----------------throwing an exception [i = 14]"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("---------------throwing an exception [i = 14]"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("---------------throwing an exception [i = 15]"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("--------------throwing an exception [i = 15]"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("--------------throwing an exception [i = 16]"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("-------------throwing an exception [i = 16]"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("-------------throwing an exception [i = 17]"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("------------throwing an exception [i = 17]"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("------------throwing an exception [i = 18]"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("-----------throwing an exception [i = 18]"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("-----------throwing an exception [i = 19]"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("----------throwing an exception [i = 19]"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("----------throwing an exception [i = 20]"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("---------throwing an exception [i = 20]"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("---------throwing an exception [i = 21]"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("--------throwing an exception [i = 21]"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("--------throwing an exception [i = 22]"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("-------throwing an exception [i = 22]"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("-------throwing an exception [i = 23]"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("------throwing an exception [i = 23]"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("------throwing an exception [i = 24]"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("-----throwing an exception [i = 24]"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("-----throwing an exception [i = 25]"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("----throwing an exception [i = 25]"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("----throwing an exception [i = 26]"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("---throwing an exception [i = 26]"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("---throwing an exception [i = 27]"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("--throwing an exception [i = 27]"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("--throwing an exception [i = 28]"); + expectedOut.WriteLine("in main catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void foo(int i) + { + try + { + Console.WriteLine("-in foo try"); + try + { + Console.WriteLine("--in foo try"); + try + { + Console.WriteLine("---in foo try"); + try + { + Console.WriteLine("----in foo try"); + try + { + Console.WriteLine("-----in foo try"); + try + { + Console.WriteLine("------in foo try"); + try + { + Console.WriteLine("-------in foo try"); + try + { + Console.WriteLine("--------in foo try"); + try + { + Console.WriteLine("---------in foo try"); + try + { + Console.WriteLine("----------in foo try"); + try + { + Console.WriteLine("-----------in foo try"); + try + { + Console.WriteLine("------------in foo try"); + try + { + Console.WriteLine("-------------in foo try"); + try + { + Console.WriteLine("--------------in foo try"); + try + { + Console.WriteLine("---------------in foo try"); + try + { + Console.WriteLine("----------------in foo try"); + try + { + Console.WriteLine("-----------------in foo try"); + try + { + Console.WriteLine("------------------in foo try"); + try + { + Console.WriteLine("-------------------in foo try"); + try + { + Console.WriteLine("--------------------in foo try"); + try + { + Console.WriteLine("---------------------in foo try"); + try + { + Console.WriteLine("----------------------in foo try"); + try + { + Console.WriteLine("-----------------------in foo try"); + try + { + Console.WriteLine("------------------------in foo try"); + try + { + Console.WriteLine("-------------------------in foo try"); + try + { + Console.WriteLine("--------------------------in foo try"); + try + { + Console.WriteLine("---------------------------in foo try"); + try + { + Console.WriteLine("----------------------------in foo try"); + try + { + Console.WriteLine("-----------------------------in foo try"); + try + { + Console.WriteLine("------------------------------in foo try"); + goto L30; + } + finally + { + Console.WriteLine("------------------------------in foo finally"); + } + L30: + Console.WriteLine("------------------------------foo L30"); + goto L29; + } + finally + { + Console.WriteLine("-----------------------------in foo finally"); + try + { + Console.WriteLine("------------------------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("------------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L29A; + } + } + catch + { + Console.WriteLine("------------------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("------------------------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("------------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L29A: + Console.WriteLine("------------------------------foo L29A"); + } + L29: + Console.WriteLine("-----------------------------foo L29"); + goto L28; + } + finally + { + Console.WriteLine("----------------------------in foo finally"); + try + { + Console.WriteLine("-----------------------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-----------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L28A; + } + } + catch + { + Console.WriteLine("-----------------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-----------------------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-----------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L28A: + Console.WriteLine("-----------------------------foo L28A"); + } + L28: + Console.WriteLine("----------------------------foo L28"); + goto L27; + } + finally + { + Console.WriteLine("---------------------------in foo finally"); + try + { + Console.WriteLine("----------------------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("----------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L27A; + } + } + catch + { + Console.WriteLine("----------------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("----------------------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("----------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L27A: + Console.WriteLine("----------------------------foo L27A"); + } + L27: + Console.WriteLine("---------------------------foo L27"); + goto L26; + } + finally + { + Console.WriteLine("--------------------------in foo finally"); + try + { + Console.WriteLine("---------------------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("---------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L26A; + } + } + catch + { + Console.WriteLine("---------------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("---------------------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("---------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L26A: + Console.WriteLine("---------------------------foo L26A"); + } + L26: + Console.WriteLine("--------------------------foo L26"); + goto L25; + } + finally + { + Console.WriteLine("-------------------------in foo finally"); + try + { + Console.WriteLine("--------------------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("--------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L25A; + } + } + catch + { + Console.WriteLine("--------------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("--------------------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("--------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L25A: + Console.WriteLine("--------------------------foo L25A"); + } + L25: + Console.WriteLine("-------------------------foo L25"); + goto L24; + } + finally + { + Console.WriteLine("------------------------in foo finally"); + try + { + Console.WriteLine("-------------------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L24A; + } + } + catch + { + Console.WriteLine("-------------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-------------------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L24A: + Console.WriteLine("-------------------------foo L24A"); + } + L24: + Console.WriteLine("------------------------foo L24"); + goto L23; + } + finally + { + Console.WriteLine("-----------------------in foo finally"); + try + { + Console.WriteLine("------------------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L23A; + } + } + catch + { + Console.WriteLine("------------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("------------------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("------------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L23A: + Console.WriteLine("------------------------foo L23A"); + } + L23: + Console.WriteLine("-----------------------foo L23"); + goto L22; + } + finally + { + Console.WriteLine("----------------------in foo finally"); + try + { + Console.WriteLine("-----------------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-----------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L22A; + } + } + catch + { + Console.WriteLine("-----------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-----------------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-----------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L22A: + Console.WriteLine("-----------------------foo L22A"); + } + L22: + Console.WriteLine("----------------------foo L22"); + goto L21; + } + finally + { + Console.WriteLine("---------------------in foo finally"); + try + { + Console.WriteLine("----------------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("----------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L21A; + } + } + catch + { + Console.WriteLine("----------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("----------------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("----------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L21A: + Console.WriteLine("----------------------foo L21A"); + } + L21: + Console.WriteLine("---------------------foo L21"); + goto L20; + } + finally + { + Console.WriteLine("--------------------in foo finally"); + try + { + Console.WriteLine("---------------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("---------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L20A; + } + } + catch + { + Console.WriteLine("---------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("---------------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("---------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L20A: + Console.WriteLine("---------------------foo L20A"); + } + L20: + Console.WriteLine("--------------------foo L20"); + goto L19; + } + finally + { + Console.WriteLine("-------------------in foo finally"); + try + { + Console.WriteLine("--------------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("--------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L19A; + } + } + catch + { + Console.WriteLine("--------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("--------------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("--------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L19A: + Console.WriteLine("--------------------foo L19A"); + } + L19: + Console.WriteLine("-------------------foo L19"); + goto L18; + } + finally + { + Console.WriteLine("------------------in foo finally"); + try + { + Console.WriteLine("-------------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L18A; + } + } + catch + { + Console.WriteLine("-------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-------------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L18A: + Console.WriteLine("-------------------foo L18A"); + } + L18: + Console.WriteLine("------------------foo L18"); + goto L17; + } + finally + { + Console.WriteLine("-----------------in foo finally"); + try + { + Console.WriteLine("------------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L17A; + } + } + catch + { + Console.WriteLine("------------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("------------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("------------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L17A: + Console.WriteLine("------------------foo L17A"); + } + L17: + Console.WriteLine("-----------------foo L17"); + goto L16; + } + finally + { + Console.WriteLine("----------------in foo finally"); + try + { + Console.WriteLine("-----------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-----------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L16A; + } + } + catch + { + Console.WriteLine("-----------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-----------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-----------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L16A: + Console.WriteLine("-----------------foo L16A"); + } + L16: + Console.WriteLine("----------------foo L16"); + goto L15; + } + finally + { + Console.WriteLine("---------------in foo finally"); + try + { + Console.WriteLine("----------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("----------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L15A; + } + } + catch + { + Console.WriteLine("----------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("----------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("----------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L15A: + Console.WriteLine("----------------foo L15A"); + } + L15: + Console.WriteLine("---------------foo L15"); + goto L14; + } + finally + { + Console.WriteLine("--------------in foo finally"); + try + { + Console.WriteLine("---------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("---------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L14A; + } + } + catch + { + Console.WriteLine("---------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("---------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("---------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L14A: + Console.WriteLine("---------------foo L14A"); + } + L14: + Console.WriteLine("--------------foo L14"); + goto L13; + } + finally + { + Console.WriteLine("-------------in foo finally"); + try + { + Console.WriteLine("--------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("--------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L13A; + } + } + catch + { + Console.WriteLine("--------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("--------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("--------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L13A: + Console.WriteLine("--------------foo L13A"); + } + L13: + Console.WriteLine("-------------foo L13"); + goto L12; + } + finally + { + Console.WriteLine("------------in foo finally"); + try + { + Console.WriteLine("-------------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L12A; + } + } + catch + { + Console.WriteLine("-------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-------------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L12A: + Console.WriteLine("-------------foo L12A"); + } + L12: + Console.WriteLine("------------foo L12"); + goto L11; + } + finally + { + Console.WriteLine("-----------in foo finally"); + try + { + Console.WriteLine("------------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L11A; + } + } + catch + { + Console.WriteLine("------------in foo catch"); + i++; + } + finally + { + Console.WriteLine("------------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("------------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L11A: + Console.WriteLine("------------foo L11A"); + } + L11: + Console.WriteLine("-----------foo L11"); + goto L10; + } + finally + { + Console.WriteLine("----------in foo finally"); + try + { + Console.WriteLine("-----------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-----------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L10A; + } + } + catch + { + Console.WriteLine("-----------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-----------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-----------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L10A: + Console.WriteLine("-----------foo L10A"); + } + L10: + Console.WriteLine("----------foo L10"); + goto L9; + } + finally + { + Console.WriteLine("---------in foo finally"); + try + { + Console.WriteLine("----------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("----------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L9A; + } + } + catch + { + Console.WriteLine("----------in foo catch"); + i++; + } + finally + { + Console.WriteLine("----------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("----------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L9A: + Console.WriteLine("----------foo L9A"); + } + L9: + Console.WriteLine("---------foo L9"); + goto L8; + } + finally + { + Console.WriteLine("--------in foo finally"); + try + { + Console.WriteLine("---------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("---------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L8A; + } + } + catch + { + Console.WriteLine("---------in foo catch"); + i++; + } + finally + { + Console.WriteLine("---------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("---------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L8A: + Console.WriteLine("---------foo L8A"); + } + L8: + Console.WriteLine("--------foo L8"); + goto L7; + } + finally + { + Console.WriteLine("-------in foo finally"); + try + { + Console.WriteLine("--------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("--------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L7A; + } + } + catch + { + Console.WriteLine("--------in foo catch"); + i++; + } + finally + { + Console.WriteLine("--------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("--------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L7A: + Console.WriteLine("--------foo L7A"); + } + L7: + Console.WriteLine("-------foo L7"); + goto L6; + } + finally + { + Console.WriteLine("------in foo finally"); + try + { + Console.WriteLine("-------in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L6A; + } + } + catch + { + Console.WriteLine("-------in foo catch"); + i++; + } + finally + { + Console.WriteLine("-------in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L6A: + Console.WriteLine("-------foo L6A"); + } + L6: + Console.WriteLine("------foo L6"); + goto L5; + } + finally + { + Console.WriteLine("-----in foo finally"); + try + { + Console.WriteLine("------in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("------throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L5A; + } + } + catch + { + Console.WriteLine("------in foo catch"); + i++; + } + finally + { + Console.WriteLine("------in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("------throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L5A: + Console.WriteLine("------foo L5A"); + } + L5: + Console.WriteLine("-----foo L5"); + goto L4; + } + finally + { + Console.WriteLine("----in foo finally"); + try + { + Console.WriteLine("-----in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("-----throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L4A; + } + } + catch + { + Console.WriteLine("-----in foo catch"); + i++; + } + finally + { + Console.WriteLine("-----in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("-----throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L4A: + Console.WriteLine("-----foo L4A"); + } + L4: + Console.WriteLine("----foo L4"); + goto L3; + } + finally + { + Console.WriteLine("---in foo finally"); + try + { + Console.WriteLine("----in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("----throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L3A; + } + } + catch + { + Console.WriteLine("----in foo catch"); + i++; + } + finally + { + Console.WriteLine("----in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("----throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L3A: + Console.WriteLine("----foo L3A"); + } + L3: + Console.WriteLine("---foo L3"); + goto L2; + } + finally + { + Console.WriteLine("--in foo finally"); + try + { + Console.WriteLine("---in foo try"); + if (i % 2 == 0) + { + Console.WriteLine("---throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L2A; + } + } + catch + { + Console.WriteLine("---in foo catch"); + i++; + } + finally + { + Console.WriteLine("---in foo finally"); + if (i % 2 == 1) + { + Console.WriteLine("---throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L2A: + Console.WriteLine("---foo L2A"); + } + L2: + Console.WriteLine("--foo L2"); + goto L1; + } + finally + { + Console.WriteLine("-in foo finally"); + try + { + Console.WriteLine("--in foo try"); + if (i % 2 == 1) + { + Console.WriteLine("--throwing an exception [i = {0}]", i); + throw new Exception(); + } + else + { + goto L1A; + } + } + catch + { + Console.WriteLine("--in foo catch"); + i++; + } + finally + { + Console.WriteLine("--in foo finally"); + if (i % 2 == 0) + { + Console.WriteLine("--throwing an exception [i = {0}]", i); + throw new Exception(); + } + } + L1A: + Console.WriteLine("--foo L1A"); + } + L1: + Console.WriteLine("-foo L1"); + } + + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + int i = Environment.TickCount != 0 ? 0 : 1; + try + { + Console.WriteLine("in main try"); + foo(i); + } + catch + { + Console.WriteLine("in main catch"); + } + + //Stop recording + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_d.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_d.csproj new file mode 100644 index 0000000..ac4bf6f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_do.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_do.csproj new file mode 100644 index 0000000..79732b8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_r.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_r.csproj new file mode 100644 index 0000000..fa3fb53 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_ro.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_ro.csproj new file mode 100644 index 0000000..b2fbd58 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallynestedintry_30_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20.cs b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20.cs new file mode 100644 index 0000000..757d34f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20.cs @@ -0,0 +1,1655 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +// levels of nesting = 20 +class Class1 +{ + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in main try"); + expectedOut.WriteLine("in foo i = 0"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("in foo i = 1"); + expectedOut.WriteLine("-in foo try"); + expectedOut.WriteLine("--in foo try"); + expectedOut.WriteLine("---in foo try"); + expectedOut.WriteLine("----in foo try"); + expectedOut.WriteLine("-----in foo try"); + expectedOut.WriteLine("------in foo try"); + expectedOut.WriteLine("-------in foo try"); + expectedOut.WriteLine("--------in foo try"); + expectedOut.WriteLine("---------in foo try"); + expectedOut.WriteLine("----------in foo try"); + expectedOut.WriteLine("-----------in foo try"); + expectedOut.WriteLine("------------in foo try"); + expectedOut.WriteLine("-------------in foo try"); + expectedOut.WriteLine("--------------in foo try"); + expectedOut.WriteLine("---------------in foo try"); + expectedOut.WriteLine("----------------in foo try"); + expectedOut.WriteLine("-----------------in foo try"); + expectedOut.WriteLine("------------------in foo try"); + expectedOut.WriteLine("-------------------in foo try"); + expectedOut.WriteLine("--------------------in foo try"); + expectedOut.WriteLine("--------------------in foo finally"); + expectedOut.WriteLine("-------------------in foo catch"); + expectedOut.WriteLine("-------------------in foo finally"); + expectedOut.WriteLine("------------------in foo catch"); + expectedOut.WriteLine("------------------in foo finally"); + expectedOut.WriteLine("-----------------in foo catch"); + expectedOut.WriteLine("-----------------in foo finally"); + expectedOut.WriteLine("----------------in foo catch"); + expectedOut.WriteLine("----------------in foo finally"); + expectedOut.WriteLine("---------------in foo catch"); + expectedOut.WriteLine("---------------in foo finally"); + expectedOut.WriteLine("--------------in foo catch"); + expectedOut.WriteLine("--------------in foo finally"); + expectedOut.WriteLine("-------------in foo catch"); + expectedOut.WriteLine("-------------in foo finally"); + expectedOut.WriteLine("------------in foo catch"); + expectedOut.WriteLine("------------in foo finally"); + expectedOut.WriteLine("-----------in foo catch"); + expectedOut.WriteLine("-----------in foo finally"); + expectedOut.WriteLine("----------in foo catch"); + expectedOut.WriteLine("----------in foo finally"); + expectedOut.WriteLine("---------in foo catch"); + expectedOut.WriteLine("---------in foo finally"); + expectedOut.WriteLine("--------in foo catch"); + expectedOut.WriteLine("--------in foo finally"); + expectedOut.WriteLine("-------in foo catch"); + expectedOut.WriteLine("-------in foo finally"); + expectedOut.WriteLine("------in foo catch"); + expectedOut.WriteLine("------in foo finally"); + expectedOut.WriteLine("-----in foo catch"); + expectedOut.WriteLine("-----in foo finally"); + expectedOut.WriteLine("----in foo catch"); + expectedOut.WriteLine("----in foo finally"); + expectedOut.WriteLine("---in foo catch"); + expectedOut.WriteLine("---in foo finally"); + expectedOut.WriteLine("--in foo catch"); + expectedOut.WriteLine("--in foo finally"); + expectedOut.WriteLine("-in foo catch"); + expectedOut.WriteLine("-in foo finally"); + expectedOut.WriteLine("in main catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void foo(int i) + { + if (i > 1) return; + Console.WriteLine("in foo i = {0}", i); + int j = 0; + int k = 0; + try + { + Console.WriteLine("-in foo try"); + try + { + Console.WriteLine("--in foo try"); + try + { + Console.WriteLine("---in foo try"); + try + { + Console.WriteLine("----in foo try"); + try + { + Console.WriteLine("-----in foo try"); + try + { + Console.WriteLine("------in foo try"); + try + { + Console.WriteLine("-------in foo try"); + try + { + Console.WriteLine("--------in foo try"); + try + { + Console.WriteLine("---------in foo try"); + try + { + Console.WriteLine("----------in foo try"); + try + { + Console.WriteLine("-----------in foo try"); + try + { + Console.WriteLine("------------in foo try"); + try + { + Console.WriteLine("-------------in foo try"); + try + { + Console.WriteLine("--------------in foo try"); + try + { + Console.WriteLine("---------------in foo try"); + try + { + Console.WriteLine("----------------in foo try"); + try + { + Console.WriteLine("-----------------in foo try"); + try + { + Console.WriteLine("------------------in foo try"); + try + { + Console.WriteLine("-------------------in foo try"); + try + { + Console.WriteLine("--------------------in foo try"); + goto L20; + } + catch + { + Console.WriteLine("--------------------in foo catch"); + } + finally + { + Console.WriteLine("--------------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L20: + goto L19; + } + catch + { + Console.WriteLine("-------------------in foo catch"); + } + finally + { + Console.WriteLine("-------------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L19: + goto L18; + } + catch + { + Console.WriteLine("------------------in foo catch"); + } + finally + { + Console.WriteLine("------------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L18: + goto L17; + } + catch + { + Console.WriteLine("-----------------in foo catch"); + } + finally + { + Console.WriteLine("-----------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L17: + goto L16; + } + catch + { + Console.WriteLine("----------------in foo catch"); + } + finally + { + Console.WriteLine("----------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L16: + goto L15; + } + catch + { + Console.WriteLine("---------------in foo catch"); + } + finally + { + Console.WriteLine("---------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L15: + goto L14; + } + catch + { + Console.WriteLine("--------------in foo catch"); + } + finally + { + Console.WriteLine("--------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L14: + goto L13; + } + catch + { + Console.WriteLine("-------------in foo catch"); + } + finally + { + Console.WriteLine("-------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L13: + goto L12; + } + catch + { + Console.WriteLine("------------in foo catch"); + } + finally + { + Console.WriteLine("------------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L12: + goto L11; + } + catch + { + Console.WriteLine("-----------in foo catch"); + } + finally + { + Console.WriteLine("-----------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L11: + goto L10; + } + catch + { + Console.WriteLine("----------in foo catch"); + } + finally + { + Console.WriteLine("----------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L10: + goto L9; + } + catch + { + Console.WriteLine("---------in foo catch"); + } + finally + { + Console.WriteLine("---------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L9: + goto L8; + } + catch + { + Console.WriteLine("--------in foo catch"); + } + finally + { + Console.WriteLine("--------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L8: + goto L7; + } + catch + { + Console.WriteLine("-------in foo catch"); + } + finally + { + Console.WriteLine("-------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L7: + goto L6; + } + catch + { + Console.WriteLine("------in foo catch"); + } + finally + { + Console.WriteLine("------in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L6: + goto L5; + } + catch + { + Console.WriteLine("-----in foo catch"); + } + finally + { + Console.WriteLine("-----in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L5: + goto L4; + } + catch + { + Console.WriteLine("----in foo catch"); + } + finally + { + Console.WriteLine("----in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L4: + goto L3; + } + catch + { + Console.WriteLine("---in foo catch"); + } + finally + { + Console.WriteLine("---in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L3: + goto L2; + } + catch + { + Console.WriteLine("--in foo catch"); + } + finally + { + Console.WriteLine("--in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L2: + goto L1; + } + catch + { + Console.WriteLine("-in foo catch"); + } + finally + { + Console.WriteLine("-in foo finally"); + foo(i + 1); + j = 1 / i; + k = 1 / (j - 1); + } + L1: + foo(i + 1); + } + + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + int i = Environment.TickCount != 0 ? 0 : 1; + try + { + Console.WriteLine("in main try"); + foo(i); + } + catch + { + Console.WriteLine("in main catch"); + } + + //Stop recording + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_d.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_d.csproj new file mode 100644 index 0000000..a9d39aa --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_do.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_do.csproj new file mode 100644 index 0000000..9381cd5 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_r.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_r.csproj new file mode 100644 index 0000000..bbb2dd8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_ro.csproj b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_ro.csproj new file mode 100644 index 0000000..fcf4d35 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/nested/nonlocalexit/throwinfinallyrecursive_20_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/122239/app.config b/tests/src/JIT/Methodical/eh/regress/asurt/122239/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/122239/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.cs b/tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.cs new file mode 100644 index 0000000..247bda2 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace test +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("try 1"); + expectedOut.WriteLine("\ttry 1.1"); + expectedOut.WriteLine("\tfinally 1.1"); + expectedOut.WriteLine("\t\tThrowing an exception here"); + expectedOut.WriteLine("catch 1"); + expectedOut.WriteLine("finally 1"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + [STAThread] + static int Main(string[] args) + { + int[] array = { 1, 2, 3, 4, 5, 6 }; + + //Start recording + testLog.StartRecording(); + try + { + Console.WriteLine("try 1"); + try + { + Console.WriteLine("\ttry 1.1"); + } + finally + { + Console.WriteLine("\tfinally 1.1"); + Console.WriteLine("\t\tThrowing an exception here"); + Console.WriteLine(array[array.Length]); + try + { + } + finally + { + } + } + } + catch (IndexOutOfRangeException) + { + Console.WriteLine("catch 1"); + } + finally + { + Console.WriteLine("finally 1"); + } + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.csproj new file mode 100644 index 0000000..704de06 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/122239/outermostFinally.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/140713/app.config b/tests/src/JIT/Methodical/eh/regress/asurt/140713/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/140713/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally.cs b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally.cs new file mode 100644 index 0000000..5eb4a70 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace test +{ + + class Class1 + { + + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine(" try 1"); + expectedOut.WriteLine("\t try 1.1"); + expectedOut.WriteLine("\t finally 1.1"); + expectedOut.WriteLine("\t\t try 1.1.1"); + expectedOut.WriteLine("\t\t Throwing an exception here!"); + expectedOut.WriteLine("\t\t finally 1.1.1"); + expectedOut.WriteLine(" catch 1"); + expectedOut.WriteLine(" finally 1"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + static int Main(string[] args) + { + int x = 7, y = 0, z; + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine(" try 1"); + try + { + Console.WriteLine("\t try 1.1"); + } + finally + { + Console.WriteLine("\t finally 1.1"); + try + { + Console.WriteLine("\t\t try 1.1.1"); + Console.WriteLine("\t\t Throwing an exception here!"); + z = x / y; + } + finally + { + Console.WriteLine("\t\t finally 1.1.1"); + } + } + } + catch (Exception) + { + Console.WriteLine(" catch 1"); + } + finally + { + Console.WriteLine(" finally 1"); + } + // stop recoding + testLog.StopRecording(); + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_d.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_d.csproj new file mode 100644 index 0000000..5ff923e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_do.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_do.csproj new file mode 100644 index 0000000..4e37083 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_r.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_r.csproj new file mode 100644 index 0000000..0ac4c3f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_ro.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_ro.csproj new file mode 100644 index 0000000..1b265a1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/140713/innerFinally_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/141358/app.config b/tests/src/JIT/Methodical/eh/regress/asurt/141358/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/141358/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException.cs b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException.cs new file mode 100644 index 0000000..0e9c89d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace test +{ + + class Class1 + { + + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine(" try 1"); + expectedOut.WriteLine("\t try 1.1"); + expectedOut.WriteLine("\t throwing an exception here!"); + expectedOut.WriteLine("\t catch 1.1"); + expectedOut.WriteLine("\t\t try 1.1.1"); + expectedOut.WriteLine("\t\t finally 1.1.1"); + expectedOut.WriteLine("\t throwing another exception here!"); + expectedOut.WriteLine(" catch 1"); + expectedOut.WriteLine(" finally 1"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + static int Main() + { + //Start recording + testLog.StartRecording(); + try + { + Console.WriteLine(" try 1"); + try + { + Console.WriteLine("\t try 1.1"); + Console.WriteLine("\t throwing an exception here!"); + throw new System.ArithmeticException("My ArithmeticException"); + } + catch (Exception) + { + Console.WriteLine("\t catch 1.1"); + goto inner_try; + throw_exception: + Console.WriteLine("\t throwing another exception here!"); + throw new System.ArithmeticException("My ArithmeticException"); + inner_try: + try + { + Console.WriteLine("\t\t try 1.1.1"); + } + finally + { + Console.WriteLine("\t\t finally 1.1.1"); + } + goto throw_exception; + } + } + catch (Exception) + { + Console.WriteLine(" catch 1"); + } + finally + { + Console.WriteLine(" finally 1"); + } + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_d.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_d.csproj new file mode 100644 index 0000000..3e2bac8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_do.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_do.csproj new file mode 100644 index 0000000..af2ab0a --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_r.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_r.csproj new file mode 100644 index 0000000..bbe288b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_ro.csproj b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_ro.csproj new file mode 100644 index 0000000..be31e5f --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/asurt/141358/uncaughtException_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/app.config b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.cs b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.cs new file mode 100644 index 0000000..d9144a8 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Test +{ + private static TestUtil.TestLog testLog; + static Test() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in the try block"); + expectedOut.WriteLine("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {20} {21} {22} {23} {24} {25} {26} {27} {28} {29} {30} {31} {32} ", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33); + expectedOut.WriteLine("Expected Test Exception"); + expectedOut.WriteLine("in catch now"); + expectedOut.WriteLine("in finally now"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + public static int bar(int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14, int i15, int i16, int i17, int i18, int i19, int i20, int i21, int i22, int i23, int i24, int i25, int i26, int i27, int i28, int i29, int i30, int i31, int i32, int i33) + { + Console.WriteLine("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {20} {21} {22} {23} {24} {25} {26} {27} {28} {29} {30} {31} {32} ", i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33); + if (i1 != 1) { Console.WriteLine("Test for i1 failed"); return -1; } + + if (i2 != 2) { Console.WriteLine("Test for i2 failed"); return -1; } + + if (i3 != 3) { Console.WriteLine("Test for i3 failed"); return -1; } + + if (i4 != 4) { Console.WriteLine("Test for i4 failed"); return -1; } + + if (i5 != 5) { Console.WriteLine("Test for i5 failed"); return -1; } + + if (i6 != 6) { Console.WriteLine("Test for i6 failed"); return -1; } + + if (i7 != 7) { Console.WriteLine("Test for i7 failed"); return -1; } + + if (i8 != 8) { Console.WriteLine("Test for i8 failed"); return -1; } + + if (i9 != 9) { Console.WriteLine("Test for i9 failed"); return -1; } + + if (i10 != 10) { Console.WriteLine("Test for i10 failed"); return -1; } + + if (i11 != 11) { Console.WriteLine("Test for i11 failed"); return -1; } + + if (i12 != 12) { Console.WriteLine("Test for i12 failed"); return -1; } + + if (i13 != 13) { Console.WriteLine("Test for i13 failed"); return -1; } + + if (i14 != 14) { Console.WriteLine("Test for i14 failed"); return -1; } + + if (i15 != 15) { Console.WriteLine("Test for i15 failed"); return -1; } + + if (i16 != 16) { Console.WriteLine("Test for i16 failed"); return -1; } + + if (i17 != 17) { Console.WriteLine("Test for i17 failed"); return -1; } + + if (i18 != 18) { Console.WriteLine("Test for i18 failed"); return -1; } + + if (i19 != 19) { Console.WriteLine("Test for i19 failed"); return -1; } + + if (i20 != 20) { Console.WriteLine("Test for i20 failed"); return -1; } + + if (i21 != 21) { Console.WriteLine("Test for i21 failed"); return -1; } + + if (i22 != 22) { Console.WriteLine("Test for i22 failed"); return -1; } + + if (i23 != 23) { Console.WriteLine("Test for i23 failed"); return -1; } + + if (i24 != 24) { Console.WriteLine("Test for i24 failed"); return -1; } + + if (i25 != 25) { Console.WriteLine("Test for i25 failed"); return -1; } + + if (i26 != 26) { Console.WriteLine("Test for i26 failed"); return -1; } + + if (i27 != 27) { Console.WriteLine("Test for i27 failed"); return -1; } + + if (i28 != 28) { Console.WriteLine("Test for i28 failed"); return -1; } + + if (i29 != 29) { Console.WriteLine("Test for i29 failed"); return -1; } + + if (i30 != 30) { Console.WriteLine("Test for i30 failed"); return -1; } + + if (i31 != 31) { Console.WriteLine("Test for i31 failed"); return -1; } + + if (i32 != 32) { Console.WriteLine("Test for i32 failed"); return -1; } + + if (i33 != 33) { Console.WriteLine("Test for i33 failed"); return -1; } + + throw new System.Exception("Expected Test Exception"); + } + public static int foo() + { + int ret = 1; + + try + { + Console.WriteLine("in the try block"); + ret = bar(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + Console.WriteLine("in catch now"); + ret = 100; + } + finally + { + Console.WriteLine("in finally now"); + } + return ret; + } + public static int Main() + { + String s = "Test1"; + + testLog.StartRecording(); + try + { + if (100 != foo()) Console.WriteLine("foo() Failed"); + + if (s != "Test1") Console.WriteLine("s!=\"Test\" Failed"); + } + catch + { + Console.WriteLine("in catch"); + } + + // stop recoding + testLog.StopRecording(); + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.csproj b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.csproj new file mode 100644 index 0000000..9a28653 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.cs b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.cs new file mode 100644 index 0000000..bdd29fa --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Test +{ + private static TestUtil.TestLog testLog; + + static Test() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("in the try block"); + expectedOut.WriteLine("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {20} {21} {22} {23} {24} {25} {26} {27} {28} {29} {30} {31} {32} ", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33); + expectedOut.WriteLine("Expected Test Exception"); + expectedOut.WriteLine("in catch now"); + expectedOut.WriteLine("in finally now"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + public static int bar(String i1, String i2, String i3, String i4, String i5, String i6, String i7, String i8, String i9, String i10, String i11, String i12, String i13, String i14, String i15, String i16, String i17, String i18, String i19, String i20, String i21, String i22, String i23, String i24, String i25, String i26, String i27, String i28, String i29, String i30, String i31, String i32, String i33) + { + Console.WriteLine("{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {20} {21} {22} {23} {24} {25} {26} {27} {28} {29} {30} {31} {32} ", i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33); + if (i1 != "1") { Console.WriteLine("Test for i1 failed"); return -1; } + + if (i2 != "2") { Console.WriteLine("Test for i2 failed"); return -1; } + + if (i3 != "3") { Console.WriteLine("Test for i3 failed"); return -1; } + + if (i4 != "4") { Console.WriteLine("Test for i4 failed"); return -1; } + + if (i5 != "5") { Console.WriteLine("Test for i5 failed"); return -1; } + + if (i6 != "6") { Console.WriteLine("Test for i6 failed"); return -1; } + + if (i7 != "7") { Console.WriteLine("Test for i7 failed"); return -1; } + + if (i8 != "8") { Console.WriteLine("Test for i8 failed"); return -1; } + + if (i9 != "9") { Console.WriteLine("Test for i9 failed"); return -1; } + + if (i10 != "10") { Console.WriteLine("Test for i10 failed"); return -1; } + + if (i11 != "11") { Console.WriteLine("Test for i11 failed"); return -1; } + + if (i12 != "12") { Console.WriteLine("Test for i12 failed"); return -1; } + + if (i13 != "13") { Console.WriteLine("Test for i13 failed"); return -1; } + + if (i14 != "14") { Console.WriteLine("Test for i14 failed"); return -1; } + + if (i15 != "15") { Console.WriteLine("Test for i15 failed"); return -1; } + + if (i16 != "16") { Console.WriteLine("Test for i16 failed"); return -1; } + + if (i17 != "17") { Console.WriteLine("Test for i17 failed"); return -1; } + + if (i18 != "18") { Console.WriteLine("Test for i18 failed"); return -1; } + + if (i19 != "19") { Console.WriteLine("Test for i19 failed"); return -1; } + + if (i20 != "20") { Console.WriteLine("Test for i20 failed"); return -1; } + + if (i21 != "21") { Console.WriteLine("Test for i21 failed"); return -1; } + + if (i22 != "22") { Console.WriteLine("Test for i22 failed"); return -1; } + + if (i23 != "23") { Console.WriteLine("Test for i23 failed"); return -1; } + + if (i24 != "24") { Console.WriteLine("Test for i24 failed"); return -1; } + + if (i25 != "25") { Console.WriteLine("Test for i25 failed"); return -1; } + + if (i26 != "26") { Console.WriteLine("Test for i26 failed"); return -1; } + + if (i27 != "27") { Console.WriteLine("Test for i27 failed"); return -1; } + + if (i28 != "28") { Console.WriteLine("Test for i28 failed"); return -1; } + + if (i29 != "29") { Console.WriteLine("Test for i29 failed"); return -1; } + + if (i30 != "30") { Console.WriteLine("Test for i30 failed"); return -1; } + + if (i31 != "31") { Console.WriteLine("Test for i31 failed"); return -1; } + + if (i32 != "32") { Console.WriteLine("Test for i32 failed"); return -1; } + + if (i33 != "33") { Console.WriteLine("Test for i33 failed"); return -1; } + + + throw new System.Exception("Expected Test Exception"); + } + public static int foo() + { + int ret = 1; + + try + { + Console.WriteLine("in the try block"); + ret = bar("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33"); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + Console.WriteLine("in catch now"); + ret = 100; + } + finally + { + Console.WriteLine("in finally now"); + } + return ret; + } + public static int Main() + { + String s = "Test1"; + testLog.StartRecording(); + + + try + { + if (100 != foo()) Console.WriteLine("foo() Failed"); + if (s != "Test1") Console.WriteLine("s!=\"Test\" Failed"); + } + catch + { + Console.WriteLine("in catch"); + } + testLog.StopRecording(); + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.csproj b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.csproj new file mode 100644 index 0000000..7c1b338 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/regress/vswhidbey/148190/baduwinfo1.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/app.config b/tests/src/JIT/Methodical/eh/rethrow/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/rethrow/project.json b/tests/src/JIT/Methodical/eh/rethrow/project.json new file mode 100644 index 0000000..293a3bc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/project.json @@ -0,0 +1,12 @@ +{ + "dependencies": { + "System.IO": "4.0.10", + "System.Console": "4.0.0-beta-*", + "System.Runtime": "4.0.20-beta-*", + "System.Runtime.Extensions": "4.0.10-beta-*", + "System.Runtime.InteropServices": "4.0.10-beta-*" + }, + "frameworks": { + "dnxcore50": {} + } +} diff --git a/tests/src/JIT/Methodical/eh/rethrow/project.lock.json b/tests/src/JIT/Methodical/eh/rethrow/project.lock.json new file mode 100644 index 0000000..9eb9c16 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/project.lock.json @@ -0,0 +1,1241 @@ +{ + "locked": false, + "version": 2, + "targets": { + "DNXCore,Version=v5.0": { + "System.Console/4.0.0-beta-23516": { + "type": "package", + "dependencies": { + "System.IO": "4.0.0", + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet5.1/System.Console.dll": {} + } + }, + "System.IO/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20", + "System.Text.Encoding": "4.0.0", + "System.Threading.Tasks": "4.0.0" + }, + "compile": { + "ref/dotnet/System.IO.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.IO.dll": {} + } + }, + "System.Private.Uri/4.0.0-beta-23127": { + "type": "package", + "compile": { + "ref/dnxcore50/_._": {} + }, + "runtime": { + "lib/DNXCore50/System.Private.Uri.dll": {} + } + }, + "System.Reflection/4.0.0-beta-23127": { + "type": "package", + "dependencies": { + "System.IO": "4.0.0-beta-23127", + "System.Reflection.Primitives": "4.0.0-beta-23127", + "System.Runtime": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Reflection.dll": {} + } + }, + "System.Reflection.Primitives/4.0.0-beta-23127": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Reflection.Primitives.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Reflection.Primitives.dll": {} + } + }, + "System.Runtime/4.0.20-beta-23127": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.dll": {} + } + }, + "System.Runtime.Extensions/4.0.10-beta-23127": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Extensions.dll": {} + } + }, + "System.Runtime.InteropServices/4.0.10-beta-23127": { + "type": "package", + "dependencies": { + "System.Reflection": "4.0.0-beta-23127", + "System.Reflection.Primitives": "4.0.0-beta-23127", + "System.Runtime": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.InteropServices.dll": {} + } + }, + "System.Text.Encoding/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Text.Encoding.dll": {} + } + }, + "System.Threading.Tasks/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Threading.Tasks.dll": {} + } + } + }, + "DNXCore,Version=v5.0/win7-x86": { + "runtime.win7.System.Console/4.0.0-beta-23516": { + "type": "package", + "dependencies": { + "System.IO": "4.0.10", + "System.IO.FileSystem.Primitives": "4.0.0", + "System.Resources.ResourceManager": "4.0.0", + "System.Runtime": "4.0.20", + "System.Runtime.InteropServices": "4.0.20", + "System.Text.Encoding": "4.0.10", + "System.Text.Encoding.Extensions": "4.0.10", + "System.Threading": "4.0.10", + "System.Threading.Tasks": "4.0.10" + }, + "compile": { + "ref/dotnet/_._": {} + }, + "runtime": { + "runtimes/win7/lib/dotnet5.4/System.Console.dll": {} + } + }, + "System.Console/4.0.0-beta-23516": { + "type": "package", + "dependencies": { + "System.IO": "4.0.0", + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet5.1/System.Console.dll": {} + } + }, + "System.Globalization/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Globalization.dll": {} + } + }, + "System.IO/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20", + "System.Text.Encoding": "4.0.0", + "System.Threading.Tasks": "4.0.0" + }, + "compile": { + "ref/dotnet/System.IO.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.IO.dll": {} + } + }, + "System.IO.FileSystem.Primitives/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20" + }, + "compile": { + "ref/dotnet/System.IO.FileSystem.Primitives.dll": {} + }, + "runtime": { + "lib/dotnet/System.IO.FileSystem.Primitives.dll": {} + } + }, + "System.Private.Uri/4.0.0-beta-23127": { + "type": "package", + "compile": { + "ref/dnxcore50/_._": {} + }, + "runtime": { + "lib/DNXCore50/System.Private.Uri.dll": {} + } + }, + "System.Reflection/4.0.0": { + "type": "package", + "dependencies": { + "System.IO": "4.0.0", + "System.Reflection.Primitives": "4.0.0", + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Reflection.dll": {} + } + }, + "System.Reflection.Primitives/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Reflection.Primitives.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Reflection.Primitives.dll": {} + } + }, + "System.Resources.ResourceManager/4.0.0": { + "type": "package", + "dependencies": { + "System.Globalization": "4.0.0", + "System.Reflection": "4.0.0", + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Resources.ResourceManager.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Resources.ResourceManager.dll": {} + } + }, + "System.Runtime/4.0.20-beta-23127": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.dll": {} + } + }, + "System.Runtime.Extensions/4.0.10-beta-23127": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Extensions.dll": {} + } + }, + "System.Runtime.InteropServices/4.0.10-beta-23127": { + "type": "package", + "dependencies": { + "System.Reflection": "4.0.0-beta-23127", + "System.Reflection.Primitives": "4.0.0-beta-23127", + "System.Runtime": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.InteropServices.dll": {} + } + }, + "System.Text.Encoding/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Text.Encoding.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Text.Encoding.dll": {} + } + }, + "System.Text.Encoding.Extensions/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0", + "System.Text.Encoding": "4.0.10" + }, + "compile": { + "ref/dotnet/System.Text.Encoding.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Text.Encoding.Extensions.dll": {} + } + }, + "System.Threading/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0", + "System.Threading.Tasks": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Threading.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.dll": {} + } + }, + "System.Threading.Tasks/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Threading.Tasks.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.Tasks.dll": {} + } + } + }, + "DNXCore,Version=v5.0/win7-x64": { + "runtime.win7.System.Console/4.0.0-beta-23516": { + "type": "package", + "dependencies": { + "System.IO": "4.0.10", + "System.IO.FileSystem.Primitives": "4.0.0", + "System.Resources.ResourceManager": "4.0.0", + "System.Runtime": "4.0.20", + "System.Runtime.InteropServices": "4.0.20", + "System.Text.Encoding": "4.0.10", + "System.Text.Encoding.Extensions": "4.0.10", + "System.Threading": "4.0.10", + "System.Threading.Tasks": "4.0.10" + }, + "compile": { + "ref/dotnet/_._": {} + }, + "runtime": { + "runtimes/win7/lib/dotnet5.4/System.Console.dll": {} + } + }, + "System.Console/4.0.0-beta-23516": { + "type": "package", + "dependencies": { + "System.IO": "4.0.0", + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet5.1/System.Console.dll": {} + } + }, + "System.Globalization/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Globalization.dll": {} + } + }, + "System.IO/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20", + "System.Text.Encoding": "4.0.0", + "System.Threading.Tasks": "4.0.0" + }, + "compile": { + "ref/dotnet/System.IO.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.IO.dll": {} + } + }, + "System.IO.FileSystem.Primitives/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20" + }, + "compile": { + "ref/dotnet/System.IO.FileSystem.Primitives.dll": {} + }, + "runtime": { + "lib/dotnet/System.IO.FileSystem.Primitives.dll": {} + } + }, + "System.Private.Uri/4.0.0-beta-23127": { + "type": "package", + "compile": { + "ref/dnxcore50/_._": {} + }, + "runtime": { + "lib/DNXCore50/System.Private.Uri.dll": {} + } + }, + "System.Reflection/4.0.0": { + "type": "package", + "dependencies": { + "System.IO": "4.0.0", + "System.Reflection.Primitives": "4.0.0", + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Reflection.dll": {} + } + }, + "System.Reflection.Primitives/4.0.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Reflection.Primitives.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Reflection.Primitives.dll": {} + } + }, + "System.Resources.ResourceManager/4.0.0": { + "type": "package", + "dependencies": { + "System.Globalization": "4.0.0", + "System.Reflection": "4.0.0", + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Resources.ResourceManager.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Resources.ResourceManager.dll": {} + } + }, + "System.Runtime/4.0.20-beta-23127": { + "type": "package", + "dependencies": { + "System.Private.Uri": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.dll": {} + } + }, + "System.Runtime.Extensions/4.0.10-beta-23127": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.20-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Runtime.Extensions.dll": {} + } + }, + "System.Runtime.InteropServices/4.0.10-beta-23127": { + "type": "package", + "dependencies": { + "System.Reflection": "4.0.0-beta-23127", + "System.Reflection.Primitives": "4.0.0-beta-23127", + "System.Runtime": "4.0.0-beta-23127" + }, + "compile": { + "ref/dotnet/System.Runtime.InteropServices.dll": {} + } + }, + "System.Text.Encoding/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Text.Encoding.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Text.Encoding.dll": {} + } + }, + "System.Text.Encoding.Extensions/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0", + "System.Text.Encoding": "4.0.10" + }, + "compile": { + "ref/dotnet/System.Text.Encoding.Extensions.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Text.Encoding.Extensions.dll": {} + } + }, + "System.Threading/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0", + "System.Threading.Tasks": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Threading.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.dll": {} + } + }, + "System.Threading.Tasks/4.0.10": { + "type": "package", + "dependencies": { + "System.Runtime": "4.0.0" + }, + "compile": { + "ref/dotnet/System.Threading.Tasks.dll": {} + }, + "runtime": { + "lib/DNXCore50/System.Threading.Tasks.dll": {} + } + } + } + }, + "libraries": { + "runtime.win7.System.Console/4.0.0-beta-23516": { + "type": "package", + "serviceable": true, + "sha512": "TJZhrw44Bf7sYqne+CX5II/PaNf5L7oKVfl0FLkr4pj76KS8hSsJzsKL0IvxC+bi4d51+wTbv91kF1kgPyHMVw==", + "files": [ + "ref/dotnet/_._", + "runtime.win7.System.Console.4.0.0-beta-23516.nupkg", + "runtime.win7.System.Console.4.0.0-beta-23516.nupkg.sha512", + "runtime.win7.System.Console.nuspec", + "runtimes/win7/lib/dotnet5.4/System.Console.dll", + "runtimes/win7/lib/net/_._" + ] + }, + "System.Console/4.0.0-beta-23516": { + "type": "package", + "serviceable": true, + "sha512": "tzF4Dbbv+5bcbQ7GHuuKafkaDZThiUiwxqCc1ngewnMWZ5YmIgjQZjs+E1DNhoMVAvkH0tSmLJvsDlx9dFg+Aw==", + "files": [ + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Console.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet5.1/de/System.Console.xml", + "ref/dotnet5.1/es/System.Console.xml", + "ref/dotnet5.1/fr/System.Console.xml", + "ref/dotnet5.1/it/System.Console.xml", + "ref/dotnet5.1/ja/System.Console.xml", + "ref/dotnet5.1/ko/System.Console.xml", + "ref/dotnet5.1/ru/System.Console.xml", + "ref/dotnet5.1/System.Console.dll", + "ref/dotnet5.1/System.Console.xml", + "ref/dotnet5.1/zh-hans/System.Console.xml", + "ref/dotnet5.1/zh-hant/System.Console.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Console.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtime.json", + "System.Console.4.0.0-beta-23516.nupkg", + "System.Console.4.0.0-beta-23516.nupkg.sha512", + "System.Console.nuspec" + ] + }, + "System.Globalization/4.0.0": { + "type": "package", + "sha512": "IBJyTo1y7ZtzzoJUA60T1XPvNTyw/wfFmjFoBFtlYfkekIOtD/AzDDIg0YdUa7eNtFEfliED2R7HdppTdU4t5A==", + "files": [ + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "License.rtf", + "ref/dotnet/de/System.Globalization.xml", + "ref/dotnet/es/System.Globalization.xml", + "ref/dotnet/fr/System.Globalization.xml", + "ref/dotnet/it/System.Globalization.xml", + "ref/dotnet/ja/System.Globalization.xml", + "ref/dotnet/ko/System.Globalization.xml", + "ref/dotnet/ru/System.Globalization.xml", + "ref/dotnet/System.Globalization.dll", + "ref/dotnet/System.Globalization.xml", + "ref/dotnet/zh-hans/System.Globalization.xml", + "ref/dotnet/zh-hant/System.Globalization.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/de/System.Globalization.xml", + "ref/netcore50/es/System.Globalization.xml", + "ref/netcore50/fr/System.Globalization.xml", + "ref/netcore50/it/System.Globalization.xml", + "ref/netcore50/ja/System.Globalization.xml", + "ref/netcore50/ko/System.Globalization.xml", + "ref/netcore50/ru/System.Globalization.xml", + "ref/netcore50/System.Globalization.dll", + "ref/netcore50/System.Globalization.xml", + "ref/netcore50/zh-hans/System.Globalization.xml", + "ref/netcore50/zh-hant/System.Globalization.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "System.Globalization.4.0.0.nupkg", + "System.Globalization.4.0.0.nupkg.sha512", + "System.Globalization.nuspec" + ] + }, + "System.IO/4.0.10": { + "type": "package", + "serviceable": true, + "sha512": "kghf1CeYT+W2lw8a50/GxFz5HR9t6RkL4BvjxtTp1NxtEFWywnMA9W8FH/KYXiDNThcw9u/GOViDON4iJFGXIQ==", + "files": [ + "lib/DNXCore50/System.IO.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/netcore50/System.IO.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.IO.xml", + "ref/dotnet/es/System.IO.xml", + "ref/dotnet/fr/System.IO.xml", + "ref/dotnet/it/System.IO.xml", + "ref/dotnet/ja/System.IO.xml", + "ref/dotnet/ko/System.IO.xml", + "ref/dotnet/ru/System.IO.xml", + "ref/dotnet/System.IO.dll", + "ref/dotnet/System.IO.xml", + "ref/dotnet/zh-hans/System.IO.xml", + "ref/dotnet/zh-hant/System.IO.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtimes/win8-aot/lib/netcore50/System.IO.dll", + "System.IO.4.0.10.nupkg", + "System.IO.4.0.10.nupkg.sha512", + "System.IO.nuspec" + ] + }, + "System.IO.FileSystem.Primitives/4.0.0": { + "type": "package", + "serviceable": true, + "sha512": "7pJUvYi/Yq3A5nagqCCiOw3+aJp3xXc/Cjr8dnJDnER3/6kX3LEencfqmXUcPl9+7OvRNyPMNhqsLAcMK6K/KA==", + "files": [ + "lib/dotnet/System.IO.FileSystem.Primitives.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.IO.FileSystem.Primitives.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/es/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/fr/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/it/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/ja/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/ko/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/ru/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/System.IO.FileSystem.Primitives.dll", + "ref/dotnet/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/zh-hans/System.IO.FileSystem.Primitives.xml", + "ref/dotnet/zh-hant/System.IO.FileSystem.Primitives.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.IO.FileSystem.Primitives.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "System.IO.FileSystem.Primitives.4.0.0.nupkg", + "System.IO.FileSystem.Primitives.4.0.0.nupkg.sha512", + "System.IO.FileSystem.Primitives.nuspec" + ] + }, + "System.Private.Uri/4.0.0-beta-23127": { + "type": "package", + "serviceable": true, + "sha512": "KT9JGnTYRf51pwPluZtpewmdBPiROzemamLmpzgzl3Pu3Y0vmH2CBLZktngD4I4YPNFO6ieCupeM0X3R1u26kA==", + "files": [ + "lib/DNXCore50/System.Private.Uri.dll", + "lib/netcore50/System.Private.Uri.dll", + "ref/dnxcore50/_._", + "ref/netcore50/_._", + "runtimes/win8-aot/lib/netcore50/System.Private.Uri.dll", + "System.Private.Uri.4.0.0-beta-23127.nupkg", + "System.Private.Uri.4.0.0-beta-23127.nupkg.sha512", + "System.Private.Uri.nuspec" + ] + }, + "System.Reflection/4.0.0-beta-23127": { + "type": "package", + "sha512": "C2H07xfQjIbtyFuD5T/g0QYc8sE0rhq3lNpL/LUmlQ7jS8xTm2hxTOvYqyPbmf4pYtBRQ3fS7/8mwRexPdN1wA==", + "files": [ + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "License.rtf", + "ref/dotnet/de/System.Reflection.xml", + "ref/dotnet/es/System.Reflection.xml", + "ref/dotnet/fr/System.Reflection.xml", + "ref/dotnet/it/System.Reflection.xml", + "ref/dotnet/ja/System.Reflection.xml", + "ref/dotnet/ko/System.Reflection.xml", + "ref/dotnet/ru/System.Reflection.xml", + "ref/dotnet/System.Reflection.dll", + "ref/dotnet/System.Reflection.xml", + "ref/dotnet/zh-hans/System.Reflection.xml", + "ref/dotnet/zh-hant/System.Reflection.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/de/System.Reflection.xml", + "ref/netcore50/es/System.Reflection.xml", + "ref/netcore50/fr/System.Reflection.xml", + "ref/netcore50/it/System.Reflection.xml", + "ref/netcore50/ja/System.Reflection.xml", + "ref/netcore50/ko/System.Reflection.xml", + "ref/netcore50/ru/System.Reflection.xml", + "ref/netcore50/System.Reflection.dll", + "ref/netcore50/System.Reflection.xml", + "ref/netcore50/zh-hans/System.Reflection.xml", + "ref/netcore50/zh-hant/System.Reflection.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "System.Reflection.4.0.0-beta-23127.nupkg", + "System.Reflection.4.0.0-beta-23127.nupkg.sha512", + "System.Reflection.nuspec" + ] + }, + "System.Reflection/4.0.0": { + "type": "package", + "sha512": "g96Rn8XuG7y4VfxPj/jnXroRJdQ8L3iN3k3zqsuzk4k3Nq4KMXARYiIO4BLW4GwX06uQpuYwRMcAC/aF117knQ==", + "files": [ + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "License.rtf", + "ref/dotnet/de/System.Reflection.xml", + "ref/dotnet/es/System.Reflection.xml", + "ref/dotnet/fr/System.Reflection.xml", + "ref/dotnet/it/System.Reflection.xml", + "ref/dotnet/ja/System.Reflection.xml", + "ref/dotnet/ko/System.Reflection.xml", + "ref/dotnet/ru/System.Reflection.xml", + "ref/dotnet/System.Reflection.dll", + "ref/dotnet/System.Reflection.xml", + "ref/dotnet/zh-hans/System.Reflection.xml", + "ref/dotnet/zh-hant/System.Reflection.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/de/System.Reflection.xml", + "ref/netcore50/es/System.Reflection.xml", + "ref/netcore50/fr/System.Reflection.xml", + "ref/netcore50/it/System.Reflection.xml", + "ref/netcore50/ja/System.Reflection.xml", + "ref/netcore50/ko/System.Reflection.xml", + "ref/netcore50/ru/System.Reflection.xml", + "ref/netcore50/System.Reflection.dll", + "ref/netcore50/System.Reflection.xml", + "ref/netcore50/zh-hans/System.Reflection.xml", + "ref/netcore50/zh-hant/System.Reflection.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "System.Reflection.4.0.0.nupkg", + "System.Reflection.4.0.0.nupkg.sha512", + "System.Reflection.nuspec" + ] + }, + "System.Reflection.Primitives/4.0.0-beta-23127": { + "type": "package", + "serviceable": true, + "sha512": "qUjIaT8GBhxh5pyY1xhQd3/Rn5CJMu023GGNWXObr6/I/lX9LWpJD+UJAsPcLMEXOFq3QaKk6+giNjaqIdcf7Q==", + "files": [ + "lib/DNXCore50/System.Reflection.Primitives.dll", + "lib/net45/_._", + "lib/netcore50/System.Reflection.Primitives.dll", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "ref/dotnet/de/System.Reflection.Primitives.xml", + "ref/dotnet/es/System.Reflection.Primitives.xml", + "ref/dotnet/fr/System.Reflection.Primitives.xml", + "ref/dotnet/it/System.Reflection.Primitives.xml", + "ref/dotnet/ja/System.Reflection.Primitives.xml", + "ref/dotnet/ko/System.Reflection.Primitives.xml", + "ref/dotnet/ru/System.Reflection.Primitives.xml", + "ref/dotnet/System.Reflection.Primitives.dll", + "ref/dotnet/System.Reflection.Primitives.xml", + "ref/dotnet/zh-hans/System.Reflection.Primitives.xml", + "ref/dotnet/zh-hant/System.Reflection.Primitives.xml", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Primitives.dll", + "ref/netcore50/System.Reflection.Primitives.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "runtimes/win8-aot/lib/netcore50/System.Reflection.Primitives.dll", + "System.Reflection.Primitives.4.0.0-beta-23127.nupkg", + "System.Reflection.Primitives.4.0.0-beta-23127.nupkg.sha512", + "System.Reflection.Primitives.nuspec" + ] + }, + "System.Reflection.Primitives/4.0.0": { + "type": "package", + "serviceable": true, + "sha512": "n9S0XpKv2ruc17FSnaiX6nV47VfHTZ1wLjKZlAirUZCvDQCH71mVp+Ohabn0xXLh5pK2PKp45HCxkqu5Fxn/lA==", + "files": [ + "lib/DNXCore50/System.Reflection.Primitives.dll", + "lib/net45/_._", + "lib/netcore50/System.Reflection.Primitives.dll", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "ref/dotnet/de/System.Reflection.Primitives.xml", + "ref/dotnet/es/System.Reflection.Primitives.xml", + "ref/dotnet/fr/System.Reflection.Primitives.xml", + "ref/dotnet/it/System.Reflection.Primitives.xml", + "ref/dotnet/ja/System.Reflection.Primitives.xml", + "ref/dotnet/ko/System.Reflection.Primitives.xml", + "ref/dotnet/ru/System.Reflection.Primitives.xml", + "ref/dotnet/System.Reflection.Primitives.dll", + "ref/dotnet/System.Reflection.Primitives.xml", + "ref/dotnet/zh-hans/System.Reflection.Primitives.xml", + "ref/dotnet/zh-hant/System.Reflection.Primitives.xml", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Primitives.dll", + "ref/netcore50/System.Reflection.Primitives.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "runtimes/win8-aot/lib/netcore50/System.Reflection.Primitives.dll", + "System.Reflection.Primitives.4.0.0.nupkg", + "System.Reflection.Primitives.4.0.0.nupkg.sha512", + "System.Reflection.Primitives.nuspec" + ] + }, + "System.Resources.ResourceManager/4.0.0": { + "type": "package", + "serviceable": true, + "sha512": "qmqeZ4BJgjfU+G2JbrZt4Dk1LsMxO4t+f/9HarNY6w8pBgweO6jT+cknUH7c3qIrGvyUqraBhU45Eo6UtA0fAw==", + "files": [ + "lib/DNXCore50/System.Resources.ResourceManager.dll", + "lib/net45/_._", + "lib/netcore50/System.Resources.ResourceManager.dll", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "ref/dotnet/de/System.Resources.ResourceManager.xml", + "ref/dotnet/es/System.Resources.ResourceManager.xml", + "ref/dotnet/fr/System.Resources.ResourceManager.xml", + "ref/dotnet/it/System.Resources.ResourceManager.xml", + "ref/dotnet/ja/System.Resources.ResourceManager.xml", + "ref/dotnet/ko/System.Resources.ResourceManager.xml", + "ref/dotnet/ru/System.Resources.ResourceManager.xml", + "ref/dotnet/System.Resources.ResourceManager.dll", + "ref/dotnet/System.Resources.ResourceManager.xml", + "ref/dotnet/zh-hans/System.Resources.ResourceManager.xml", + "ref/dotnet/zh-hant/System.Resources.ResourceManager.xml", + "ref/net45/_._", + "ref/netcore50/System.Resources.ResourceManager.dll", + "ref/netcore50/System.Resources.ResourceManager.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "runtimes/win8-aot/lib/netcore50/System.Resources.ResourceManager.dll", + "System.Resources.ResourceManager.4.0.0.nupkg", + "System.Resources.ResourceManager.4.0.0.nupkg.sha512", + "System.Resources.ResourceManager.nuspec" + ] + }, + "System.Runtime/4.0.20-beta-23127": { + "type": "package", + "serviceable": true, + "sha512": "naLsXkry4PBYCdXLOGx2r9TRuFWJpdZvV7W9rk4QRTPTS7H9911J09o8KXrhX+NW28YVsCgvcw8Wr0JsFEQdLQ==", + "files": [ + "lib/DNXCore50/System.Runtime.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/netcore50/System.Runtime.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.Runtime.xml", + "ref/dotnet/es/System.Runtime.xml", + "ref/dotnet/fr/System.Runtime.xml", + "ref/dotnet/it/System.Runtime.xml", + "ref/dotnet/ja/System.Runtime.xml", + "ref/dotnet/ko/System.Runtime.xml", + "ref/dotnet/ru/System.Runtime.xml", + "ref/dotnet/System.Runtime.dll", + "ref/dotnet/System.Runtime.xml", + "ref/dotnet/zh-hans/System.Runtime.xml", + "ref/dotnet/zh-hant/System.Runtime.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtimes/win8-aot/lib/netcore50/System.Runtime.dll", + "System.Runtime.4.0.20-beta-23127.nupkg", + "System.Runtime.4.0.20-beta-23127.nupkg.sha512", + "System.Runtime.nuspec" + ] + }, + "System.Runtime.Extensions/4.0.10-beta-23127": { + "type": "package", + "serviceable": true, + "sha512": "YwtpybYxpRqjF+TnBzmNdgGq2jNtEO9MkxYSIMW36lV7F6qEph+nCcKDLsCslgSz7dn44eSCnnsgBQQsF85eQQ==", + "files": [ + "lib/DNXCore50/System.Runtime.Extensions.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/netcore50/System.Runtime.Extensions.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.Runtime.Extensions.xml", + "ref/dotnet/es/System.Runtime.Extensions.xml", + "ref/dotnet/fr/System.Runtime.Extensions.xml", + "ref/dotnet/it/System.Runtime.Extensions.xml", + "ref/dotnet/ja/System.Runtime.Extensions.xml", + "ref/dotnet/ko/System.Runtime.Extensions.xml", + "ref/dotnet/ru/System.Runtime.Extensions.xml", + "ref/dotnet/System.Runtime.Extensions.dll", + "ref/dotnet/System.Runtime.Extensions.xml", + "ref/dotnet/zh-hans/System.Runtime.Extensions.xml", + "ref/dotnet/zh-hant/System.Runtime.Extensions.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtimes/win8-aot/lib/netcore50/System.Runtime.Extensions.dll", + "System.Runtime.Extensions.4.0.10-beta-23127.nupkg", + "System.Runtime.Extensions.4.0.10-beta-23127.nupkg.sha512", + "System.Runtime.Extensions.nuspec" + ] + }, + "System.Runtime.InteropServices/4.0.10-beta-23127": { + "type": "package", + "sha512": "zacN2B2QO20ziz3VvTBcAmcfnVtcO5Wu0tPcKA+5Gok+ZoKD9Ii8oRHSQ2Ou8L2yo5sL5ULh3J+PV4b7JZc4Gg==", + "files": [ + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net451/_._", + "lib/win81/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "License.rtf", + "ref/dotnet/de/System.Runtime.InteropServices.xml", + "ref/dotnet/es/System.Runtime.InteropServices.xml", + "ref/dotnet/fr/System.Runtime.InteropServices.xml", + "ref/dotnet/it/System.Runtime.InteropServices.xml", + "ref/dotnet/ja/System.Runtime.InteropServices.xml", + "ref/dotnet/ko/System.Runtime.InteropServices.xml", + "ref/dotnet/ru/System.Runtime.InteropServices.xml", + "ref/dotnet/System.Runtime.InteropServices.dll", + "ref/dotnet/System.Runtime.InteropServices.xml", + "ref/dotnet/zh-hans/System.Runtime.InteropServices.xml", + "ref/dotnet/zh-hant/System.Runtime.InteropServices.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net451/_._", + "ref/netcore50/de/System.Runtime.InteropServices.xml", + "ref/netcore50/es/System.Runtime.InteropServices.xml", + "ref/netcore50/fr/System.Runtime.InteropServices.xml", + "ref/netcore50/it/System.Runtime.InteropServices.xml", + "ref/netcore50/ja/System.Runtime.InteropServices.xml", + "ref/netcore50/ko/System.Runtime.InteropServices.xml", + "ref/netcore50/ru/System.Runtime.InteropServices.xml", + "ref/netcore50/System.Runtime.InteropServices.dll", + "ref/netcore50/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hans/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hant/System.Runtime.InteropServices.xml", + "ref/win81/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "System.Runtime.InteropServices.4.0.10-beta-23127.nupkg", + "System.Runtime.InteropServices.4.0.10-beta-23127.nupkg.sha512", + "System.Runtime.InteropServices.nuspec" + ] + }, + "System.Text.Encoding/4.0.0": { + "type": "package", + "sha512": "AMxFNOXpA6Ab8swULbXuJmoT2K5w6TnV3ObF5wsmEcIHQUJghoZtDVfVHb08O2wW15mOSI1i9Wg0Dx0pY13o8g==", + "files": [ + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "License.rtf", + "ref/dotnet/de/System.Text.Encoding.xml", + "ref/dotnet/es/System.Text.Encoding.xml", + "ref/dotnet/fr/System.Text.Encoding.xml", + "ref/dotnet/it/System.Text.Encoding.xml", + "ref/dotnet/ja/System.Text.Encoding.xml", + "ref/dotnet/ko/System.Text.Encoding.xml", + "ref/dotnet/ru/System.Text.Encoding.xml", + "ref/dotnet/System.Text.Encoding.dll", + "ref/dotnet/System.Text.Encoding.xml", + "ref/dotnet/zh-hans/System.Text.Encoding.xml", + "ref/dotnet/zh-hant/System.Text.Encoding.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/de/System.Text.Encoding.xml", + "ref/netcore50/es/System.Text.Encoding.xml", + "ref/netcore50/fr/System.Text.Encoding.xml", + "ref/netcore50/it/System.Text.Encoding.xml", + "ref/netcore50/ja/System.Text.Encoding.xml", + "ref/netcore50/ko/System.Text.Encoding.xml", + "ref/netcore50/ru/System.Text.Encoding.xml", + "ref/netcore50/System.Text.Encoding.dll", + "ref/netcore50/System.Text.Encoding.xml", + "ref/netcore50/zh-hans/System.Text.Encoding.xml", + "ref/netcore50/zh-hant/System.Text.Encoding.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "System.Text.Encoding.4.0.0.nupkg", + "System.Text.Encoding.4.0.0.nupkg.sha512", + "System.Text.Encoding.nuspec" + ] + }, + "System.Text.Encoding/4.0.10": { + "type": "package", + "sha512": "fNlSFgy4OuDlJrP9SFFxMlaLazq6ipv15sU5TiEgg9UCVnA/OgoVUfymFp4AOk1jOkW5SVxWbeeIUptcM+m/Vw==", + "files": [ + "lib/DNXCore50/System.Text.Encoding.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/netcore50/System.Text.Encoding.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.Text.Encoding.xml", + "ref/dotnet/es/System.Text.Encoding.xml", + "ref/dotnet/fr/System.Text.Encoding.xml", + "ref/dotnet/it/System.Text.Encoding.xml", + "ref/dotnet/ja/System.Text.Encoding.xml", + "ref/dotnet/ko/System.Text.Encoding.xml", + "ref/dotnet/ru/System.Text.Encoding.xml", + "ref/dotnet/System.Text.Encoding.dll", + "ref/dotnet/System.Text.Encoding.xml", + "ref/dotnet/zh-hans/System.Text.Encoding.xml", + "ref/dotnet/zh-hant/System.Text.Encoding.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtimes/win8-aot/lib/netcore50/System.Text.Encoding.dll", + "System.Text.Encoding.4.0.10.nupkg", + "System.Text.Encoding.4.0.10.nupkg.sha512", + "System.Text.Encoding.nuspec" + ] + }, + "System.Text.Encoding.Extensions/4.0.10": { + "type": "package", + "sha512": "TZvlwXMxKo3bSRIcsWZLCIzIhLbvlz+mGeKYRZv/zUiSoQzGOwkYeBu6hOw2XPQgKqT0F4Rv8zqKdvmp2fWKYg==", + "files": [ + "lib/DNXCore50/System.Text.Encoding.Extensions.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/netcore50/System.Text.Encoding.Extensions.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.Text.Encoding.Extensions.xml", + "ref/dotnet/es/System.Text.Encoding.Extensions.xml", + "ref/dotnet/fr/System.Text.Encoding.Extensions.xml", + "ref/dotnet/it/System.Text.Encoding.Extensions.xml", + "ref/dotnet/ja/System.Text.Encoding.Extensions.xml", + "ref/dotnet/ko/System.Text.Encoding.Extensions.xml", + "ref/dotnet/ru/System.Text.Encoding.Extensions.xml", + "ref/dotnet/System.Text.Encoding.Extensions.dll", + "ref/dotnet/System.Text.Encoding.Extensions.xml", + "ref/dotnet/zh-hans/System.Text.Encoding.Extensions.xml", + "ref/dotnet/zh-hant/System.Text.Encoding.Extensions.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtimes/win8-aot/lib/netcore50/System.Text.Encoding.Extensions.dll", + "System.Text.Encoding.Extensions.4.0.10.nupkg", + "System.Text.Encoding.Extensions.4.0.10.nupkg.sha512", + "System.Text.Encoding.Extensions.nuspec" + ] + }, + "System.Threading/4.0.10": { + "type": "package", + "serviceable": true, + "sha512": "0w6pRxIEE7wuiOJeKabkDgeIKmqf4ER1VNrs6qFwHnooEE78yHwi/bKkg5Jo8/pzGLm0xQJw0nEmPXt1QBAIUA==", + "files": [ + "lib/DNXCore50/System.Threading.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/netcore50/System.Threading.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.Threading.xml", + "ref/dotnet/es/System.Threading.xml", + "ref/dotnet/fr/System.Threading.xml", + "ref/dotnet/it/System.Threading.xml", + "ref/dotnet/ja/System.Threading.xml", + "ref/dotnet/ko/System.Threading.xml", + "ref/dotnet/ru/System.Threading.xml", + "ref/dotnet/System.Threading.dll", + "ref/dotnet/System.Threading.xml", + "ref/dotnet/zh-hans/System.Threading.xml", + "ref/dotnet/zh-hant/System.Threading.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtimes/win8-aot/lib/netcore50/System.Threading.dll", + "System.Threading.4.0.10.nupkg", + "System.Threading.4.0.10.nupkg.sha512", + "System.Threading.nuspec" + ] + }, + "System.Threading.Tasks/4.0.0": { + "type": "package", + "sha512": "dA3y1B6Pc8mNt9obhEWWGGpvEakS51+nafXpmM/Z8IF847GErLXGTjdfA+AYEKszfFbH7SVLWUklXhYeeSQ1lw==", + "files": [ + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "License.rtf", + "ref/dotnet/de/System.Threading.Tasks.xml", + "ref/dotnet/es/System.Threading.Tasks.xml", + "ref/dotnet/fr/System.Threading.Tasks.xml", + "ref/dotnet/it/System.Threading.Tasks.xml", + "ref/dotnet/ja/System.Threading.Tasks.xml", + "ref/dotnet/ko/System.Threading.Tasks.xml", + "ref/dotnet/ru/System.Threading.Tasks.xml", + "ref/dotnet/System.Threading.Tasks.dll", + "ref/dotnet/System.Threading.Tasks.xml", + "ref/dotnet/zh-hans/System.Threading.Tasks.xml", + "ref/dotnet/zh-hant/System.Threading.Tasks.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/de/System.Threading.Tasks.xml", + "ref/netcore50/es/System.Threading.Tasks.xml", + "ref/netcore50/fr/System.Threading.Tasks.xml", + "ref/netcore50/it/System.Threading.Tasks.xml", + "ref/netcore50/ja/System.Threading.Tasks.xml", + "ref/netcore50/ko/System.Threading.Tasks.xml", + "ref/netcore50/ru/System.Threading.Tasks.xml", + "ref/netcore50/System.Threading.Tasks.dll", + "ref/netcore50/System.Threading.Tasks.xml", + "ref/netcore50/zh-hans/System.Threading.Tasks.xml", + "ref/netcore50/zh-hant/System.Threading.Tasks.xml", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "System.Threading.Tasks.4.0.0.nupkg", + "System.Threading.Tasks.4.0.0.nupkg.sha512", + "System.Threading.Tasks.nuspec" + ] + }, + "System.Threading.Tasks/4.0.10": { + "type": "package", + "serviceable": true, + "sha512": "NOwJGDfk79jR0bnzosbXLVD/PdI8KzBeESoa3CofEM5v9R5EBfcI0Jyf18stx+0IYV9okmDIDxVtxq9TbnR9bQ==", + "files": [ + "lib/DNXCore50/System.Threading.Tasks.dll", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/netcore50/System.Threading.Tasks.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "ref/dotnet/de/System.Threading.Tasks.xml", + "ref/dotnet/es/System.Threading.Tasks.xml", + "ref/dotnet/fr/System.Threading.Tasks.xml", + "ref/dotnet/it/System.Threading.Tasks.xml", + "ref/dotnet/ja/System.Threading.Tasks.xml", + "ref/dotnet/ko/System.Threading.Tasks.xml", + "ref/dotnet/ru/System.Threading.Tasks.xml", + "ref/dotnet/System.Threading.Tasks.dll", + "ref/dotnet/System.Threading.Tasks.xml", + "ref/dotnet/zh-hans/System.Threading.Tasks.xml", + "ref/dotnet/zh-hant/System.Threading.Tasks.xml", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "runtimes/win8-aot/lib/netcore50/System.Threading.Tasks.dll", + "System.Threading.Tasks.4.0.10.nupkg", + "System.Threading.Tasks.4.0.10.nupkg.sha512", + "System.Threading.Tasks.nuspec" + ] + } + }, + "projectFileDependencyGroups": { + "": [ + "System.IO >= 4.0.10", + "System.Console >= 4.0.0-beta-*", + "System.Runtime >= 4.0.20-beta-*", + "System.Runtime.Extensions >= 4.0.10-beta-*", + "System.Runtime.InteropServices >= 4.0.10-beta-*" + ], + "DNXCore,Version=v5.0": [] + } +} \ No newline at end of file diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch.cs b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch.cs new file mode 100644 index 0000000..9ca4bfb --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + + +// Re-throwing an exception from finally block enclosed within a catch block. +// NDPWhidbey 10965 +// +// 06/18/03 - SB +// Due to compiler error CS0724: A throw statement with no arguments is not allowed inside of a finally clause nested inside of the innermost catch clause, +// I'm modifying the test to explicitly throw 'eo'. An IL test will be added to test the original functionality. +// + +using System; + +namespace Test +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("try"); + expectedOut.WriteLine("\ttry - throwing outer exception"); + expectedOut.WriteLine("\tcatch - Outer Exception"); + expectedOut.WriteLine("\t\ttry - throwing inner exception"); + expectedOut.WriteLine("\t\tcatch - Inner Exception"); + expectedOut.WriteLine("\t\tfinally - Rethrowing Outer Exception"); + expectedOut.WriteLine("catch - Outer Exception"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine("try"); + try + { + Console.WriteLine("\ttry - throwing outer exception"); + throw new Exception("Outer Exception"); + } + catch (System.Exception eo) + { + Console.WriteLine("\tcatch - " + eo.Message); + try + { + Console.WriteLine("\t\ttry - throwing inner exception"); + throw new Exception("Inner Exception"); + } + catch (System.Exception ei) + { + Console.WriteLine("\t\tcatch - " + ei.Message); + } + finally + { + Console.WriteLine("\t\tfinally - Rethrowing Outer Exception"); + // excplicitly added 'eo' so that the CS compiler wouldn't complain. + throw eo; + } + } + } + catch (System.Exception e) + { + Console.WriteLine("catch - " + e.Message); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_d.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_d.csproj new file mode 100644 index 0000000..0c2d7a4 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_do.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_do.csproj new file mode 100644 index 0000000..4a4b433 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_r.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_r.csproj new file mode 100644 index 0000000..4a9ac15 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_ro.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_ro.csproj new file mode 100644 index 0000000..0a5a6b6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowinfinallyaftercatch_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase.cs b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase.cs new file mode 100644 index 0000000..0c4a8c9 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + + +// 119053 +// rethrow in a handler will not work properly if the protected block is protected by other +// clauses that catch the base class of the exception being rethrown +using System; +using System.IO; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In catch 1 File x not found"); + expectedOut.WriteLine("In main's catch File x not found"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void f2() + { + throw new System.IO.FileNotFoundException("File x not found"); + } + + static public void f1() + { + try + { + f2(); + } + catch (System.IO.FileNotFoundException e) + { + Console.WriteLine("In catch 1 " + e.Message); + throw; + } + catch (System.IO.IOException e) + { + Console.WriteLine("In catch 2 " + e.Message); + throw; + } + catch (Exception e) + { + Console.WriteLine("In catch 3 " + e.Message); + throw; + } + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + f1(); + } + catch (Exception e) + { + Console.WriteLine("In main's catch " + e.Message); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } + +} + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_d.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_d.csproj new file mode 100644 index 0000000..41a7e5d --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_do.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_do.csproj new file mode 100644 index 0000000..fb13654 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_r.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_r.csproj new file mode 100644 index 0000000..43a5f0b --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_ro.csproj b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_ro.csproj new file mode 100644 index 0000000..588a2f6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/rethrowwithhandlerscatchingbase_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice.cs b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice.cs new file mode 100644 index 0000000..896492c --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + + +// 119019 +// execute the same throw in handler (int f1, f2) twice (accomplished by calling f1 twice) + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + System.Exception exp = new System.Exception(); + expectedOut.WriteLine("In f1"); + expectedOut.WriteLine("In f2"); + expectedOut.WriteLine("In f2's catch " + exp.Message); + expectedOut.WriteLine("In f1's catch " + exp.Message); + expectedOut.WriteLine("In main's catch1 " + exp.Message); + expectedOut.WriteLine("In f1"); + expectedOut.WriteLine("In f2"); + expectedOut.WriteLine("In f2's catch " + exp.Message); + expectedOut.WriteLine("In f1's catch " + exp.Message); + expectedOut.WriteLine("In main's catch2 " + exp.Message); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void f3() + { + throw new Exception(); + } + + static public void f2() + { + try + { + Console.WriteLine("In f2"); + f3(); + } + catch (Exception e) + { + Console.WriteLine("In f2's catch " + e.Message); + throw; + } + } + + static public void f1() + { + try + { + Console.WriteLine("In f1"); + f2(); + } + catch (Exception e) + { + Console.WriteLine("In f1's catch " + e.Message); + throw; + } + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + f1(); + } + catch (Exception e) + { + Console.WriteLine("In main's catch1 " + e.Message); + } + + try + { + f1(); + } + catch (Exception e) + { + Console.WriteLine("In main's catch2 " + e.Message); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_d.csproj b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_d.csproj new file mode 100644 index 0000000..cfc00d6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_do.csproj b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_do.csproj new file mode 100644 index 0000000..8f10bc3 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_r.csproj b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_r.csproj new file mode 100644 index 0000000..bf644df --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_ro.csproj b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_ro.csproj new file mode 100644 index 0000000..f7a9122 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samerethrowtwice_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice.cs b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice.cs new file mode 100644 index 0000000..7049486 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// 119019 +// execute the same throw in handler (int f1, f2) twice (accomplished by calling f1 twice) + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + System.Exception exp = new System.Exception(); + expectedOut.WriteLine("In f1"); + expectedOut.WriteLine("In f2"); + expectedOut.WriteLine("In f2's catch " + exp.Message); + expectedOut.WriteLine("In f1's catch " + exp.Message); + expectedOut.WriteLine("In main's catch1 " + exp.Message); + expectedOut.WriteLine("In f1"); + expectedOut.WriteLine("In f2"); + expectedOut.WriteLine("In f2's catch " + exp.Message); + expectedOut.WriteLine("In f1's catch " + exp.Message); + expectedOut.WriteLine("In main's catch2 " + exp.Message); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void f3() + { + throw new Exception(); + } + + static public void f2() + { + try + { + Console.WriteLine("In f2"); + f3(); + } + catch (Exception e) + { + Console.WriteLine("In f2's catch " + e.Message); + throw e; + } + } + + static public void f1() + { + try + { + Console.WriteLine("In f1"); + f2(); + } + catch (Exception e) + { + Console.WriteLine("In f1's catch " + e.Message); + throw e; + } + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + f1(); + } + catch (Exception e) + { + Console.WriteLine("In main's catch1 " + e.Message); + } + + try + { + f1(); + } + catch (Exception e) + { + Console.WriteLine("In main's catch2 " + e.Message); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_d.csproj b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_d.csproj new file mode 100644 index 0000000..48b7a45 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_do.csproj b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_do.csproj new file mode 100644 index 0000000..25322bc --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_r.csproj b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_r.csproj new file mode 100644 index 0000000..801b03e --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_ro.csproj b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_ro.csproj new file mode 100644 index 0000000..cab2de7 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/samethrowtwice_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/simplerethrow.cs b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow.cs new file mode 100644 index 0000000..7f6ecbd --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// simple rethrow test + +using System; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In outer try"); + expectedOut.WriteLine("In inner try"); + expectedOut.WriteLine("In inner catch"); + expectedOut.WriteLine("In outer catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + Console.WriteLine("In outer try"); + try + { + Console.WriteLine("In inner try"); + throw new Exception(); + } + catch + { + Console.WriteLine("In inner catch"); + throw; + } + } + catch + { + Console.WriteLine("In outer catch"); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_d.csproj b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_d.csproj new file mode 100644 index 0000000..7c428db --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_do.csproj b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_do.csproj new file mode 100644 index 0000000..6e97b85 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_r.csproj b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_r.csproj new file mode 100644 index 0000000..b73e0fe --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_ro.csproj b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_ro.csproj new file mode 100644 index 0000000..db64ab0 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/simplerethrow_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase.cs b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase.cs new file mode 100644 index 0000000..10fa1e6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// 119053 +// throw in a handler will not work properly if the protected block is protected by other +// clauses that catch the base class of the exception being thrown + +using System; +using System.IO; + +namespace hello +{ + class Class1 + { + private static TestUtil.TestLog testLog; + + static Class1() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In catch 1 File x not found"); + expectedOut.WriteLine("In main's catch File x not found"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + static public void f2() + { + throw new FileNotFoundException("File x not found"); + } + + static public void f1() + { + try + { + f2(); + } + catch (FileNotFoundException e) + { + Console.WriteLine("In catch 1 " + e.Message); + throw e; + } + catch (IOException e) + { + Console.WriteLine("In catch 2 " + e.Message); + throw e; + } + catch (Exception e) + { + Console.WriteLine("In catch 3 " + e.Message); + throw e; + } + } + + static public int Main(string[] args) + { + //Start recording + testLog.StartRecording(); + + try + { + f1(); + } + catch (Exception e) + { + Console.WriteLine("In main's catch " + e.Message); + } + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } + } +} + diff --git a/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_d.csproj b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_d.csproj new file mode 100644 index 0000000..7a535a1 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_d.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_do.csproj b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_do.csproj new file mode 100644 index 0000000..7c1ec60 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_do.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_r.csproj b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_r.csproj new file mode 100644 index 0000000..1acf4d6 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_r.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_ro.csproj b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_ro.csproj new file mode 100644 index 0000000..e7d5939 --- /dev/null +++ b/tests/src/JIT/Methodical/eh/rethrow/throwwithhandlerscatchingbase_ro.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + project.json + project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.cs b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.cs new file mode 100644 index 0000000..399da24 --- /dev/null +++ b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + + +/* Test case for Dev10 bug #640711 + * ----------------------------------------------------------------------- + Expected output: + A really long string to get us past the limits of Lib1.dll's string blob +System.Exception: Another really long string just because we can! + at Repro.Caller(Boolean b) in c:\tests\Dev10\640711\app.cs:line 12 + at Repro.Main() in c:\tests\Dev10\640711\app.cs:line 16 + + +Actual Output: +a +System.BadImageFormatException: [C:\tests\Dev10\640711\Lib1.dll] Bad string token. + at Repro.Caller(Boolean b) in c:\tests\Dev10\640711\app.cs:line 10 + at Repro.Main() in c:\tests\Dev10\640711\app.cs:line 16 + * + * ---------------------------------------------------------------------- + * The reader should not cache the embedded module handle if it is not clearing the cache when changing scopes. + */ + +using System; +using System.Runtime.CompilerServices; + +static class Repro +{ + [MethodImpl(MethodImplOptions.NoInlining)] + static void Caller(bool b) + { + Throws.M(false); + if (b) + { + Console.WriteLine("A really long string to get us past the limits of Lib1.dll's string blob"); + throw new Exception("Another really long string just because we can!"); + } + } + + static int Main() + { + try + { + Caller(true); + } + catch (Exception e) + { + Console.WriteLine(e); + } + return 100; + } +} diff --git a/tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.csproj b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.csproj new file mode 100644 index 0000000..12ebb25 --- /dev/null +++ b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleHandleCache.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.cs b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.cs new file mode 100644 index 0000000..069d488 --- /dev/null +++ b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Test case library for Dev10 bug #640711 +// Please see moduleHandleCache.cs + +[assembly: System.Runtime.CompilerServices.CompilationRelaxations(0)] + +public static class Throws +{ + public static void M(bool b) + { + if (b) + throw new System.Exception("a"); + } +} diff --git a/tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.csproj b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.csproj new file mode 100644 index 0000000..d4dbfc6 --- /dev/null +++ b/tests/src/JIT/Methodical/flowgraph/bug619534/moduleLibrary.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/Methodical/stringintern/test1-xassem.csproj b/tests/src/JIT/Methodical/stringintern/test1-xassem.csproj new file mode 100644 index 0000000..1f84c38 --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/test1-xassem.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + + + + + diff --git a/tests/src/JIT/Methodical/stringintern/test1.cs b/tests/src/JIT/Methodical/stringintern/test1.cs new file mode 100644 index 0000000..36bcc60 --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/test1.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// ==, != + +using System; +using System.Runtime.CompilerServices; + +class Test1 +{ + public static string teststr1 = "static \uC09C\u7B8B field"; + public static string[] teststr2 = new string[] { "\u3F2Aarray element 0", "array element 1\uCB53", "array \u47BBelement 2" }; + [MethodImplAttribute(MethodImplOptions.NoInlining)] + public static string teststr3() + { + return @"method return\\"; + } + public const string teststr4 = "const string\""; // special case + public static string teststr5 = String.Empty; // special case + + public static bool TestSameObjRef() + { + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + Console.WriteLine("Testing SameObjRef"); + + bool passed = true; + + if ((object)teststr1 != (object)C.teststr1) + { + Console.WriteLine("(object)teststr1 == (object)C.teststr1 is expected. FAILED"); + passed = false; + } + + if ((object)teststr2[0] != (object)C.teststr2[0]) + { + Console.WriteLine("(object)teststr2[0] == (object)C.teststr2[0] is expected. FAILED"); + passed = false; + } + + if (!Object.ReferenceEquals((object)teststr3(), (object)C.teststr3())) + { + Console.WriteLine("Object.ReferenceEquals((object)teststr3(), (object)C.teststr3()) is expected. FAILED"); + passed = false; + } + + if ((object)teststr4 != (object)C.teststr4) + { + Console.WriteLine("(object)teststr4 == (object)C.teststr4 is expected. FAILED"); + passed = false; + } + + if ((object)teststr5 != (object)C.teststr5) + { + Console.WriteLine("(object)teststr5 == (object)C.teststr5 is expected. FAILED"); + passed = false; + } + + if ((object)teststr1 == (object)GenC.teststr1) + { + Console.WriteLine("(object)teststr1 == (object)GenC.teststr1 is not expected. FAILED"); + passed = false; + } + + if ((object)teststr2[0] == (object)GenC.teststr2[0]) + { + Console.WriteLine("(object)teststr2[0] == (object)GenC.teststr2[0] is not expected. FAILED"); + passed = false; + } + + if ((object)teststr3() == (object)GenC.teststr3()) + { + Console.WriteLine("(object)teststr3() == (object)GenC.teststr3() is not expected. FAILED"); + passed = false; + } + + if (Object.ReferenceEquals((object)teststr4, (object)GenC.teststr4)) + { + Console.WriteLine("Object.ReferenceEquals((object)teststr4, (object)GenC.teststr4) is not expected. FAILED"); + passed = false; + } + + if ((object)teststr5 != (object)GenC.teststr5) + { + Console.WriteLine("(object)teststr5 != (object)GenC.teststr5 is not expected. FAILED"); + passed = false; + } + + return passed; + } + + public static bool TestDiffObjRef() + { + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + Console.WriteLine("Testing DiffObjRef"); + + bool passed = true; + + if ((object)teststr1 == (object)C.teststr1) + { + Console.WriteLine("(object)teststr1 == (object)C.teststr1 is not expected. FAILED"); + passed = false; + } + + if ((object)teststr2[0] == (object)C.teststr2[0]) + { + Console.WriteLine("(object)teststr2[0] == (object)C.teststr2[0] is not expected. FAILED"); + passed = false; + } + + if (Object.ReferenceEquals((object)teststr3(), (object)C.teststr3())) + { + Console.WriteLine("(object)teststr3() == (object)C.teststr3() is not expected. FAILED"); + passed = false; + } + + // Special case for const literal teststr4 + // two consecutive LDSTR is emitted by C# compiler for the following statement + // as a result, both are interned in the same module and object comparison returns true + if ((object)teststr4 != (object)C.teststr4) + { + Console.WriteLine("(object)teststr4 != (object)C.teststr4 is not expected. FAILED"); + passed = false; + } + + // Special case for String.Empty + // String.Empty is loaded using LDSFLD, rather than LDSTR in any module + // as a result, it is always the same reference to [mscorlib]System.String::Empty, + // and object comparison return true + if ((object)teststr5 != (object)C.teststr5) + { + Console.WriteLine("(object)teststr5 != (object)C.teststr5 is not expected. FAILED"); + passed = false; + } + + if ((object)"GenC static \uC09C\u7B8B field" == (object)GenC.teststr1) + { + Console.WriteLine("(object)\"GenC static \uC09C\u7B8B field\" == (object)GenC.teststr1 is not expected. FAILED"); + passed = false; + } + + if ((object)"GenC \u3F2Aarray element 0" == (object)GenC.teststr2[0]) + { + Console.WriteLine("(object)\"GenC \u3F2Aarray element 0\" == (object)GenC.teststr2[0] is not expected. FAILED"); + passed = false; + } + + if ((object)@"GenC method return\\" == (object)GenC.teststr3()) + { + Console.WriteLine("(object)\"GenC method return\\\" == (object)GenC.teststr3() is not expected. FAILED"); + passed = false; + } + + // Special case for const literal teststr4 + // two consecutive LDSTR is emitted by C# compiler for the following statement + // as a result, both are interned in the same module and object comparison returns true + if (!Object.ReferenceEquals((object)"GenC const string\"", (object)GenC.teststr4)) + { + Console.WriteLine("(object)\"GenC const string\"\" != (object)GenC.teststr4 is not expected. FAILED"); + passed = false; + } + + // Special case for String.Empty + // String.Empty is loaded using LDSFLD, rather than LDSTR in any module + // as a result, it is always the same reference to [mscorlib]System.String::Empty, + // and object comparison return true + if ((object)teststr5 != (object)GenC.teststr5) + { + Console.WriteLine("(object)teststr5 != (object)GenC.teststr5 is not expected. FAILED"); + passed = false; + } + + return passed; + } + + public static int Main(string[] args) + { + bool passed = false; + + if ((args.Length < 1) || (args[0].ToUpper() == "SAMEOBJREF")) + passed = TestSameObjRef(); + else if (args[0].ToUpper() == "DIFFOBJREF") + passed = TestDiffObjRef(); + else + { + Console.WriteLine("Usage: Test1.exe [SameObjRef|DiffObjRef]"); + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + return 9; + } + + Console.WriteLine(); + if (passed) + { + Console.WriteLine("PASSED"); + return 100; + } + else + { + Console.WriteLine("FAILED"); + return 1; + } + + } +} diff --git a/tests/src/JIT/Methodical/stringintern/test2-xassem.csproj b/tests/src/JIT/Methodical/stringintern/test2-xassem.csproj new file mode 100644 index 0000000..3093071 --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/test2-xassem.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + + + + + diff --git a/tests/src/JIT/Methodical/stringintern/test2.cs b/tests/src/JIT/Methodical/stringintern/test2.cs new file mode 100644 index 0000000..ad2689a --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/test2.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// switch, for + +using System; +using System.Runtime.CompilerServices; + +class Test2 +{ + public static string[] teststr2 = new string[] { "\u3F2Aarray element 0", "array element 1\uCB53", "array \u47BBelement 2" }; + + public static bool TestSameObjRef() + { + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + Console.WriteLine("Testing SameObjRef"); + + bool passed = true; + + switch (C.teststr1) + { + case "static \uC09C\u7B8B field": + switch (GenC.teststr2[0]) + { + case "\u3F2Aarray element 0": + passed = false; + break; + default: + break; + } + break; + + default: + passed = false; + break; + } + + switch (C.teststr3()) + { + case @"method return\\": + switch (GenC.teststr5) + { + case "": + switch (C.teststr3()) + { + case @"method return\\": + break; + default: + passed = false; + break; + } + break; + default: + passed = false; + break; + } + break; + default: + passed = false; + break; + } + + int i; + for (i = 1; (i < teststr2.Length) && (object)C.teststr2[i] == (object)teststr2[i]; i++) + ; + if (i != teststr2.Length) + { + Console.WriteLine("for, (object)C.teststr2[i]==(object)teststr2[i] is not expected, FAILED"); + passed = false; + } + + switch (GenC.teststr1) + { + case "static \uC09C\u7B8B field": + passed = false; + break; + default: + switch (GenC.teststr2[0]) + { + case "GenC \u3F2Aarray element 0": + break; + default: + passed = false; + break; + } + break; + } + + switch (GenC.teststr3()) + { + case @"GenC method return\\": + switch (GenC.teststr4) + { + case "GenC const string\"": + break; + default: + passed = false; + break; + } + break; + default: + passed = false; + break; + } + + for (i = 1; (i < teststr2.Length) && (object)GenC.teststr2[i] != (object)C.teststr2[i]; i++) + ; + if (i != teststr2.Length) + { + Console.WriteLine("for, (object)GenC.teststr2[i]!=(object)C.teststr2[i] is not expected, FAILED"); + passed = false; + } + + return passed; + } + + public static bool TestDiffObjRef() + { + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + Console.WriteLine("Testing DiffObjRef"); + + bool passed = true; + + switch (C.teststr1) + { + case "static \uC09C\u7B8B field": + switch (C.teststr2[0]) + { + case "\u3F2Aarray element 0": + break; + default: + passed = false; + break; + } + break; + + default: + passed = false; + break; + } + + switch (C.teststr3()) + { + case @"method return\\": + switch (GenC.teststr5) + { + case "": + switch (C.teststr3()) + { + case @"method return\\": + break; + default: + passed = false; + break; + } + break; + default: + passed = false; + break; + } + break; + default: + passed = false; + break; + } + + for (int i = 1; (i < teststr2.Length) && (object)C.teststr2[i] == (object)teststr2[i]; i++) + { + Console.WriteLine("for, (object)C.teststr2[i]==(object)teststr2[i] is not expected, FAILED"); + passed = false; + } + + switch (GenC.teststr1) + { + case "static \uC09C\u7B8B field": + passed = false; + break; + default: + switch (GenC.teststr2[0]) + { + case "GenC \u3F2Aarray element 0": + break; + default: + passed = false; + break; + } + break; + } + + switch (GenC.teststr3()) + { + case @"GenC method return\\": + switch (GenC.teststr4) + { + case "GenC const string\"": + break; + default: + passed = false; + break; + } + break; + default: + passed = false; + break; + } + + for (int i = 1; (i < teststr2.Length) && (object)GenC.teststr2[i] == (object)"GenC array element 1\uCB53"; i++) + { + Console.WriteLine("for, (object)GenC.teststr2[i]==(object)C.teststr2[i] is not expected, FAILED"); + passed = false; + } + + return passed; + } + + public static int Main(string[] args) + { + bool passed = false; + + if ((args.Length < 1) || (args[0].ToUpper() == "SAMEOBJREF")) + passed = TestSameObjRef(); + else if (args[0].ToUpper() == "DIFFOBJREF") + passed = TestDiffObjRef(); + else + { + Console.WriteLine("Usage: Test2.exe [SameObjRef|DiffObjRef]"); + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + return 9; + } + + Console.WriteLine(); + if (passed) + { + Console.WriteLine("PASSED"); + return 100; + } + else + { + Console.WriteLine("FAILED"); + return 1; + } + + } +} diff --git a/tests/src/JIT/Methodical/stringintern/test4-xassem.csproj b/tests/src/JIT/Methodical/stringintern/test4-xassem.csproj new file mode 100644 index 0000000..c126f26 --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/test4-xassem.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + + + + + diff --git a/tests/src/JIT/Methodical/stringintern/test4.cs b/tests/src/JIT/Methodical/stringintern/test4.cs new file mode 100644 index 0000000..bb54574 --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/test4.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// try/catch, try/finally + +using System; +using System.Runtime.CompilerServices; + +class Test4 +{ + public static string teststr1 = null; + public static string[] teststr2 = new string[3]; + public static string teststr3 = null; + public const string teststr4 = "const string\""; // special case for DiffObjRef + public const string testgenstr4 = "GenC const string\""; // special case for DiffObjRef + public static string teststr5 = null; // special case for DiffObjRef + + public static bool TestSameObjRef() + { + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + Console.WriteLine("Testing SameObjRef"); + + bool passed = true; + + string b = null; + + try + { + teststr1 = "static \uC09C\u7B8B field"; + b = C.teststr1; + throw new Exception(); + } + catch (System.Exception) + { + } + + if ((object)teststr1 != (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr1 == (object) b is expected"); + } + + try + { + teststr2[0] = "\u3F2Aarray element 0"; + b = C.teststr2[0]; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr2[0] != (object)C.teststr2[0]) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[0] == (object)C.teststr2[0] is expected"); + } + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + teststr2[1] = "array element 1\uCB53"; + b = C.teststr2[1]; + } + + if ((object)teststr2[1] != (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[1] == (object) b is expected"); + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + } + finally + { + teststr2[2] = "array \u47BBelement 2"; + } + + if ((object)teststr2[2] != (object)C.teststr2[2]) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr2[2] == (object)C.teststr2[2] is expected"); + } + + try + { + teststr3 = @"method return\\"; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr3 != (object)C.teststr3()) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr3 == (object)C.teststr3() is expected"); + } + try + { + } + finally + { + if ((object)teststr4 != (object)C.teststr4) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr4 != (object)C.teststr4 is expected"); + } + try + { + throw new Exception(); + } + catch + { + } + finally + { + teststr5 = String.Empty; + if ((object)teststr5 != (object)C.teststr5) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr5 != (object)C.teststr5 is expected"); + } + } + } + } + + // Generic Class + try + { + teststr1 = "GenC static \uC09C\u7B8B field"; + b = GenC.teststr1; + throw new Exception(); + } + catch (System.Exception) + { + } + + if ((object)teststr1 != (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr1 == (object)GenC.teststr1 is expected"); + } + + try + { + teststr2[0] = "GenC \u3F2Aarray element 0"; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr2[0] != (object)GenC.teststr2[0]) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[0] == (object)GenC.teststr2[0] is expected"); + } + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + teststr2[1] = "GenC array element 1\uCB53"; + b = GenC.teststr2[1]; + } + + if ((object)teststr2[1] != (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[1] == (object)GenC.teststr2[1] is expected"); + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + } + finally + { + teststr2[2] = "GenC array \u47BBelement 2"; + } + + if ((object)teststr2[2] != (object)GenC.teststr2[2]) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr2[2] == (object)GenC.teststr2[2] is expected"); + } + + try + { + teststr3 = @"GenC method return\\"; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr3 != (object)GenC.teststr3()) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr3 == (object)GenC.teststr3() is expected"); + } + try + { + } + finally + { + if ((object)testgenstr4 != (object)GenC.teststr4) + { + passed = false; + Console.WriteLine("FAILED, (object)testgenstr4 != (object)GenC.teststr4 is expected"); + } + try + { + throw new Exception(); + } + catch + { + } + finally + { + teststr5 = String.Empty; + if ((object)teststr5 != (object)GenC.teststr5) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr5 != (object)GenC.teststr5 is expected"); + } + } + } + } + + return passed; + } + + public static bool TestDiffObjRef() + { + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + Console.WriteLine("Testing DiffObjRef"); + + bool passed = true; + + string b = null; + + try + { + teststr1 = "static \uC09C\u7B8B field"; + b = C.teststr1; + throw new Exception(); + } + catch (System.Exception) + { + } + + if ((object)teststr1 == (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr1 == (object) b is NOT expected"); + } + + try + { + teststr2[0] = "\u3F2Aarray element 0"; + b = C.teststr2[0]; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr2[0] == (object)C.teststr2[0]) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[0] == (object)C.teststr2[0] is NOT expected"); + } + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + teststr2[1] = "array element 1\uCB53"; + b = C.teststr2[1]; + } + + if ((object)teststr2[1] == (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[1] == (object) b is NOT expected"); + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + } + finally + { + teststr2[2] = "array \u47BBelement 2"; + } + + if ((object)teststr2[2] == (object)C.teststr2[2]) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr2[2] == (object)C.teststr2[2] is NOT expected"); + } + + try + { + teststr3 = @"method return\\"; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr3 == (object)C.teststr3()) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr3 == (object)C.teststr3() is NOT expected"); + } + try + { + } + finally + { + // Special case for const literal teststr4 + // two consecutive LDSTR is emitted by C# compiler for the following statement + // as a result, both are interned in the same module and object comparison returns true + if ((object)teststr4 != (object)C.teststr4) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr4 == (object)C.teststr4 is expected"); + } + try + { + throw new Exception(); + } + catch + { + } + finally + { + teststr5 = String.Empty; + // Special case for String.Empty + // String.Empty is loaded using LDSFLD, rather than LDSTR in any module + // as a result, it is always the same reference to [mscorlib]System.String::Empty, + // and object comparison return true + if ((object)teststr5 != (object)C.teststr5) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr5 == (object)C.teststr5 is expected"); + } + } + } + } + + // Generic Class + try + { + teststr1 = "GenC static \uC09C\u7B8B field"; + b = GenC.teststr1; + throw new Exception(); + } + catch (System.Exception) + { + } + + if ((object)teststr1 == (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr1 == (object)GenC.teststr1 is NOT expected"); + } + + try + { + teststr2[0] = "GenC \u3F2Aarray element 0"; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr2[0] == (object)GenC.teststr2[0]) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[0] == (object)GenC.teststr2[0] is NOT expected"); + } + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + teststr2[1] = "GenC array element 1\uCB53"; + b = GenC.teststr2[1]; + } + + if ((object)teststr2[1] == (object)b) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr2[1] == (object)GenC.teststr2[1] is NOT expected"); + } + + try + { + throw new Exception(); + } + catch (System.Exception) + { + } + finally + { + teststr2[2] = "GenC array \u47BBelement 2"; + } + + if ((object)teststr2[2] == (object)GenC.teststr2[2]) + { + passed = false; + Console.WriteLine("FAILED, (object)teststr2[2] == (object)GenC.teststr2[2] is NOT expected"); + } + + try + { + teststr3 = @"GenC method return\\"; + throw new Exception(); + } + catch (System.Exception) + { + if ((object)teststr3 == (object)GenC.teststr3()) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr3 == (object)GenC.teststr3() is NOT expected"); + } + try + { + } + finally + { + // Special case for const literal teststr4 + // two consecutive LDSTR is emitted by C# compiler for the following statement + // as a result, both are interned in the same module and object comparison returns true + if ((object)testgenstr4 != (object)GenC.teststr4) + { + passed = false; + Console.WriteLine("FAILED, (object)testgenstr4 == (object)GenC.teststr4 is expected"); + } + try + { + throw new Exception(); + } + catch + { + } + finally + { + teststr5 = String.Empty; + // Special case for String.Empty + // String.Empty is loaded using LDSFLD, rather than LDSTR in any module + // as a result, it is always the same reference to [mscorlib]System.String::Empty, + // and object comparison return true + if ((object)teststr5 != (object)GenC.teststr5) + { + passed = false; + Console.WriteLine("FAILED, (object) teststr5 == (object)GenC.teststr5 is expected"); + } + } + } + } + + return passed; + } + + public static int Main(string[] args) + { + bool passed = false; + + if ((args.Length < 1) || (args[0].ToUpper() == "SAMEOBJREF")) + passed = TestSameObjRef(); + else if (args[0].ToUpper() == "DIFFOBJREF") + passed = TestDiffObjRef(); + else + { + Console.WriteLine("Usage: Test4.exe [SameObjRef|DiffObjRef]"); + Console.WriteLine(); + Console.WriteLine("When NGEN'ed, two strings in different modules have different object reference"); + Console.WriteLine("When NGEN'ed, two strings in the same module have same object reference"); + Console.WriteLine("When JIT'ed, two strings always have same object reference"); + Console.WriteLine(); + return 9; + } + + Console.WriteLine(); + if (passed) + { + Console.WriteLine("PASSED"); + return 100; + } + else + { + Console.WriteLine("FAILED"); + return 1; + } + + } +} diff --git a/tests/src/JIT/Methodical/stringintern/testgenstr.cs b/tests/src/JIT/Methodical/stringintern/testgenstr.cs new file mode 100644 index 0000000..46bd5bd --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/testgenstr.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Runtime.CompilerServices; + +public class GenC +{ + public static string teststr1 = "GenC static \uC09C\u7B8B field"; + public static string[] teststr2 = new string[] { "GenC \u3F2Aarray element 0", + "GenC array element 1\uCB53", "GenC array \u47BBelement 2" }; + [MethodImplAttribute(MethodImplOptions.NoInlining)] + public static string teststr3() + { + return @"GenC method return\\"; + } + public const string teststr4 = "GenC const string\""; + public static string teststr5 = String.Empty; +} diff --git a/tests/src/JIT/Methodical/stringintern/testgenstr.csproj b/tests/src/JIT/Methodical/stringintern/testgenstr.csproj new file mode 100644 index 0000000..d7494e2 --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/testgenstr.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/Methodical/stringintern/teststr.cs b/tests/src/JIT/Methodical/stringintern/teststr.cs new file mode 100644 index 0000000..fc2fbe4 --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/teststr.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Runtime.CompilerServices; + +public class C +{ + public static string teststr1 = "static \uC09C\u7B8B field"; + public static string[] teststr2 = new string[] { "\u3F2Aarray element 0", "array element 1\uCB53", "array \u47BBelement 2" }; + [MethodImplAttribute(MethodImplOptions.NoInlining)] + public static string teststr3() + { + return @"method return\\"; + } + public const string teststr4 = "const string\""; + public static string teststr5 = String.Empty; +} diff --git a/tests/src/JIT/Methodical/stringintern/teststr.csproj b/tests/src/JIT/Methodical/stringintern/teststr.csproj new file mode 100644 index 0000000..33a0aea --- /dev/null +++ b/tests/src/JIT/Methodical/stringintern/teststr.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/app.config b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.cs b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.cs new file mode 100644 index 0000000..5215104 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Reflection; + +namespace Test +{ + + public class C2 + { + public static int Main(string[] args) + { + int ret = 100; + + if (C1Helper.IsFoo(C1.GetString())) + { + Console.WriteLine("PASS: C1 handles intra-assembly interning"); + } + else + { + Console.WriteLine("FAIL: C1 does NOT handles intra-assembly interning"); + ret = 101; + } + + if (C1Helper.IsFoo(C1.GetString())) + { + Console.WriteLine("PASS: C1 handles intra-assembly interning"); + } + else + { + Console.WriteLine("FAIL: C1 does NOT handles intra-assembly interning"); + ret = 101; + } + + Type t = Type.GetType("Test.C1`1[[System.Int64, mscorlib, Version=0.0.0.0, Culture=neutral ]], c1, Version=0.0.0.0, Culture=neutral"); + if (t == null) + { + Console.WriteLine("FAIL: Could not get Type C1`1[[System.Int64, mscorlib, Version=0.0.0.0, Culture=neutral ]], c1, Version=0.0.0.0, Culture=neutral"); + return 101; + } + + Console.WriteLine("Test SUCCESS"); + + return ret; + } + } + +} \ No newline at end of file diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.csproj b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.csproj new file mode 100644 index 0000000..3ff6563 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/b423721.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs new file mode 100644 index 0000000..0881919 --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.Runtime.CompilerServices; + +namespace Test +{ + + public class C1 + { + + public static string GetString() + { + return "foo"; + } + } + + public class C1Helper + { + public static bool IsFoo(string val) + { + return ((object)"foo" == (object)val); + } + } + +} \ No newline at end of file diff --git a/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.csproj b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.csproj new file mode 100644 index 0000000..bff57ad --- /dev/null +++ b/tests/src/JIT/Regression/CLR-x86-JIT/V2.0-Beta2/b423721/c1.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + diff --git a/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.config b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.cs b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.cs new file mode 100644 index 0000000..e23fa82 --- /dev/null +++ b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/* +* Regression test for Dev11 243742 [Triton] +* precommands: +* set COMPLUS_ZAPREQUIRE=2 +* set CORECLR_PREJITType=MDIL +* del /q nitype.signal +* +* Execute: +* %CORE_ROOT%\fxprun.exe App.exe +* +* Expected: +* In the DLL. +* +* DerivedType.RunGenericMethod(22) +* Call completed successfully. +* returns 100 +* +* Failure indicated by: +* App.exe prints "In the DLL." and then hits an AV during the RunGenericMethod call made in the Main method. +*/ + +using System; + +namespace BadOverride1 +{ + public class DerivedType : Dll.ParameterizedBase + { + public override void RunGenericMethod(T1 value) + { + Console.Write( + "DerivedType.RunGenericMethod<{0}>({1})\r\n", + typeof(T1), + value + ); + + return; + } + + public override void RunGenericMethod(T1 value) + { + Console.Write( + "DerivedType.RunGenericMethod<{0},{1}>({2})\r\n", + typeof(T1), + typeof(T2), + value + ); + + return; + } + } + + static class App + { + static int Main() + { + Dll.Apis.RunDllCode(); + Console.Write("\r\n"); + var derivedType = new DerivedType(); + derivedType.RunGenericMethod(22); + Console.Write("Call completed successfully.\r\n"); + return 100; + } + } +} diff --git a/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.csproj b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.csproj new file mode 100644 index 0000000..5118314 --- /dev/null +++ b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/app.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + true + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.cs b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.cs new file mode 100644 index 0000000..211aab4 --- /dev/null +++ b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +namespace BadOverride1.Dll +{ + public static class Apis + { + public static void RunDllCode() + { + Console.Write("In the DLL.\r\n"); + return; + } + } + + public class ParameterizedBase + { + public virtual void RunGenericMethod(T1 value) + { + Console.Write( + "ParameterizedBase<{0}>.RunGenericMethod<{1}>({2})\r\n", + typeof(TDerivedType), + typeof(T1), + value + ); + + return; + } + + public virtual void RunGenericMethod(T1 value) + { + Console.Write( + "ParameterizedBase<{0}>.RunGenericMethod<{1},{2}>({3})\r\n", + typeof(TDerivedType), + typeof(T1), + typeof(T2), + value + ); + + return; + } + } +} diff --git a/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.csproj b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.csproj new file mode 100644 index 0000000..179e9cc --- /dev/null +++ b/tests/src/JIT/Regression/Dev11/External/Dev11_243742/dll.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/jit64/eh/Common/app.config b/tests/src/JIT/jit64/eh/Common/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/jit64/eh/Common/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/jit64/eh/Common/common.cs b/tests/src/JIT/jit64/eh/Common/common.cs new file mode 100644 index 0000000..3e1f20a --- /dev/null +++ b/tests/src/JIT/jit64/eh/Common/common.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Throw in catch handler + +using System; +using System.IO; + +namespace TestUtil +{ + + // This class implements a string writer that writes to a string buffer and a + // given text writer, which allows echoing the written string if stdout is + // specified as the text writer. + + public class StringRecorder : StringWriter + { + private TextWriter outStream; + private int outLimit; // maximum output size limit in characters + private bool bufferIsFull; // if set, stop writting/recording output + + // Constructs a new StringRecorder that writes to the given TextWriter. + public StringRecorder(TextWriter ostream, int olimit) + { + if (ostream == null) + { + throw new ArgumentNullException("ostream", "Output stream cannot be null."); + } + this.outStream = ostream; + this.outLimit = olimit; + this.bufferIsFull = false; + } + + public StringRecorder(TextWriter ostream) : this(ostream, 0) + { + } + + // Only these three methods need to be overridden in order to override + // all different overloads of Write/WriteLine methods. + + public override void Write(char c) + { + if (!this.bufferIsFull) + { + outStream.Write(c); + base.Write(c); + this.CheckOverflow(); + } + } + + public override void Write(string val) + { + if (!this.bufferIsFull) + { + outStream.Write(val); + base.Write(val); + this.CheckOverflow(); + } + } + + public override void Write(char[] buffer, int index, int count) + { + if (!this.bufferIsFull) + { + outStream.Write(buffer, index, count); + base.Write(buffer, index, count); + this.CheckOverflow(); + } + } + + protected void CheckOverflow() + { + if (this.outLimit > 0 && this.ToString().Length > this.outLimit) + { + this.bufferIsFull = true; + this.outStream.WriteLine("ERROR: Output exceeded maximum limit, extra output will be discarded!"); + } + } + } + + + + // This class represents a test log. It allows for redirecting both stdout + // and stderr of the test to StringRecorder objects. The redirected output + // can then be compared to expected output supplied to the class + // constructor. + + public class TestLog + { + + const int SUCC_RET_CODE = 100; + const int FAIL_RET_CODE = 1; + const int OUTPUT_LIMIT_FACTOR = 100; + + const string IGNORE_STR = "#IGNORE#"; + + protected string expectedOut; + protected string expectedError; + protected TextWriter stdOut; + protected TextWriter stdError; + protected StringWriter testOut; + protected StringWriter testError; + + public TestLog() : this(null, null) + { + } + + public TestLog(object expOut) : this(expOut, null) + { + } + + // Creates a new TestLog and set both expected output, and + // expected error to supplied values. + public TestLog(object expOut, object expError) + { + this.expectedOut = expOut == null ? String.Empty : expOut.ToString(); + this.expectedError = expError == null ? String.Empty : expError.ToString(); + this.stdOut = System.Console.Out; + this.stdError = System.Console.Error; + this.testOut = new StringRecorder(this.stdOut, this.expectedOut != null ? this.expectedOut.ToString().Length * OUTPUT_LIMIT_FACTOR : 0); + this.testError = new StringRecorder(this.stdError, this.expectedError != null ? this.expectedError.ToString().Length * OUTPUT_LIMIT_FACTOR : 0); + } + + // Start recoding by redirecting both stdout and stderr to + // string recorders. + public void StartRecording() + { + System.Console.SetOut(this.testOut); + System.Console.SetError(this.testError); + } + + // Stop recording by resetting both stdout and stderr to their + // initial values. + public void StopRecording() + { + // For now we disable the ability of stop recoding, so that we still recoed until the program exits. + // This issue came up with finally being called twice. The first time we stop recoding and from this + // point on we loose all output. + // System.Console.SetOut(this.stdOut); + // System.Console.SetError(this.stdError); + } + + // Returns true if both expected output and expected error are + // identical to actual output and actual error; false otherwise. + protected bool Identical() + { + return this.testOut.ToString().Equals(this.expectedOut) && this.testError.ToString().Equals(this.expectedError); + } + + // Display differences between expected output and actual output. + protected string Diff() + { + string result = String.Empty; + if (!this.testOut.ToString().Equals(this.expectedOut)) + { + string newLine = this.testOut.NewLine; + string delimStr = newLine[0].ToString(); + string[] actualLines = ((this.ActualOutput.Trim()).Replace(newLine, delimStr)).Split(delimStr.ToCharArray()); + string[] expectedLines = ((this.ExpectedOutput.Trim()).Replace(newLine, delimStr)).Split(delimStr.ToCharArray()); + int commonLineCount = actualLines.Length < expectedLines.Length ? actualLines.Length : expectedLines.Length; + bool identical = true; + for (int i = 0; i < commonLineCount && identical; ++i) + { + string actualLine = actualLines[i]; + string expectedLine = expectedLines[i]; + bool similar = true; + while (!actualLine.Equals(expectedLine) && similar) + { + bool ignoreMode = false; + while (expectedLine.StartsWith(IGNORE_STR)) + { + expectedLine = expectedLine.Substring(IGNORE_STR.Length); + ignoreMode = true; + } + int nextIgnore = expectedLine.IndexOf(IGNORE_STR); + if (nextIgnore > 0) + { + string expectedToken = expectedLine.Substring(0, nextIgnore); + int at = actualLine.IndexOf(expectedToken); + similar = (at == 0) || (ignoreMode && at > 0); + expectedLine = expectedLine.Substring(nextIgnore); + actualLine = similar ? actualLine.Substring(at + expectedToken.Length) : actualLine; + } + else + { + similar = (ignoreMode && actualLine.EndsWith(expectedLine)) || actualLine.Equals(expectedLine); + expectedLine = String.Empty; + actualLine = String.Empty; + } + } + if (!similar) + { + result += ("< " + expectedLines[i] + newLine); + result += "---" + newLine; + result += ("> " + actualLines[i] + newLine); + identical = false; + } + } + if (identical) + { + for (int i = commonLineCount; i < expectedLines.Length; ++i) + { + result += ("< " + expectedLines[i] + newLine); + } + for (int i = commonLineCount; i < actualLines.Length; ++i) + { + result += ("< " + actualLines[i] + newLine); + } + } + } + return result; + } + + // Verifies test output and error strings. If identical it returns + // successful return code; otherwise it prints expected output and + // diff results, and it returns failed result code. + public int VerifyOutput() + { + int retCode = -1; + string diff = this.Diff(); + if (String.Empty.Equals(diff)) + { + // this.stdOut.WriteLine(); + // this.stdOut.WriteLine("PASSED"); + retCode = SUCC_RET_CODE; + } + else + { + this.stdOut.WriteLine(); + this.stdOut.WriteLine("FAILED!"); + this.stdOut.WriteLine(); + this.stdOut.WriteLine("[EXPECTED OUTPUT]"); + this.stdOut.WriteLine(this.ExpectedOutput); + this.stdOut.WriteLine("[DIFF RESULT]"); + this.stdOut.WriteLine(diff); + retCode = FAIL_RET_CODE; + } + return retCode; + } + + // Returns actual test output. + public string ActualOutput + { + get + { + return this.testOut.ToString(); + } + } + + // Returns actual test error. + public string ActualError + { + get + { + return this.testError.ToString(); + } + } + + // Returns expected test output. + public string ExpectedOutput + { + get + { + return this.expectedOut.ToString(); + } + } + + // Returns expected test error. + public string ExpectedError + { + get + { + return this.expectedError.ToString(); + } + } + } + +} + diff --git a/tests/src/JIT/jit64/eh/Common/common.csproj b/tests/src/JIT/jit64/eh/Common/common.csproj new file mode 100644 index 0000000..f9744f8 --- /dev/null +++ b/tests/src/JIT/jit64/eh/Common/common.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + diff --git a/tests/src/JIT/jit64/eh/FinallyExec/app.config b/tests/src/JIT/jit64/eh/FinallyExec/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.cs b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.cs new file mode 100644 index 0000000..f7495cd --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Program +{ + + private static TestUtil.TestLog testLog; + + static Program() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine("in finally"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void Test(int count) + { + try + { + try + { + for (;;) + { + try + { + Console.WriteLine(" in try"); + if (count-- == 0) break; + } + finally + { + Console.WriteLine(" in finally"); + } + } + } + finally + { + Console.WriteLine("in finally"); + } + } + catch (Exception) + { + throw; + } + } + + static int Main(string[] args) + { + // start recording + testLog.StartRecording(); + + // run the test + Test(1); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.csproj b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.csproj new file mode 100644 index 0000000..cf1f5bc --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1_o.csproj b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1_o.csproj new file mode 100644 index 0000000..5d9b304 --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset1_o.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.cs b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.cs new file mode 100644 index 0000000..b76ab69 --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Program +{ + + private static TestUtil.TestLog testLog; + + static Program() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine("in finally"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void Test(int count) + { + try + { + try + { + L1: + try + { + Console.WriteLine(" in try"); + if (count-- == 0) return; + } + finally + { + Console.WriteLine(" in finally"); + } + goto L1; + } + finally + { + Console.WriteLine("in finally"); + } + } + catch (Exception) + { + throw; + } + } + + static int Main(string[] args) + { + // start recording + testLog.StartRecording(); + + // run the test + Test(1); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.csproj b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.csproj new file mode 100644 index 0000000..4194f28 --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2_o.csproj b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2_o.csproj new file mode 100644 index 0000000..5226385 --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset2_o.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.cs b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.cs new file mode 100644 index 0000000..78fae4c --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; + +class Program +{ + + private static TestUtil.TestLog testLog; + + static Program() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine(" in try"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine(" in finally"); + expectedOut.WriteLine("in catch"); + + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + + public static void Test(int count) + { + try + { + try + { + L1: + try + { + try + { + L2: + try + { + Console.WriteLine(" in try"); + if (count-- == 0) goto G1; + if (count < 0) throw new Exception(); + } + finally + { + Console.WriteLine(" in finally"); + } + goto L2; + } + finally + { + Console.WriteLine(" in finally"); + } + } + catch (Exception) + { + throw; + } + G1: + goto L1; + } + finally + { + Console.WriteLine(" in finally"); + } + } + catch (Exception) + { + Console.WriteLine("in catch"); + } + } + + static int Main(string[] args) + { + // start recording + testLog.StartRecording(); + + // run the test + Test(1); + + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.csproj b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.csproj new file mode 100644 index 0000000..249e48f --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3_o.csproj b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3_o.csproj new file mode 100644 index 0000000..c683e37 --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nestedTryRegionsWithSameOffset3_o.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.cs b/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.cs new file mode 100644 index 0000000..c2d2cce --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +//112256 +// [karimf] If we happen to have a try that is in nested CATCHs, and the try has a nonLocalGoto +// [only legal if it gos all the way back to the root!], then we replace the nonlocal +// LEAVE with an OPGOTO to the beginning of the cascading CATCHRET chain to unwind the stack... + +using System; + +class simple +{ + private static TestUtil.TestLog testLog; + + static simple() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("Begin test..."); + expectedOut.WriteLine("In main try"); + expectedOut.WriteLine("In main catch"); + expectedOut.WriteLine("In inner try"); + expectedOut.WriteLine("End test..."); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + public static int Main() + { + //Start recording + testLog.StartRecording(); + Console.WriteLine("Begin test..."); + try + { + Console.WriteLine("In main try"); + + throw new Exception(); + } + catch + { + Console.WriteLine("In main catch"); + + try + { + Console.WriteLine("In inner try"); + goto L; + } + catch + { + Console.WriteLine("In inner catch"); + } + } + + Console.WriteLine("DEAD CODE!"); + + L: + + Console.WriteLine("End test..."); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.csproj b/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.csproj new file mode 100644 index 0000000..dd3dd11 --- /dev/null +++ b/tests/src/JIT/jit64/eh/FinallyExec/nonlocalgotoinatryblockinahandler.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/eh/Leaves/app.config b/tests/src/JIT/jit64/eh/Leaves/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/jit64/eh/Leaves/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs b/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs new file mode 100644 index 0000000..485cc77 --- /dev/null +++ b/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +// Non local exit from a catch handler nested inside another catch handler + +using System; + +class test +{ + private static TestUtil.TestLog testLog; + + static test() + { + // Create test writer object to hold expected output + System.IO.StringWriter expectedOut = new System.IO.StringWriter(); + + // Write expected output to string writer object + expectedOut.WriteLine("In try1"); + expectedOut.WriteLine("In catch1"); + expectedOut.WriteLine("In try2"); + expectedOut.WriteLine("In try3"); + expectedOut.WriteLine("In catch3"); + expectedOut.WriteLine("In finally2"); + expectedOut.WriteLine("In finally1"); + expectedOut.WriteLine("Done"); + // Create and initialize test log object + testLog = new TestUtil.TestLog(expectedOut); + } + public static int Main() + { + //Start recording + testLog.StartRecording(); + try + { + Console.WriteLine("In try1"); + throw new Exception(); + } + catch (Exception) + { + Console.WriteLine("In catch1"); + try + { + Console.WriteLine("In try2"); + try + { + Console.WriteLine("In try3"); + throw new Exception(); + } + catch + { + Console.WriteLine("In catch3"); + goto L; + } + } + finally + { + Console.WriteLine("In finally2"); + } + } + finally + { + Console.WriteLine("In finally1"); + } + + Console.WriteLine("Never executed"); + L: + Console.WriteLine("Done"); + // stop recoding + testLog.StopRecording(); + + return testLog.VerifyOutput(); + } +} diff --git a/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.csproj b/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.csproj new file mode 100644 index 0000000..170fc66 --- /dev/null +++ b/tests/src/JIT/jit64/eh/Leaves/nonlocalexitfromnestedcatch.csproj @@ -0,0 +1,52 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + diff --git a/tests/src/JIT/jit64/gc/regress/vswhidbey/143837.csproj b/tests/src/JIT/jit64/gc/regress/vswhidbey/143837.csproj index 004dd92..6e5680b 100644 --- a/tests/src/JIT/jit64/gc/regress/vswhidbey/143837.csproj +++ b/tests/src/JIT/jit64/gc/regress/vswhidbey/143837.csproj @@ -34,7 +34,7 @@ - + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/app.config b/tests/src/JIT/opt/virtualstubdispatch/manyintf/app.config new file mode 100644 index 0000000..8077c95 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest.cs new file mode 100644 index 0000000..7d091f3 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +namespace VirtFunc +{ + class CTest : ITest1, ITest2, ITest3, ITest4, ITest5, ITest6, ITest7, ITest8, ITest9, ITest10 + { + public int f1a() { return 1; } + public int f1b(int a) { return 1 + a; } + public decimal f1c() { return 1; } + public string f1d() { return "1"; } + public int f2a() { return 2; } + public int f2b(int a) { return 2 + a; } + public decimal f2c() { return 2; } + public string f2d() { return "2"; } + public int f3a() { return 3; } + public int f3b(int a) { return 3 + a; } + public decimal f3c() { return 3; } + public string f3d() { return "3"; } + public int f4a() { return 4; } + public int f4b(int a) { return 4 + a; } + public decimal f4c() { return 4; } + public string f4d() { return "4"; } + public int f5a() { return 5; } + public int f5b(int a) { return 5 + a; } + public decimal f5c() { return 5; } + public string f5d() { return "5"; } + public int f6a() { return 6; } + public int f6b(int a) { return 6 + a; } + public decimal f6c() { return 6; } + public string f6d() { return "6"; } + public int f7a() { return 7; } + public int f7b(int a) { return 7 + a; } + public decimal f7c() { return 7; } + public string f7d() { return "7"; } + public int f8a() { return 8; } + public int f8b(int a) { return 8 + a; } + public decimal f8c() { return 8; } + public string f8d() { return "8"; } + public int f9a() { return 9; } + public int f9b(int a) { return 9 + a; } + public decimal f9c() { return 9; } + public string f9d() { return "9"; } + public int f10a() { return 10; } + public int f10b(int a) { return 10 + a; } + public decimal f10c() { return 10; } + public string f10d() { return "10"; } + static int Main() + { + CTest c = new CTest(); + + if (c.f1a() != 1) return 1; + if (c.f1b(0) != 1) return 1; + if (c.f1c() != 1) return 1; + if (c.f1d() != "1") return 1; + if (c.f2a() != 2) return 2; + if (c.f2b(0) != 2) return 2; + if (c.f2c() != 2) return 2; + if (c.f2d() != "2") return 2; + if (c.f3a() != 3) return 3; + if (c.f3b(0) != 3) return 3; + if (c.f3c() != 3) return 3; + if (c.f3d() != "3") return 3; + if (c.f4a() != 4) return 4; + if (c.f4b(0) != 4) return 4; + if (c.f4c() != 4) return 4; + if (c.f4d() != "4") return 4; + if (c.f5a() != 5) return 5; + if (c.f5b(0) != 5) return 5; + if (c.f5c() != 5) return 5; + if (c.f5d() != "5") return 5; + if (c.f6a() != 6) return 6; + if (c.f6b(0) != 6) return 6; + if (c.f6c() != 6) return 6; + if (c.f6d() != "6") return 6; + if (c.f7a() != 7) return 7; + if (c.f7b(0) != 7) return 7; + if (c.f7c() != 7) return 7; + if (c.f7d() != "7") return 7; + if (c.f8a() != 8) return 8; + if (c.f8b(0) != 8) return 8; + if (c.f8c() != 8) return 8; + if (c.f8d() != "8") return 8; + if (c.f9a() != 9) return 9; + if (c.f9b(0) != 9) return 9; + if (c.f9c() != 9) return 9; + if (c.f9d() != "9") return 9; + if (c.f10a() != 10) return 10; + if (c.f10b(0) != 10) return 10; + if (c.f10c() != 10) return 10; + if (c.f10d() != "10") return 10; + + Console.WriteLine("PASSED"); + return 100; + } + } +} +// csc /r:itest1.dll,itest2.dll,itest3.dll,itest4.dll,itest5.dll,itest6.dll,itest7.dll,itest8.dll,itest9.dll,itest10.dll ctest.cs diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_d.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_d.csproj new file mode 100644 index 0000000..2d414f2 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_d.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_do.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_do.csproj new file mode 100644 index 0000000..e605f3f --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_do.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + Full + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_r.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_r.csproj new file mode 100644 index 0000000..3bc81a2 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_r.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + False + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_ro.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_ro.csproj new file mode 100644 index 0000000..629d348 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/ctest_cs_ro.csproj @@ -0,0 +1,61 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + + + + + + + + + False + + + + + True + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)minimal\project.json + $(JitPackagesConfigFileDirectory)minimal\project.lock.json + + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.cs new file mode 100644 index 0000000..704c681 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest1 + { + int f1a(); + int f1b(int a); + decimal f1c(); + string f1d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.csproj new file mode 100644 index 0000000..82a8aa6 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest1.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.cs new file mode 100644 index 0000000..240b549 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest10 + { + int f10a(); + int f10b(int a); + decimal f10c(); + string f10d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.csproj new file mode 100644 index 0000000..18fca80 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest10.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.cs new file mode 100644 index 0000000..84f580f --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest2 + { + int f2a(); + int f2b(int a); + decimal f2c(); + string f2d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.csproj new file mode 100644 index 0000000..0ea7d89 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest2.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.cs new file mode 100644 index 0000000..9ae9b6f --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest3 + { + int f3a(); + int f3b(int a); + decimal f3c(); + string f3d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.csproj new file mode 100644 index 0000000..d504e06 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest3.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.cs new file mode 100644 index 0000000..db6ca24 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest4 + { + int f4a(); + int f4b(int a); + decimal f4c(); + string f4d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.csproj new file mode 100644 index 0000000..f505a1f --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest4.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.cs new file mode 100644 index 0000000..fb1f696 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest5 + { + int f5a(); + int f5b(int a); + decimal f5c(); + string f5d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.csproj new file mode 100644 index 0000000..adb6a80 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest5.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.cs new file mode 100644 index 0000000..cd5cafb --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest6 + { + int f6a(); + int f6b(int a); + decimal f6c(); + string f6d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.csproj new file mode 100644 index 0000000..d2c30ad --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest6.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.cs new file mode 100644 index 0000000..25c8220 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest7 + { + int f7a(); + int f7b(int a); + decimal f7c(); + string f7d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.csproj new file mode 100644 index 0000000..da272f5 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest7.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.cs new file mode 100644 index 0000000..3ec7509 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest8 + { + int f8a(); + int f8b(int a); + decimal f8c(); + string f8d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.csproj new file mode 100644 index 0000000..4abe2eb --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest8.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.cs b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.cs new file mode 100644 index 0000000..7967ce3 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace VirtFunc +{ + public interface ITest9 + { + int f9a(); + int f9b(int a); + decimal f9c(); + string f9d(); + } +} diff --git a/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.csproj b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.csproj new file mode 100644 index 0000000..6d6cff4 --- /dev/null +++ b/tests/src/JIT/opt/virtualstubdispatch/manyintf/itest9.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + $(MSBuildProjectName) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Library + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + 7a9bfb7d + BuildOnly + false + + + + + + + + + False + + + + + + + + + + + + + + + + $(JitPackagesConfigFileDirectory)threading+thread\project.json + $(JitPackagesConfigFileDirectory)threading+thread\project.lock.json + + + + + -- 2.7.4