-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesting.lua
More file actions
36 lines (29 loc) · 742 Bytes
/
testing.lua
File metadata and controls
36 lines (29 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
g_currentTest = nil
local tests = {
TestAnimalCluster = {
className = "TestAnimalCluster",
filename = "dataS/scripts/animals/husbandry/cluster/TestAnimalCluster.lua"
},
TestI3DManager = {
className = "TestI3DManager",
filename = "dataS/scripts/i3d/TestI3DManager.lua"
}
}
function initTesting()
local testName = StartParams.getValue("test")
if testName ~= nil then
local data = tests[testName]
if data ~= nil then
source(data.filename)
g_currentTest = ClassUtil.getClassObject(data.className)
if g_currentTest ~= nil then
g_currentTest.init()
Logging.info("Started test '%s'", testName)
return true
else
Logging.error("Test '%s' not defined", testName)
end
end
end
return false
end