1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 03:56:01 +01:00

libutil-tests/json-utils: fix -Werror=sign-compare error

I am on a newer different nixpkgs branch, so I am getting this error

(cherry picked from commit 1290b7e53d)
This commit is contained in:
Jörg Thalheim 2025-05-19 09:25:34 +02:00 committed by Mergify
parent bab4e58a5e
commit c0a1e07bca

View file

@ -147,7 +147,7 @@ TEST(getIntegralNumber, rightAssertions)
{ {
auto simple = R"({ "int": 0, "signed": -1 })"_json; auto simple = R"({ "int": 0, "signed": -1 })"_json;
ASSERT_EQ(getUnsigned(valueAt(getObject(simple), "int")), 0); ASSERT_EQ(getUnsigned(valueAt(getObject(simple), "int")), 0u);
ASSERT_EQ(getInteger<int8_t>(valueAt(getObject(simple), "int")), 0); ASSERT_EQ(getInteger<int8_t>(valueAt(getObject(simple), "int")), 0);
ASSERT_EQ(getInteger<int8_t>(valueAt(getObject(simple), "signed")), -1); ASSERT_EQ(getInteger<int8_t>(valueAt(getObject(simple), "signed")), -1);
} }