@@ -47,7 +47,7 @@ func TestConditionTreeEvaluateSimpleCondition(t *testing.T) {
47
47
},
48
48
}
49
49
condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
50
- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
50
+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
51
51
assert .True (t , result )
52
52
53
53
// Test no match
@@ -56,7 +56,7 @@ func TestConditionTreeEvaluateSimpleCondition(t *testing.T) {
56
56
"string_foo" : "not foo" ,
57
57
},
58
58
}
59
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
59
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
60
60
assert .False (t , result )
61
61
}
62
62
@@ -82,7 +82,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
82
82
}
83
83
84
84
condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
85
- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
85
+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
86
86
assert .True (t , result )
87
87
88
88
// Test match bool
@@ -91,7 +91,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
91
91
"bool_true" : true ,
92
92
},
93
93
}
94
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
94
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
95
95
assert .True (t , result )
96
96
97
97
// Test match both
@@ -101,7 +101,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
101
101
"bool_true" : true ,
102
102
},
103
103
}
104
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
104
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
105
105
assert .True (t , result )
106
106
107
107
// Test no match
@@ -111,7 +111,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
111
111
"bool_true" : false ,
112
112
},
113
113
}
114
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
114
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
115
115
assert .False (t , result )
116
116
}
117
117
@@ -137,7 +137,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
137
137
}
138
138
139
139
condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
140
- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
140
+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
141
141
assert .False (t , result )
142
142
143
143
// Test only bool match with NULL bubbling
@@ -146,7 +146,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
146
146
"bool_true" : true ,
147
147
},
148
148
}
149
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
149
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
150
150
assert .False (t , result )
151
151
152
152
// Test match both
@@ -156,7 +156,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
156
156
"bool_true" : true ,
157
157
},
158
158
}
159
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
159
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
160
160
assert .True (t , result )
161
161
162
162
// Test no match
@@ -166,7 +166,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
166
166
"bool_true" : false ,
167
167
},
168
168
}
169
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
169
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
170
170
assert .False (t , result )
171
171
}
172
172
@@ -203,7 +203,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
203
203
}
204
204
205
205
condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
206
- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
206
+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
207
207
assert .True (t , result )
208
208
209
209
// Test match bool
@@ -212,7 +212,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
212
212
"bool_true" : false ,
213
213
},
214
214
}
215
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
215
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
216
216
assert .True (t , result )
217
217
218
218
// Test match both
@@ -222,7 +222,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
222
222
"bool_true" : false ,
223
223
},
224
224
}
225
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
225
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
226
226
assert .True (t , result )
227
227
228
228
// Test no match
@@ -232,7 +232,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
232
232
"bool_true" : true ,
233
233
},
234
234
}
235
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
235
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
236
236
assert .False (t , result )
237
237
}
238
238
@@ -282,7 +282,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
282
282
}
283
283
284
284
condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
285
- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
285
+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
286
286
assert .True (t , result )
287
287
288
288
// Test only match the NOT condition
@@ -293,7 +293,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
293
293
"int_42" : 43 ,
294
294
},
295
295
}
296
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
296
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
297
297
assert .True (t , result )
298
298
299
299
// Test only match the int condition
@@ -304,7 +304,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
304
304
"int_42" : 42 ,
305
305
},
306
306
}
307
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
307
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
308
308
assert .True (t , result )
309
309
310
310
// Test no match
@@ -315,7 +315,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
315
315
"int_42" : 43 ,
316
316
},
317
317
}
318
- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
318
+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
319
319
assert .False (t , result )
320
320
}
321
321
@@ -383,7 +383,7 @@ func TestConditionTreeEvaluateAnAudienceTreeSingleAudience(t *testing.T) {
383
383
},
384
384
AudienceMap : audienceMap ,
385
385
}
386
- result := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
386
+ result , _ := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
387
387
assert .True (t , result )
388
388
}
389
389
@@ -412,7 +412,7 @@ func TestConditionTreeEvaluateAnAudienceTreeMultipleAudiences(t *testing.T) {
412
412
},
413
413
AudienceMap : audienceMap ,
414
414
}
415
- result := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
415
+ result , _ := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
416
416
assert .True (t , result )
417
417
418
418
// Test only matches audience 11112
@@ -426,6 +426,6 @@ func TestConditionTreeEvaluateAnAudienceTreeMultipleAudiences(t *testing.T) {
426
426
},
427
427
AudienceMap : audienceMap ,
428
428
}
429
- result = conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
429
+ result , _ = conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
430
430
assert .True (t , result )
431
431
}
0 commit comments