Example #1
0
        protected override string GenerateTestApplication(string testID)
        {
            string appPath = "";
            TestGenerator testGenerator = new TestGenerator ("ResourcePaneTestApplication" + testID);
            testGenerator.AddMainCode ("Console.WriteLine (\"Hello World\");\n");
            int compRetVal = testGenerator.GenerateTest ();
            Log.printTestStatus ("compiler returned: " + compRetVal);
            Log.printTestStatus ("compiler output:\n" + testGenerator.GetOutPutString ());
            if (compRetVal == 0) {
                appPath = testGenerator.GetAppPathString ();
            } else {
                string errors = "Couldn't generate test application...\n\n";
                errors += testGenerator.FormatErrors (testGenerator.GetErrors ());

                throw new CannotGenerateTestApp (errors);
            }

            return appPath;
        }
Example #2
0
        protected override string GenerateTestApplication(string testID)
        {
            string        appPath       = "";
            TestGenerator testGenerator = new TestGenerator("ResourcePaneTestApplication" + testID);

            testGenerator.AddMainCode("Console.WriteLine (\"Hello World\");\n");
            int compRetVal = testGenerator.GenerateTest();

            Log.printTestStatus("compiler returned: " + compRetVal);
            Log.printTestStatus("compiler output:\n" + testGenerator.GetOutPutString());
            if (compRetVal == 0)
            {
                appPath = testGenerator.GetAppPathString();
            }
            else
            {
                string errors = "Couldn't generate test application...\n\n";
                errors += testGenerator.FormatErrors(testGenerator.GetErrors());

                throw new CannotGenerateTestApp(errors);
            }

            return(appPath);
        }