Skip to content
Browse files

* unhandled-exception-test-runner.2.cs,

	unhandled-exception-test-case.2.cs,
	unhandled-exception-base-configuration.config,
	unhandled-exception-legacy-configuration.config,
	Makefile.am: added test for bug #82416.


svn path=/trunk/mono/; revision=85691
  • Loading branch information...
1 parent 4944a63 commit ecea3dc17767f15728aa177a8bf345c5f9263aa7 Massimiliano Mantione committed Sep 12, 2007
View
8 mono/tests/ChangeLog
@@ -1,3 +1,11 @@
+2007-09-12 Massimiliano Mantione <massi@ximian.com>
+
+ * unhandled-exception-test-runner.2.cs,
+ unhandled-exception-test-case.2.cs,
+ unhandled-exception-base-configuration.config,
+ unhandled-exception-legacy-configuration.config,
+ Makefile.am: added test for bug #82416.
+
2007-09-12 Marek Habersack <mhabersack@novell.com>
* assemblyresolve_event2.2.cs: added tests for assembly resolution
View
28 mono/tests/Makefile.am
@@ -338,10 +338,11 @@ if POWERPC
test: testjit test-type-load test-inline-call-stack test-bug-80307 test-bug-81673 test-bug-81691 test-bug-81466
else
# Can't use mkbundle on win32 since there is no static build there
+# Can't run test-unhandled-exception on Windows because of all the debug popups...
if PLATFORM_WIN32
test: testjit test-type-load test-inline-call-stack test-bug-80307 test-bug-81673 test-bug-81691 test-bug-81466
else
-test: testjit testbundle test-type-load test-inline-call-stack test-iomap-regression test-bug-80307 test-bug-81673 test-bug-81691 test-bug-81466
+test: testjit testbundle test-type-load test-inline-call-stack test-iomap-regression test-bug-80307 test-bug-81673 test-bug-81691 test-bug-81466 test-unhandled-exception
endif
endif
@@ -519,6 +520,31 @@ test-inline-call-stack.exe: TestDriver.dll test-inline-call-stack-library.dll $(
test-inline-call-stack: TestDriver.dll test-inline-call-stack-library.dll test-inline-call-stack.exe
$(RUNTIME) test-inline-call-stack.exe
+
+EXTRA_DIST += unhandled-exception-base-configuration.config
+EXTRA_DIST += unhandled-exception-legacy-configuration.config
+EXTRA_DIST += unhandled-exception-test-case.2.cs
+EXTRA_DIST += unhandled-exception-test-runner.2.cs
+unhandled-exception-test-case.1.cs: unhandled-exception-test-case.2.cs
+ cp unhandled-exception-test-case.2.cs unhandled-exception-test-case.1.cs
+unhandled-exception-test-case-legacy.1.cs: unhandled-exception-test-case.1.cs
+ cp unhandled-exception-test-case.1.cs unhandled-exception-test-case-legacy.1.cs
+unhandled-exception-test-case-legacy.2.cs: unhandled-exception-test-case.2.cs
+ cp unhandled-exception-test-case.2.cs unhandled-exception-test-case-legacy.2.cs
+unhandled-exception-test-case.1.exe: unhandled-exception-test-case.1.cs
+ $(MCS) /debug unhandled-exception-test-case.1.cs
+unhandled-exception-test-case-legacy.1.exe: unhandled-exception-test-case-legacy.1.cs
+ $(MCS) /debug unhandled-exception-test-case-legacy.1.cs
+unhandled-exception-test-case.2.exe: unhandled-exception-test-case.2.cs
+ $(GMCS) /debug unhandled-exception-test-case.2.cs
+unhandled-exception-test-case-legacy.2.exe: unhandled-exception-test-case-legacy.2.cs
+ $(GMCS) /debug unhandled-exception-test-case-legacy.2.cs
+unhandled-exception-test-runner.2.exe: unhandled-exception-test-runner.2.cs
+ $(GMCS) /debug unhandled-exception-test-runner.2.cs
+
+test-unhandled-exception: unhandled-exception-test-runner.2.exe unhandled-exception-test-case.1.exe unhandled-exception-test-case-legacy.1.exe unhandled-exception-test-case.2.exe unhandled-exception-test-case-legacy.2.exe
+ $(RUNTIME) unhandled-exception-test-runner.2.exe RUNTIME:../mini/mono,GTC:F
+
EXTRA_DIST += bug-80307.cs
bug-80307.exe: $(srcdir)/bug-80307.cs
$(MCS) -r:System.Web -out:$@ $(srcdir)/bug-80307.cs
View
6 mono/tests/unhandled-exception-base-configuration.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <runtime>
+ <legacyUnhandledExceptionPolicy enabled="0"/>
+ </runtime>
+</configuration>
View
6 mono/tests/unhandled-exception-legacy-configuration.config
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <runtime>
+ <legacyUnhandledExceptionPolicy enabled="1"/>
+ </runtime>
+</configuration>
View
226 mono/tests/unhandled-exception-test-case.2.cs
@@ -0,0 +1,226 @@
+using System;
+using System.Reflection;
+using System.Threading;
+
+namespace UnhandledExceptionTest
+{
+ class TestConfiguration {
+ private bool useDifferentThread = false;
+ public bool DT {
+ get {
+ return useDifferentThread;
+ }
+ }
+ private bool useDifferentApplicationDomain = false;
+ public bool DA {
+ get {
+ return useDifferentApplicationDomain;
+ }
+ }
+ private bool differentConfigurationIsLegacy;
+ public bool DCIL {
+ get {
+ return differentConfigurationIsLegacy;
+ }
+ }
+ private bool useDifferentThreadInDifferentApplicationDomain = false;
+ public bool DTDA {
+ get {
+ return useDifferentThreadInDifferentApplicationDomain;
+ }
+ }
+ private bool addHandlerToRootApplicationDomain = false;
+ public bool HRA {
+ get {
+ return addHandlerToRootApplicationDomain;
+ }
+ }
+ private bool addHandlerToDifferentApplicationDomain = false;
+ public bool HDA {
+ get {
+ return addHandlerToDifferentApplicationDomain;
+ }
+ }
+
+ private static bool ParseArgumentValue (string value) {
+ if ((value.Length == 1)) {
+ switch (value [0]) {
+ case 'T':
+ return true;
+ case 'F':
+ return false;
+ default:
+ Console.WriteLine ("Invalid argument value {0}", value);
+ throw new ApplicationException ("Invalid argument value " + value);
+ }
+ } else {
+ Console.WriteLine ("Invalid argument value {0}", value);
+ throw new ApplicationException ("Invalid argument value " + value);
+ }
+ }
+
+ public TestConfiguration (string configuration) {
+ string [] arguments = configuration.Split (',');
+ foreach (string argument in arguments) {
+ string [] components = argument.Split (':');
+ if (components.Length == 2) {
+ switch (components [0]) {
+ case "DT":
+ useDifferentThread = ParseArgumentValue (components [1]);
+ break;
+ case "DA":
+ useDifferentApplicationDomain = ParseArgumentValue (components [1]);
+ break;
+ case "DCIL":
+ differentConfigurationIsLegacy = ParseArgumentValue (components [1]);
+ break;
+ case "DTDA":
+ useDifferentThreadInDifferentApplicationDomain = ParseArgumentValue (components [1]);
+ break;
+ case "HRA":
+ addHandlerToRootApplicationDomain = ParseArgumentValue (components [1]);
+ break;
+ case "HDA":
+ addHandlerToDifferentApplicationDomain = ParseArgumentValue (components [1]);
+ break;
+ default:
+ Console.WriteLine ("Invalid argument {0}", argument);
+ throw new ApplicationException ("Invalid argument " + argument);
+ }
+ } else {
+ Console.WriteLine ("Invalid argument {0}", argument);
+ throw new ApplicationException ("Invalid argument " + argument);
+ }
+ }
+ }
+ private static string BoolToString (bool value) {
+ return value ? "T" : "F";
+ }
+ public void Print () {
+ Console.WriteLine ("Configuration: DT={0},DA={1},DCIL={2},DTDA={3},HRA={4},HDA={5}",
+ BoolToString (useDifferentThread),
+ BoolToString (useDifferentApplicationDomain),
+ BoolToString (differentConfigurationIsLegacy),
+ BoolToString (useDifferentThreadInDifferentApplicationDomain),
+ BoolToString (addHandlerToRootApplicationDomain),
+ BoolToString (addHandlerToDifferentApplicationDomain));
+ }
+ }
+
+ class Test {
+ private string configurationDescription;
+ private TestConfiguration configuration;
+ public Test (string configurationDescription) {
+ this.configurationDescription = configurationDescription;
+ this.configuration = new TestConfiguration (configurationDescription);
+ }
+
+ private AppDomain CreateDiffrentAppDomain () {
+ AppDomainSetup ads = new AppDomainSetup();
+ ads.ApplicationBase = System.Environment.CurrentDirectory;
+ ads.DisallowBindingRedirects = false;
+ ads.DisallowCodeDownload = true;
+ ads.ConfigurationFile = System.Environment.CurrentDirectory + System.IO.Path.DirectorySeparatorChar +
+ (configuration.DCIL ? "unhandled-exception-legacy-configuration.config" : "unhandled-exception-base-configuration.config");
+ return AppDomain.CreateDomain("DifferentAppDomain", null, ads);
+ }
+
+ public void RunTest () {
+ if (configuration.DA) {
+ AppDomain differentAppDomain = CreateDiffrentAppDomain ();
+ if (configuration.HDA) {
+ differentAppDomain.UnhandledException += new UnhandledExceptionEventHandler (DifferentDomainUnhandledExceptionHandler);
+ }
+ DifferentDomainActor dda = (DifferentDomainActor) differentAppDomain.CreateInstanceAndUnwrap (
+ Assembly.GetEntryAssembly().FullName, typeof (DifferentDomainActor).FullName);
+ dda.Act (configurationDescription);
+ } else {
+ if (configuration.DT) {
+ Console.WriteLine ("Throwing ApplicationException in different thread");
+ } else {
+ Console.WriteLine ("Throwing ApplicationException in main thread");
+ }
+ throw new ApplicationException ("This exception is unhandled");
+ }
+ if (configuration.DT) {
+ Console.WriteLine ("Continuing in different thread after the exception was thrown");
+ }
+ }
+
+ static void Main (string [] args) {
+ if (args.Length != 1) {
+ Console.WriteLine ("Invalid arguments (number of) {0}", args.Length);
+ throw new ApplicationException ("Invalid arguments (number of) " + args.Length);
+ }
+ Test test = new Test (args [0]);
+ test.Act ();
+ }
+ public void Act () {
+ configuration.Print ();
+ Console.WriteLine ("Running under version {0}", Environment.Version);
+
+ if (configuration.HRA) {
+ AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler (RootDomainUnhandledExceptionHandler);
+ }
+
+ if (configuration.DT) {
+ Thread thread = new Thread (new ThreadStart (this.RunTest));
+ thread.Start ();
+ thread.Join ();
+ } else {
+ RunTest ();
+ }
+
+ Console.WriteLine ("Continuing in main thread after the exception was thrown");
+ Console.WriteLine ("Continuing in root AppDomain after the exception was thrown");
+ Console.WriteLine ("MARKER-CONT");
+ }
+
+ public static void PrintUnhandledException (string caller, object sender, UnhandledExceptionEventArgs e) {
+ Exception ex = (Exception)e.ExceptionObject;
+
+ Console.WriteLine ("Running {0}", caller);
+ Console.WriteLine ("Handling exception type {0}", ex.GetType().Name);
+ Console.WriteLine ("Message is {0}", ex.Message);
+ Console.WriteLine ("IsTerminating is set to {0}", e.IsTerminating);
+ }
+ public static void RootDomainUnhandledExceptionHandler (object sender, UnhandledExceptionEventArgs e) {
+ Console.WriteLine ("MARKER-RDUE");
+ PrintUnhandledException ("RootDomainUnhandledExceptionHandler", sender, e);
+ }
+ public static void DifferentDomainUnhandledExceptionHandler (object sender, UnhandledExceptionEventArgs e) {
+ Console.WriteLine ("MARKER-DDUE");
+ PrintUnhandledException ("DifferentDomainUnhandledExceptionHandler", sender, e);
+ }
+ }
+
+ public class DifferentDomainActor : MarshalByRefObject {
+ //private string configurationDescription = null;
+ private TestConfiguration configuration = null;
+
+ public void RunTest () {
+ if (configuration.DTDA) {
+ Console.WriteLine ("Throwing ApplicationException in new thread (different appdomain)");
+ } else if (configuration.DT) {
+ Console.WriteLine ("Throwing ApplicationException in different thread (different appdomain)");
+ } else {
+ Console.WriteLine ("Throwing ApplicationException in main thread (different appdomain)");
+ }
+ throw new ApplicationException ("This exception is unhandled");
+ }
+
+ // Call this method via a proxy.
+ public void Act (string configurationDescription) {
+ //this.configurationDescription = configurationDescription;
+ this.configuration = new TestConfiguration (configurationDescription);
+
+ if (configuration.DTDA) {
+ Thread thread = new Thread (new ThreadStart (this.RunTest));
+ thread.Start ();
+ thread.Join ();
+ } else {
+ RunTest ();
+ }
+ }
+ }
+}
View
600 mono/tests/unhandled-exception-test-runner.2.cs
@@ -0,0 +1,600 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Diagnostics;
+using System.Text.RegularExpressions;
+
+namespace UnhandledExceptionTest {
+ class RunningMode {
+ private string monoRuntime;
+ public string RUNTIME {
+ get {
+ return monoRuntime;
+ }
+ }
+ public bool UseMonoRuntime {
+ get {
+ return (monoRuntime != null) && (monoRuntime != "");
+ }
+ }
+ private bool generateTestConfigurations;
+ public bool GTC {
+ get {
+ return generateTestConfigurations;
+ }
+ }
+
+ private static bool ParseArgumentValue (string value) {
+ if ((value.Length == 1)) {
+ switch (value [0]) {
+ case 'T':
+ return true;
+ case 'F':
+ return false;
+ default:
+ Console.WriteLine ("Invalid argument value {0}", value);
+ throw new ApplicationException ("Invalid argument value " + value);
+ }
+ } else {
+ Console.WriteLine ("Invalid argument value {0}", value);
+ throw new ApplicationException ("Invalid argument value " + value);
+ }
+ }
+ public RunningMode (string runningMode) {
+ string [] arguments = runningMode.Split (',');
+ foreach (string argument in arguments) {
+ string [] components = argument.Split (':');
+ if (components.Length == 2) {
+ switch (components [0]) {
+ case "RUNTIME":
+ monoRuntime = components [1];
+ break;
+ case "GTC":
+ generateTestConfigurations = ParseArgumentValue (components [1]);
+ break;
+ default:
+ Console.WriteLine ("Invalid argument {0}", argument);
+ throw new ApplicationException ("Invalid argument " + argument);
+ }
+ } else {
+ Console.WriteLine ("Invalid argument {0}", argument);
+ throw new ApplicationException ("Invalid argument " + argument);
+ }
+ }
+ }
+ }
+
+ class TestResult {
+ private int exitCode;
+ public int ExitCode {
+ get {
+ return exitCode;
+ }
+ }
+ public bool EXITZERO {
+ get {
+ return (exitCode == 0);
+ }
+ }
+ private bool continueMarker;
+ public bool CONT {
+ get {
+ return continueMarker;
+ }
+ }
+ private bool rootDomainUnhandledExceptionMarker;
+ public bool RDUE {
+ get {
+ return rootDomainUnhandledExceptionMarker;
+ }
+ }
+ private bool differentDomainUnhandledExceptionMarker;
+ public bool DDUE {
+ get {
+ return differentDomainUnhandledExceptionMarker;
+ }
+ }
+ private bool invalidArgument;
+ public bool InvalidArgument {
+ get {
+ return invalidArgument;
+ }
+ }
+ private string [] output;
+
+ private static Regex continuePattern = new Regex ("MARKER-CONT");
+ private static Regex rootDomainUnhandledExceptionPattern = new Regex ("MARKER-RDUE");
+ private static Regex differentDomainUnhandledExceptionPattern = new Regex ("MARKER-DDUE");
+ private static Regex invalidArgumentPattern = new Regex ("Invalid argument");
+
+ private void UpdateFlags () {
+ foreach (string outputLine in output) {
+ if (continuePattern.Match (outputLine).Success) {
+ continueMarker = true;
+ }
+ if (rootDomainUnhandledExceptionPattern.Match (outputLine).Success) {
+ rootDomainUnhandledExceptionMarker = true;
+ }
+ if (differentDomainUnhandledExceptionPattern.Match (outputLine).Success) {
+ differentDomainUnhandledExceptionMarker = true;
+ }
+ if (invalidArgumentPattern.Match (outputLine).Success) {
+ invalidArgument = true;
+ }
+ }
+ }
+ public void PrintOutput () {
+ Console.WriteLine ("--- Output start: ---");
+ foreach (string outputLine in output) {
+ Console.WriteLine (outputLine);
+ }
+ Console.WriteLine ("--- Output end. ---");
+ }
+
+ public TestResult (int exitCode, string [] output) {
+ this.exitCode = exitCode;
+ this.output = output;
+ UpdateFlags ();
+ }
+ }
+
+ class TestDescription {
+ private bool use20Runtime;
+ public bool USE20 {
+ get {
+ return use20Runtime;
+ }
+ }
+ private bool rootConfigurationIsLegacy;
+ public bool RCIL {
+ get {
+ return rootConfigurationIsLegacy;
+ }
+ }
+
+ private bool exitCodeShouldBeZero;
+ public bool EXITZERO {
+ get {
+ return exitCodeShouldBeZero;
+ }
+ }
+ private bool continueMarkerExpected;
+ public bool CONT {
+ get {
+ return continueMarkerExpected;
+ }
+ }
+ private bool rootDomainUnhandledExceptionMarkerExpected;
+ public bool RDUE {
+ get {
+ return rootDomainUnhandledExceptionMarkerExpected;
+ }
+ }
+ private bool differentDomainUnhandledExceptionMarkerExpected;
+ public bool DDUE {
+ get {
+ return differentDomainUnhandledExceptionMarkerExpected;
+ }
+ }
+
+ private static string BoolToString (bool value) {
+ return value ? "T" : "F";
+ }
+ public static readonly int MIN_CONFIG_CODE = 0;
+ public static readonly int MAX_CONFIG_CODE = 255;
+ public static TestDescription FromCode (int code) {
+ if ((code >= MIN_CONFIG_CODE) && (code <= MAX_CONFIG_CODE)) {
+ bool testUSE20 = (code & 0x01) != 0;
+ bool testRCIL = (code & 0x02) != 0;
+ bool testDT = (code & 0x04) != 0;
+ bool testDA = (code & 0x08) != 0;
+ bool testDCIL = (code & 0x10) != 0;
+ bool testDTDA = (code & 0x20) != 0;
+ bool testHRA = (code & 0x40) != 0;
+ bool testHDA = (code & 0x80) != 0;
+
+ if (testDCIL && ! testDA) {
+ return null;
+ } else if (testDTDA && ! testDA) {
+ return null;
+ } else if (testHDA && ! testDA) {
+ return null;
+ } else {
+ string testConfiguration = String.Format ("USE20:{0},RCIL:{1}",
+ BoolToString (testUSE20), BoolToString (testRCIL));
+ string testArguments = String.Format ("DT:{0},DA:{1},DCIL:{2},DTDA:{3},HRA:{4},HDA:{5}",
+ BoolToString (testDT), BoolToString (testDA),
+ BoolToString (testDCIL), BoolToString (testDTDA),
+ BoolToString (testHRA), BoolToString (testHDA));
+ string testExpectedResult = "EXITZERO:F,CONT:F,RDUE:F,DDUE:F";
+ return new TestDescription (testConfiguration, testArguments, testExpectedResult);
+ }
+ } else {
+ return null;
+ }
+ }
+
+
+ private string configuration;
+ public string Configuration {
+ get {
+ return configuration;
+ }
+ }
+ private string arguments;
+ public string Arguments {
+ get {
+ return arguments;
+ }
+ }
+ private string expectedResult;
+ public string ExpectedResult {
+ get {
+ return expectedResult;
+ }
+ }
+
+ private static bool ParseArgumentValue (string value) {
+ if ((value.Length == 1)) {
+ switch (value [0]) {
+ case 'T':
+ return true;
+ case 'F':
+ return false;
+ default:
+ Console.WriteLine ("Invalid argument value {0}", value);
+ throw new ApplicationException ("Invalid argument value " + value);
+ }
+ } else {
+ Console.WriteLine ("Invalid argument value {0}", value);
+ throw new ApplicationException ("Invalid argument value " + value);
+ }
+ }
+
+ public TestDescription (string configuration, string arguments, string expectedResult) {
+ this.configuration = configuration;
+ this.arguments = arguments;
+ this.expectedResult = expectedResult;
+
+ string [] configurationFlags = configuration.Split (',');
+ foreach (string configurationFlag in configurationFlags) {
+ string [] components = configurationFlag.Split (':');
+ if (components.Length == 2) {
+ switch (components [0]) {
+ case "USE20":
+ use20Runtime = ParseArgumentValue (components [1]);
+ break;
+ case "RCIL":
+ rootConfigurationIsLegacy = ParseArgumentValue (components [1]);
+ break;
+ default:
+ Console.WriteLine ("Invalid argument {0}", components [0]);
+ throw new ApplicationException ("Invalid argument " + components [0]);
+ }
+ } else {
+ Console.WriteLine ("Invalid argument {0}", configurationFlag);
+ throw new ApplicationException ("Invalid argument " + configurationFlag);
+ }
+ }
+ string [] expectedResultFlags = expectedResult.Split (',');
+ foreach (string expectedResultFlag in expectedResultFlags) {
+ string [] components = expectedResultFlag.Split (':');
+ if (components.Length == 2) {
+ switch (components [0]) {
+ case "EXITZERO":
+ exitCodeShouldBeZero = ParseArgumentValue (components [1]);
+ break;
+ case "CONT":
+ continueMarkerExpected = ParseArgumentValue (components [1]);
+ break;
+ case "RDUE":
+ rootDomainUnhandledExceptionMarkerExpected = ParseArgumentValue (components [1]);
+ break;
+ case "DDUE":
+ differentDomainUnhandledExceptionMarkerExpected = ParseArgumentValue (components [1]);
+ break;
+ default:
+ Console.WriteLine ("Invalid argument {0}", components [0]);
+ throw new ApplicationException ("Invalid argument " + components [0]);
+ }
+ } else {
+ Console.WriteLine ("Invalid argument {0}", expectedResultFlag);
+ throw new ApplicationException ("Invalid argument " + expectedResultFlag);
+ }
+ }
+
+ }
+
+ public bool Check (TestResult testResult) {
+ if (EXITZERO && (testResult.ExitCode != 0)) {
+ Console.WriteLine ("Test FAILED: exit code is {0}, expected zero", testResult.ExitCode);
+ return false;
+ }
+ if (!CONT && testResult.CONT) {
+ Console.WriteLine ("Test FAILED: unexpected CONT marker found");
+ return false;
+ }
+ if (CONT && !testResult.CONT) {
+ Console.WriteLine ("Test FAILED: expected CONT marker not found");
+ return false;
+ }
+ if (!RDUE && testResult.RDUE) {
+ Console.WriteLine ("Test FAILED: unexpected RDUE marker found");
+ return false;
+ }
+ if (RDUE && !testResult.RDUE) {
+ Console.WriteLine ("Test FAILED: expected RDUE marker not found");
+ return false;
+ }
+ if (!DDUE && testResult.DDUE) {
+ Console.WriteLine ("Test FAILED: unexpected marker found");
+ return false;
+ }
+ if (DDUE && !testResult.DDUE) {
+ Console.WriteLine ("Test FAILED: expected DDUE marker not found");
+ return false;
+ }
+ return true;
+ }
+ }
+
+ class TestRun {
+ private TestDescription description;
+ private TestResult result;
+
+ public TestRun (TestDescription description, RunningMode runningMode) {
+ this.description = description;
+
+ Process p = new Process ();
+ p.StartInfo.UseShellExecute = false;
+ p.StartInfo.CreateNoWindow = true;
+ p.StartInfo.RedirectStandardOutput = true;
+ p.EnableRaisingEvents = true;
+
+ string program = "unhandled-exception-test-case";
+ if (description.RCIL) {
+ program = program + "-legacy";
+ }
+ program = program + (description.USE20 ? ".2.exe" : ".1.exe");
+ if (runningMode.UseMonoRuntime) {
+ p.StartInfo.FileName = runningMode.RUNTIME;
+ p.StartInfo.Arguments = "--debug " + program + " " + description.Arguments;
+ } else {
+ p.StartInfo.FileName = program;
+ p.StartInfo.Arguments = description.Arguments;
+ }
+
+ Console.WriteLine ("Starting process \"{0}\" \"{1}\"", p.StartInfo.FileName, p.StartInfo.Arguments);
+
+ p.Start();
+ // Do not wait for the child process to exit before
+ // reading to the end of its redirected stream.
+ // p.WaitForExit ();
+ // Read the output stream first and then wait.
+ string output = p.StandardOutput.ReadToEnd ();
+ p.WaitForExit ();
+ string[] outputLines = output.Split ('\n');
+
+ result = new TestResult (p.ExitCode, outputLines);
+ }
+
+ public bool Check () {
+ return description.Check (result);
+ }
+
+ private static string BoolToString (bool value) {
+ return value ? "T" : "F";
+ }
+ public void Print () {
+ Console.WriteLine ("Results of test {0} {1} {2}",
+ description.Configuration, description.Arguments, description.ExpectedResult);
+ Console.WriteLine ("Exit code is {0}, output is:", result.ExitCode);
+ result.PrintOutput ();
+ Console.WriteLine ("The following configuration would make the test pass:");
+ Console.WriteLine ("new TestDescription (\"{0}\", \"{1}\", \"EXITZERO:{2},CONT:{3},RDUE:{4},DDUE:{5}\"),",
+ description.Configuration, description.Arguments,
+ BoolToString (result.EXITZERO), BoolToString (result.CONT),
+ BoolToString (result.RDUE), BoolToString (result.DDUE));
+ }
+
+ public bool Process (RunningMode runningMode) {
+ if (runningMode.GTC) {
+ Console.WriteLine ("Generating test configuration...");
+ Print ();
+ return true;
+ } else {
+ Console.WriteLine ("Checking test result...");
+ bool checkResult = Check ();
+ if (! checkResult) {
+ Print ();
+ } else {
+ Console.WriteLine ("Test PASSED");
+ }
+ return checkResult;
+ }
+ }
+ }
+
+ class UnhandledExceptionTester {
+ private static TestDescription [] tests = new TestDescription [] {
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:F", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:F,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:F", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:F,CONT:F,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:F,HDA:T", "EXITZERO:T,CONT:T,RDUE:F,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:F,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:F,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:F,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:F,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:F", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:F,CONT:F,RDUE:T,DDUE:T"),
+new TestDescription ("USE20:F,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:F"),
+new TestDescription ("USE20:T,RCIL:T", "DT:T,DA:T,DCIL:T,DTDA:T,HRA:T,HDA:T", "EXITZERO:T,CONT:T,RDUE:T,DDUE:T"),
+ };
+
+ public static int Main (string [] args) {
+ RunningMode runningMode = (args.Length > 0) ? new RunningMode (args [0]) : new RunningMode ("RUNTIME:mono,GTC:F");
+ if (args.Length > 1) {
+ Console.WriteLine ("Extra arguments unrecognized");
+ return 1;
+ }
+
+ Console.WriteLine ("Starting test run, UseMonoRuntime is {0}, GTC is {1}", runningMode.UseMonoRuntime, runningMode.GTC);
+
+ int result = 0;
+
+ if (! runningMode.GTC) {
+ foreach (TestDescription test in tests) {
+ TestRun testRun = new TestRun (test, runningMode);
+ if (! testRun.Process (runningMode)) {
+ result ++;
+ }
+ }
+ } else {
+ for (int i = TestDescription.MIN_CONFIG_CODE; i <= TestDescription.MAX_CONFIG_CODE; i++) {
+ TestDescription test = TestDescription.FromCode (i);
+ if (test != null) {
+ TestRun testRun = new TestRun (test, runningMode);
+ testRun.Process (runningMode);
+ }
+ }
+ }
+
+ return result;
+ }
+ }
+}
+
+

0 comments on commit ecea3dc

Please sign in to comment.
Something went wrong with that request. Please try again.