diff options
Diffstat (limited to 'tests/unit/libstore/outputs-spec.cc')
-rw-r--r-- | tests/unit/libstore/outputs-spec.cc | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/tests/unit/libstore/outputs-spec.cc b/tests/unit/libstore/outputs-spec.cc index 63cde681b..72a7da974 100644 --- a/tests/unit/libstore/outputs-spec.cc +++ b/tests/unit/libstore/outputs-spec.cc @@ -170,20 +170,22 @@ TEST(ExtendedOutputsSpec, many_carrot) { } -#define TEST_JSON(TYPE, NAME, STR, VAL) \ - \ - TEST(TYPE, NAME ## _to_json) { \ - using nlohmann::literals::operator "" _json; \ - ASSERT_EQ( \ - STR ## _json, \ - ((nlohmann::json) TYPE { VAL })); \ - } \ - \ - TEST(TYPE, NAME ## _from_json) { \ - using nlohmann::literals::operator "" _json; \ - ASSERT_EQ( \ - TYPE { VAL }, \ - (STR ## _json).get<TYPE>()); \ +#define TEST_JSON(TYPE, NAME, STR, VAL) \ + \ + TEST(TYPE, NAME ## _to_json) { \ + using nlohmann::literals::operator "" _json; \ + ASSERT_EQ( \ + STR ## _json, \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + ((nlohmann::json) TYPE { VAL })); \ + } \ + \ + TEST(TYPE, NAME ## _from_json) { \ + using nlohmann::literals::operator "" _json; \ + ASSERT_EQ( \ + /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \ + TYPE { VAL }, \ + (STR ## _json).get<TYPE>()); \ } TEST_JSON(OutputsSpec, all, R"(["*"])", OutputsSpec::All { }) |