diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-23 22:12:28 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-27 11:46:25 +0200 |
| commit | 086cb73ef88a4962345b8284e47cea52da428135 (patch) | |
| tree | fceb159be84afd98e68494c69208226ecf240f7c /tests | |
| parent | 37516080db6878bef6fb1e6c5542165f3f982792 (diff) | |
json keys typing & removed simple t_assert
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_json.c b/tests/test_json.c index b5ad9af..82bb83e 100644 --- a/tests/test_json.c +++ b/tests/test_json.c @@ -90,7 +90,8 @@ i32 test_json_object() { JSON doc = JSON_parse_raw(&perm, "{\"key\": \"value\"}"); t_assert_equal(doc.as.object.len, 1); - t_assert(Str_equals(*Vec_get(doc.as.object.keys, Str, 0), S("key"))); + StrView key = *Vec_get(doc.as.object.keys, StrView, 0); + t_assert_strequal(key, S("key")); JSON value = *JSONObject_get(doc.as.object, S("key")); t_assert_strequal(value.as.string, S("value")); t_assert_equal(Arena_get_used(perm), 672); |
