aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/tests/outputs-spec.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-12 20:41:29 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-01-12 20:52:29 -0500
commitd29eb085630aac6cbefeafe51937314ce0263593 (patch)
tree73bf197192ee6cbeb539d9c69d735bde68079878 /src/libstore/tests/outputs-spec.cc
parente947aa540129441ebb3df1980c9ba05a935473ca (diff)
Assert on construction that `OutputsSpec::Names` is non-empty
Diffstat (limited to 'src/libstore/tests/outputs-spec.cc')
-rw-r--r--src/libstore/tests/outputs-spec.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/tests/outputs-spec.cc b/src/libstore/tests/outputs-spec.cc
index 5daac9234..c5e3f382b 100644
--- a/src/libstore/tests/outputs-spec.cc
+++ b/src/libstore/tests/outputs-spec.cc
@@ -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 = \