Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
        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
        }