Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/nunit/RunTests.cs')
-rwxr-xr-xmcs/nunit/RunTests.cs79
1 files changed, 0 insertions, 79 deletions
diff --git a/mcs/nunit/RunTests.cs b/mcs/nunit/RunTests.cs
deleted file mode 100755
index e5369546900..00000000000
--- a/mcs/nunit/RunTests.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System;
-using System.IO;
-using System.Threading;
-using System.Globalization;
-
-using NUnit.Framework;
-
-namespace MonoTests {
-
-public class MyTestRunner {
-
- static TextWriter fWriter = Console.Out;
-
- protected static TextWriter Writer {
- get { return fWriter; }
- }
-
- public static void Print(TestResult result) {
- PrintErrors(result);
- PrintFailures(result);
- PrintHeader(result);
- }
-
- /// <summary>Prints the errors to the standard output.</summary>
- public static void PrintErrors(TestResult result) {
- if (result.ErrorCount != 0) {
- if (result.ErrorCount == 1)
- Writer.WriteLine("There was "+result.ErrorCount+" error:");
- else
- Writer.WriteLine("There were "+result.ErrorCount+" errors:");
-
- int i= 1;
- foreach (TestFailure failure in result.Errors) {
- Writer.WriteLine(i++ + ") "+failure+"("+failure.ThrownException.GetType().ToString()+")");
- Writer.Write(failure.ThrownException);
- }
- }
- }
-
- /// <summary>Prints failures to the standard output.</summary>
- public static void PrintFailures(TestResult result) {
- if (result.FailureCount != 0) {
- if (result.FailureCount == 1)
- Writer.WriteLine("There was " + result.FailureCount + " failure:");
- else
- Writer.WriteLine("There were " + result.FailureCount + " failures:");
- int i = 1;
- foreach (TestFailure failure in result.Failures) {
- Writer.Write(i++ + ") " + failure.FailedTest);
- Exception t= failure.ThrownException;
- if (t.Message != "")
- Writer.WriteLine(" \"" + t.Message + "\"");
- else {
- Writer.WriteLine();
- Writer.Write(failure.ThrownException);
- }
- }
- }
- }
-
- /// <summary>Prints the header of the report.</summary>
- public static void PrintHeader(TestResult result) {
- if (result.WasSuccessful) {
- Writer.WriteLine();
- Writer.Write("OK");
- Writer.WriteLine (" (" + result.RunCount + " tests)");
-
- } else {
- Writer.WriteLine();
- Writer.WriteLine("FAILURES!!!");
- Writer.WriteLine("Tests Run: "+result.RunCount+
- ", Failures: "+result.FailureCount+
- ", Errors: "+result.ErrorCount);
- }
- }
-
-}
-
-}