shared/condition: accept size suffixes for ConditionMemory

Fixes #23697.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-06-10 19:50:59 +01:00
committed by Luca Boccassi
parent e48bc49271
commit a61473bde5
2 changed files with 23 additions and 2 deletions
+21
View File
@@ -836,6 +836,27 @@ TEST(condition_test_memory) {
test_condition_test_memory_one("!= 18446744073709547520", true);
test_condition_test_memory_one("<= 18446744073709547520", true);
test_condition_test_memory_one("> 100T", false);
test_condition_test_memory_one("= 100T", false);
test_condition_test_memory_one(">= 100T", false);
test_condition_test_memory_one("< 100T", true);
test_condition_test_memory_one("!= 100T", true);
test_condition_test_memory_one("<= 100T", true);
test_condition_test_memory_one("> 100 T", false);
test_condition_test_memory_one("= 100 T", false);
test_condition_test_memory_one(">= 100 T", false);
test_condition_test_memory_one("< 100 T", true);
test_condition_test_memory_one("!= 100 T", true);
test_condition_test_memory_one("<= 100 T", true);
test_condition_test_memory_one("> 100 T 1 G", false);
test_condition_test_memory_one("= 100 T 1 G", false);
test_condition_test_memory_one(">= 100 T 1 G", false);
test_condition_test_memory_one("< 100 T 1 G", true);
test_condition_test_memory_one("!= 100 T 1 G", true);
test_condition_test_memory_one("<= 100 T 1 G", true);
assert_se(asprintf(&t, "= %" PRIu64, memory) >= 0);
test_condition_test_memory_one(t, true);
t = mfree(t);