| 100 | ActiveTest = demoTests[index]; |
| 101 | } |
| 102 | public static void SetTestActive(string name) |
| 103 | { |
| 104 | name = name.ToLower(); |
| 105 | Type result = allTests.OrderBy( a => { |
| 106 | string str = a.Name.ToLower(); |
| 107 | if (str == name) return 0; |
| 108 | else if (str.Contains(name)) return str.Length - name.Length; |
| 109 | else return 1000 + string.Compare(str, name); |
| 110 | }).First(); |
| 111 | Log.Write(LogLevel.Info, "Starting Scene: " + result.Name); |
| 112 | |
| 113 | sceneFrame = 0; |
| 114 | runFrames = 2; |
| 115 | runSeconds = 0; |
| 116 | ActiveTest = result; |
| 117 | } |
| 118 | public static void Test(Func<bool> testFunction) |
| 119 | { |
| 120 | if (!testFunction()) |