Skip to content

Commit 2abf80b

Browse files
Copilotkhvn26
andcommitted
Use ambiguous float values (2.0 vs 2) instead of distinct values (2.5 vs 2)
Co-authored-by: khvn26 <[email protected]>
1 parent bd7f935 commit 2abf80b

9 files changed

+18
-18
lines changed

test_cases/test_in_condition_float_context_comma_delimited_floats__should_match.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"identifier": "float_comma_delim_user",
1313
"key": "key_float_comma_delim_user",
1414
"traits": {
15-
"score": 2.5
15+
"score": 2.0
1616
}
1717
},
1818
"segments": {
@@ -26,7 +26,7 @@
2626
{
2727
"operator": "IN",
2828
"property": "score",
29-
"value": "1.5,2.5,3.5,4.5"
29+
"value": "1.0,2.0,3.0,4.0"
3030
}
3131
]
3232
}

test_cases/test_in_condition_float_context_comma_delimited_ints__should_not_match.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"identifier": "float_comma_delim_int_user",
1313
"key": "key_float_comma_delim_int_user",
1414
"traits": {
15-
"score": 2.5
15+
"score": 2.0
1616
}
1717
},
1818
"segments": {

test_cases/test_in_condition_float_context_float_array__should_match.jsonc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"identifier": "float_array_user",
1313
"key": "key_float_array_user",
1414
"traits": {
15-
"score": 2.5
15+
"score": 2.0
1616
}
1717
},
1818
"segments": {
@@ -27,10 +27,10 @@
2727
"operator": "IN",
2828
"property": "score",
2929
"value": [
30-
1.5,
31-
2.5,
32-
3.5,
33-
4.5
30+
1.0,
31+
2.0,
32+
3.0,
33+
4.0
3434
]
3535
}
3636
]

test_cases/test_in_condition_float_context_int_array__should_not_match.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"identifier": "float_int_array_user",
1313
"key": "key_float_int_array_user",
1414
"traits": {
15-
"score": 2.5
15+
"score": 2.0
1616
}
1717
},
1818
"segments": {

test_cases/test_in_condition_float_context_json_encoded_floats__should_match.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"identifier": "float_json_array_user",
1313
"key": "key_float_json_array_user",
1414
"traits": {
15-
"score": 2.5
15+
"score": 2.0
1616
}
1717
},
1818
"segments": {
@@ -26,7 +26,7 @@
2626
{
2727
"operator": "IN",
2828
"property": "score",
29-
"value": "[1.5,2.5,3.5,4.5]"
29+
"value": "[1.0,2.0,3.0,4.0]"
3030
}
3131
]
3232
}

test_cases/test_in_condition_float_context_json_encoded_ints__should_not_match.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"identifier": "float_json_int_array_user",
1313
"key": "key_float_json_int_array_user",
1414
"traits": {
15-
"score": 2.5
15+
"score": 2.0
1616
}
1717
},
1818
"segments": {

test_cases/test_in_condition_int_context_comma_delimited_floats__should_not_match.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{
2727
"operator": "IN",
2828
"property": "level",
29-
"value": "1.5,2.5,3.5,4.5"
29+
"value": "1.0,2.0,3.0,4.0"
3030
}
3131
]
3232
}

test_cases/test_in_condition_int_context_float_array__should_not_match.jsonc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"operator": "IN",
2828
"property": "level",
2929
"value": [
30-
1.5,
31-
2.5,
32-
3.5,
33-
4.5
30+
1.0,
31+
2.0,
32+
3.0,
33+
4.0
3434
]
3535
}
3636
]

test_cases/test_in_condition_int_context_json_encoded_floats__should_not_match.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{
2727
"operator": "IN",
2828
"property": "level",
29-
"value": "[1.5,2.5,3.5,4.5]"
29+
"value": "[1.0,2.0,3.0,4.0]"
3030
}
3131
]
3232
}

0 commit comments

Comments
 (0)