diff options
Diffstat (limited to 'src/libstore/tests/outputs-spec.cc')
-rw-r--r-- | src/libstore/tests/outputs-spec.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/tests/outputs-spec.cc b/src/libstore/tests/outputs-spec.cc index 984d1d963..bf8deaa9d 100644 --- a/src/libstore/tests/outputs-spec.cc +++ b/src/libstore/tests/outputs-spec.cc @@ -206,15 +206,17 @@ using namespace nix; Gen<OutputsSpec> Arbitrary<OutputsSpec>::arbitrary() { - switch (*gen::inRange<uint8_t>(0, 1)) { + switch (*gen::inRange<uint8_t>(0, std::variant_size_v<OutputsSpec::Raw>)) { case 0: return gen::just((OutputsSpec) OutputsSpec::All { }); - default: + case 1: return gen::just((OutputsSpec) OutputsSpec::Names { *gen::nonEmpty(gen::container<StringSet>(gen::map( gen::arbitrary<StorePathName>(), [](StorePathName n) { return n.name; }))), }); + default: + assert(false); } } |