@@ -47,7 +47,7 @@ func TestConditionTreeEvaluateSimpleCondition(t *testing.T) {
4747 },
4848 }
4949 condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
50- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
50+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
5151 assert .True (t , result )
5252
5353 // Test no match
@@ -56,7 +56,7 @@ func TestConditionTreeEvaluateSimpleCondition(t *testing.T) {
5656 "string_foo" : "not foo" ,
5757 },
5858 }
59- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
59+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
6060 assert .False (t , result )
6161}
6262
@@ -82,7 +82,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
8282 }
8383
8484 condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
85- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
85+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
8686 assert .True (t , result )
8787
8888 // Test match bool
@@ -91,7 +91,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
9191 "bool_true" : true ,
9292 },
9393 }
94- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
94+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
9595 assert .True (t , result )
9696
9797 // Test match both
@@ -101,7 +101,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
101101 "bool_true" : true ,
102102 },
103103 }
104- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
104+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
105105 assert .True (t , result )
106106
107107 // Test no match
@@ -111,7 +111,7 @@ func TestConditionTreeEvaluateMultipleOrConditions(t *testing.T) {
111111 "bool_true" : false ,
112112 },
113113 }
114- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
114+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
115115 assert .False (t , result )
116116}
117117
@@ -137,7 +137,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
137137 }
138138
139139 condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
140- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
140+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
141141 assert .False (t , result )
142142
143143 // Test only bool match with NULL bubbling
@@ -146,7 +146,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
146146 "bool_true" : true ,
147147 },
148148 }
149- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
149+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
150150 assert .False (t , result )
151151
152152 // Test match both
@@ -156,7 +156,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
156156 "bool_true" : true ,
157157 },
158158 }
159- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
159+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
160160 assert .True (t , result )
161161
162162 // Test no match
@@ -166,7 +166,7 @@ func TestConditionTreeEvaluateMultipleAndConditions(t *testing.T) {
166166 "bool_true" : false ,
167167 },
168168 }
169- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
169+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
170170 assert .False (t , result )
171171}
172172
@@ -203,7 +203,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
203203 }
204204
205205 condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
206- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
206+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
207207 assert .True (t , result )
208208
209209 // Test match bool
@@ -212,7 +212,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
212212 "bool_true" : false ,
213213 },
214214 }
215- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
215+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
216216 assert .True (t , result )
217217
218218 // Test match both
@@ -222,7 +222,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
222222 "bool_true" : false ,
223223 },
224224 }
225- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
225+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
226226 assert .True (t , result )
227227
228228 // Test no match
@@ -232,7 +232,7 @@ func TestConditionTreeEvaluateNotCondition(t *testing.T) {
232232 "bool_true" : true ,
233233 },
234234 }
235- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
235+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
236236 assert .False (t , result )
237237}
238238
@@ -282,7 +282,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
282282 }
283283
284284 condTreeParams := e .NewTreeParameters (& user , map [string ]e.Audience {})
285- result := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
285+ result , _ := conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
286286 assert .True (t , result )
287287
288288 // Test only match the NOT condition
@@ -293,7 +293,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
293293 "int_42" : 43 ,
294294 },
295295 }
296- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
296+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
297297 assert .True (t , result )
298298
299299 // Test only match the int condition
@@ -304,7 +304,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
304304 "int_42" : 42 ,
305305 },
306306 }
307- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
307+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
308308 assert .True (t , result )
309309
310310 // Test no match
@@ -315,7 +315,7 @@ func TestConditionTreeEvaluateMultipleMixedConditions(t *testing.T) {
315315 "int_42" : 43 ,
316316 },
317317 }
318- result = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
318+ result , _ = conditionTreeEvaluator .Evaluate (conditionTree , condTreeParams )
319319 assert .False (t , result )
320320}
321321
@@ -383,7 +383,7 @@ func TestConditionTreeEvaluateAnAudienceTreeSingleAudience(t *testing.T) {
383383 },
384384 AudienceMap : audienceMap ,
385385 }
386- result := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
386+ result , _ := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
387387 assert .True (t , result )
388388}
389389
@@ -412,7 +412,7 @@ func TestConditionTreeEvaluateAnAudienceTreeMultipleAudiences(t *testing.T) {
412412 },
413413 AudienceMap : audienceMap ,
414414 }
415- result := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
415+ result , _ := conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
416416 assert .True (t , result )
417417
418418 // Test only matches audience 11112
@@ -426,6 +426,6 @@ func TestConditionTreeEvaluateAnAudienceTreeMultipleAudiences(t *testing.T) {
426426 },
427427 AudienceMap : audienceMap ,
428428 }
429- result = conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
429+ result , _ = conditionTreeEvaluator .Evaluate (audienceTree , treeParams )
430430 assert .True (t , result )
431431}
0 commit comments