-
Notifications
You must be signed in to change notification settings - Fork 0
/
pm_boolean.test.cmake
215 lines (189 loc) · 5.7 KB
/
pm_boolean.test.cmake
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# NB. We don't include_guard this file set; every time it's included, all tests
# should be allowed to run.
include(pm__core)
include(pm_boolean) # system under test
include(pm_fail) # required to fail the tests out
# TODO: This is the poorest man's test suite. We should do... everything better.
# First steps are probably to wrap the test in a macro that deals with
# pass/fail checking, and not throw FATAL_ERROR on exit
function(pm_run_boolean_tests)
message(STATUS "Running Postmodern Boolean Test suite")
pm_bool(NOT V TRUE)
pm_fail(UNLESS NOT V)
pm_bool(NOT V FALSE)
pm_fail(UNLESS V)
set(V FALSE)
pm_bool(NOT V V)
pm_fail(UNLESS V)
set(V FALSE)
pm_bool(NOT V)
pm_fail(UNLESS V)
pm_bool(AND V TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(AND V TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(AND V FALSE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(AND V FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(AND V TRUE TRUE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(AND V FALSE TRUE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(AND V TRUE TRUE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(OR V TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(OR V TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(OR V FALSE TRUE)
pm_fail(UNLESS V)
pm_bool(OR V FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(OR V TRUE TRUE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(OR V FALSE TRUE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(OR V TRUE TRUE TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(OR V TRUE FALSE FALSE FALSE)
pm_fail(UNLESS V)
pm_bool(OR V FALSE FALSE FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V FALSE TRUE)
pm_fail(UNLESS V)
pm_bool(XOR V TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(XOR V FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V TRUE TRUE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V FALSE TRUE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(XOR V TRUE FALSE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(XOR V TRUE TRUE FALSE TRUE)
pm_fail(UNLESS V)
pm_bool(XOR V TRUE TRUE TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(XOR V TRUE TRUE FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V TRUE FALSE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V TRUE FALSE FALSE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V FALSE TRUE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V FALSE TRUE FALSE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V FALSE FALSE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(XOR V TRUE FALSE FALSE FALSE)
pm_fail(UNLESS V)
pm_bool(XOR V FALSE TRUE FALSE FALSE)
pm_fail(UNLESS V)
pm_bool(XOR V FALSE FALSE TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(XOR V FALSE FALSE FALSE TRUE)
pm_fail(UNLESS V)
pm_bool(ANY V TRUE)
pm_fail(UNLESS V)
pm_bool(ANY V FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ANY V TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(ANY V TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(ANY V FALSE TRUE)
pm_fail(UNLESS V)
pm_bool(ANY V FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ANY V TRUE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(ANY V FALSE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(ANY V TRUE TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(ANY V FALSE TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(ANY V FALSE FALSE FALSE)
pm_fail(UNLESS NOT V)
unset(NOT_A_VAR)
pm_bool(ANY V ${NOT_A_VAR})
pm_fail(UNLESS NOT V)
pm_bool(ALL V TRUE)
pm_fail(UNLESS V)
pm_bool(ALL V FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(ALL V TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V FALSE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V TRUE TRUE TRUE)
pm_fail(UNLESS V)
pm_bool(ALL V FALSE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V TRUE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V FALSE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V FALSE FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ALL V ${NOT_A_VAR})
pm_fail(UNLESS NOT V)
pm_bool(ONE V TRUE)
pm_fail(UNLESS V)
pm_bool(ONE V FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ONE V TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(ONE V TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(ONE V FALSE TRUE)
pm_fail(UNLESS V)
pm_bool(ONE V FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ONE V TRUE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(ONE V FALSE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(ONE V TRUE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ONE V FALSE TRUE FALSE)
pm_fail(UNLESS V)
pm_bool(ONE V FALSE FALSE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(ONE V ${NOT_A_VAR})
pm_fail(UNLESS NOT V)
pm_bool(NONE V TRUE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V FALSE)
pm_fail(UNLESS V)
pm_bool(NONE V TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V FALSE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V FALSE FALSE)
pm_fail(UNLESS V)
pm_bool(NONE V TRUE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V FALSE TRUE TRUE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V TRUE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V FALSE TRUE FALSE)
pm_fail(UNLESS NOT V)
pm_bool(NONE V FALSE FALSE FALSE)
pm_fail(UNLESS V)
pm_bool(NONE V ${NOT_A_VAR})
pm_fail(UNLESS V)
message(STATUS "Running Postmodern Boolean Test suite -- done")
endfunction()