Format after clang-format update

This commit is contained in:
Robert Hensing 2024-06-03 18:19:37 +02:00
parent e6ba450ce2
commit 27f880c098
3 changed files with 28 additions and 28 deletions

View File

@ -114,12 +114,12 @@ nix_err nix_value_call_multi(
* *
* @see nix_value_call_multi * @see nix_value_call_multi
*/ */
#define NIX_VALUE_CALL(context, state, value, fn, ...) \ #define NIX_VALUE_CALL(context, state, value, fn, ...) \
do { \ do { \
Value * args_array[] = {__VA_ARGS__}; \ Value * args_array[] = {__VA_ARGS__}; \
size_t nargs = sizeof(args_array) / sizeof(args_array[0]); \ size_t nargs = sizeof(args_array) / sizeof(args_array[0]); \
nix_value_call_multi(context, state, fn, nargs, args_array, value); \ nix_value_call_multi(context, state, fn, nargs, args_array, value); \
} while (0) } while (0)
/** /**
* @brief Forces the evaluation of a Nix value. * @brief Forces the evaluation of a Nix value.

View File

@ -21,29 +21,29 @@ class StoreReferenceTest : public CharacterizationTest, public LibStoreTest
} }
}; };
#define URI_TEST_READ(STEM, OBJ) \ #define URI_TEST_READ(STEM, OBJ) \
TEST_F(StoreReferenceTest, PathInfo_##STEM##_from_uri) \ TEST_F(StoreReferenceTest, PathInfo_##STEM##_from_uri) \
{ \ { \
readTest(#STEM, ([&](const auto & encoded) { \ readTest(#STEM, ([&](const auto & encoded) { \
StoreReference expected = OBJ; \ StoreReference expected = OBJ; \
auto got = StoreReference::parse(encoded); \ auto got = StoreReference::parse(encoded); \
ASSERT_EQ(got, expected); \ ASSERT_EQ(got, expected); \
})); \ })); \
} }
#define URI_TEST_WRITE(STEM, OBJ) \ #define URI_TEST_WRITE(STEM, OBJ) \
TEST_F(StoreReferenceTest, PathInfo_##STEM##_to_uri) \ TEST_F(StoreReferenceTest, PathInfo_##STEM##_to_uri) \
{ \ { \
writeTest( \ writeTest( \
#STEM, \ #STEM, \
[&]() -> StoreReference { return OBJ; }, \ [&]() -> StoreReference { return OBJ; }, \
[](const auto & file) { return StoreReference::parse(readFile(file)); }, \ [](const auto & file) { return StoreReference::parse(readFile(file)); }, \
[](const auto & file, const auto & got) { return writeFile(file, got.render()); }); \ [](const auto & file, const auto & got) { return writeFile(file, got.render()); }); \
} }
#define URI_TEST(STEM, OBJ) \ #define URI_TEST(STEM, OBJ) \
URI_TEST_READ(STEM, OBJ) \ URI_TEST_READ(STEM, OBJ) \
URI_TEST_WRITE(STEM, OBJ) URI_TEST_WRITE(STEM, OBJ)
URI_TEST( URI_TEST(
auto, auto,

View File

@ -11,6 +11,6 @@ inline void * observe_string_cb_data(std::string & out)
}; };
#define OBSERVE_STRING(str) \ #define OBSERVE_STRING(str) \
(nix_get_string_callback) nix::testing::observe_string_cb, nix::testing::observe_string_cb_data(str) (nix_get_string_callback) nix::testing::observe_string_cb, nix::testing::observe_string_cb_data(str)
} }