1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 16:02:43 +01:00

Assert on construction that OutputsSpec::Names is non-empty

This commit is contained in:
John Ericson 2023-01-12 20:41:29 -05:00
parent e947aa5401
commit d29eb08563
2 changed files with 12 additions and 3 deletions

View file

@ -4,6 +4,12 @@
namespace nix {
#ifndef NDEBUG
TEST(OutputsSpec, no_empty_names) {
ASSERT_DEATH(OutputsSpec::Names { std::set<std::string> { } }, "");
}
#endif
#define TEST_DONT_PARSE(NAME, STR) \
TEST(OutputsSpec, bad_ ## NAME) { \
std::optional OutputsSpecOpt = \