MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / SetTestActive

Method SetTestActive

Examples/StereoKitTest/Tests.cs:102–117  ·  view source on GitHub ↗
(string name)

Source from the content-addressed store, hash-verified

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())

Callers 1

InitMethod · 0.80

Calls 3

CompareMethod · 0.80
WriteMethod · 0.80
ContainsMethod · 0.45

Tested by

no test coverage detected