mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
Format after clang-format update
This commit is contained in:
parent
e6ba450ce2
commit
27f880c098
@ -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.
|
||||||
|
@ -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,
|
||||||
|
@ -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)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user