Skip to content

Commit 627dc30

Browse files
author
Tom van Dijck
committed
Fix package option tests.
1 parent af6e736 commit 627dc30

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

tests/test_package_v2_options.lua

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ local test_dir = os.getcwd()
3030
import { ['v2'] = 'options' }
3131
prepare()
3232

33-
test.isequal({ "MULTITHREADING=0", "STACKSIZE=1024" }, cfg.defines)
33+
test.isequal(2, #cfg.defines)
34+
test.contains({ "MULTITHREADING=0", "STACKSIZE=1024" }, cfg.defines)
3435
end
3536

3637
--
@@ -46,7 +47,8 @@ local test_dir = os.getcwd()
4647

4748
prepare()
4849

49-
test.isequal({ "MULTITHREADING=1", "STACKSIZE=1024" }, cfg.defines)
50+
test.isequal(2, #cfg.defines)
51+
test.contains({ "MULTITHREADING=1", "STACKSIZE=1024" }, cfg.defines)
5052
end
5153

5254
--
@@ -61,7 +63,8 @@ local test_dir = os.getcwd()
6163
}
6264
prepare()
6365

64-
test.isequal({ "MULTITHREADING=0", "STACKSIZE=1024" }, cfg.defines)
66+
test.isequal(2, #cfg.defines)
67+
test.contains({ "MULTITHREADING=0", "STACKSIZE=1024" }, cfg.defines)
6568
end
6669

6770

@@ -77,7 +80,8 @@ local test_dir = os.getcwd()
7780
}
7881
prepare()
7982

80-
test.isequal({ "MULTITHREADING=0", "STACKSIZE=4096" }, cfg.defines)
83+
test.isequal(2, #cfg.defines)
84+
test.contains({ "MULTITHREADING=0", "STACKSIZE=4096" }, cfg.defines)
8185
end
8286

8387

@@ -96,7 +100,9 @@ local test_dir = os.getcwd()
96100
includedependencies { 'v2' }
97101

98102
local cfg = test.getconfig(prj, "Debug")
99-
test.isequal({ "BC_STACK_SIZE=1024" }, cfg.defines)
103+
104+
test.isequal(1, #cfg.defines)
105+
test.contains({ "BC_STACK_SIZE=1024" }, cfg.defines)
100106
end
101107

102108
--
@@ -115,8 +121,8 @@ local test_dir = os.getcwd()
115121

116122
local cfg = test.getconfig(prj, "Debug")
117123

118-
test.print(table.tostring(cfg.defines))
119-
test.isequal({ "BC_ENABLE_MULTITHREADING", "BC_STACK_SIZE=1024" }, cfg.defines)
124+
test.isequal(2, #cfg.defines)
125+
test.contains({ "BC_ENABLE_MULTITHREADING", "BC_STACK_SIZE=1024" }, cfg.defines)
120126
end
121127

122128
--
@@ -135,6 +141,7 @@ local test_dir = os.getcwd()
135141

136142
local cfg = test.getconfig(prj, "Debug")
137143

138-
test.isequal({ "BC_STACK_SIZE=4096" }, cfg.defines)
144+
test.isequal(1, #cfg.defines)
145+
test.contains({ "BC_STACK_SIZE=4096" }, cfg.defines)
139146
end
140147

0 commit comments

Comments
 (0)