public static void RunTest(ExecutableTestHelper.Generator method, string name = null) { #if !SILVERLIGHT ExecutableTestHelper.RunTest(method, true, name); return; #endif #if !FEAT_IKVM ExecutableTestHelper.RunTest(method, false, name); #endif }
public static void RunMethodTest(MethodGenerator method, string name = null) { ExecutableTestHelper.Generator gen = ag => { TypeGen t = ag.Class("Test"); { method(t.Public.Static.Method(typeof(void), "Main")); } }; RunTest(gen, ExecutableTestHelper.GetTestName(method.Method)); }
public static IEnumerable <Action> GetTestsForGenerator(ExecutableTestHelper.Generator method, string expectedOutput, string name = null) { #if !SILVERLIGHT yield return(() => { ConsoleTester.ClearAndStartCapturing(); ExecutableTestHelper.RunTest(method, true, name); ConsoleTester.AssertAndClear(expectedOutput); }); #endif #if !FEAT_IKVM yield return(() => { ConsoleTester.ClearAndStartCapturing(); ExecutableTestHelper.RunTest(method, false, name); ConsoleTester.AssertAndClear(expectedOutput); }); #endif }