aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/TestSuite/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/TestSuite/Util.cs')
-rw-r--r--OpenSim/TestSuite/Util.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/OpenSim/TestSuite/Util.cs b/OpenSim/TestSuite/Util.cs
new file mode 100644
index 0000000..edc2a54
--- /dev/null
+++ b/OpenSim/TestSuite/Util.cs
@@ -0,0 +1,55 @@
1using System;
2
3namespace OpenSim.TestSuite
4{
5
6 public class Utils
7 {
8 enum Result {
9 Fail = 0,
10 Pass = 1,
11 Skip = 3
12 }
13
14 private static String ResultToString(Result r)
15 {
16 if (r == Result.Pass)
17 {
18 return "PASS";
19 }
20 else if (r == Result.Fail)
21 {
22 return "FAIL";
23 }
24 else if (r == Result.Skip)
25 {
26 return "SKIP";
27 }
28 else
29 {
30 return "UNKNOWN";
31 }
32 }
33
34
35 private static void TestResult(Result r, String msg)
36 {
37 System.Console.WriteLine("[{0}]: {1}", ResultToString(r), msg);
38 }
39
40 public static void TestFail(String msg)
41 {
42 TestResult(Result.Fail, msg);
43 }
44
45 public static void TestPass(String msg)
46 {
47 TestResult(Result.Pass, msg);
48 }
49
50 public static void TestSkip(String msg)
51 {
52 TestResult(Result.Skip, msg);
53 }
54 }
55} \ No newline at end of file