aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/tests/derived-path.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-15 16:50:11 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-15 16:50:11 -0400
commit746c6aae3f4a2f80c730575bd6eca370efe58f2e (patch)
treeb03fa431442b3d9376068d431246ea6a62120810 /src/libstore/tests/derived-path.cc
parent2524a2118647a4125dcae08fe0eb20de5f79a291 (diff)
parentf8a6a9e47314acebea2d72c0ec195360eb58bbec (diff)
Merge remote-tracking branch 'upstream/master' into best-effort-supplementary-groups
Diffstat (limited to 'src/libstore/tests/derived-path.cc')
-rw-r--r--src/libstore/tests/derived-path.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/tests/derived-path.cc b/src/libstore/tests/derived-path.cc
index e6d32dbd0..160443ec1 100644
--- a/src/libstore/tests/derived-path.cc
+++ b/src/libstore/tests/derived-path.cc
@@ -27,11 +27,13 @@ Gen<DerivedPath::Built> Arbitrary<DerivedPath::Built>::arbitrary()
Gen<DerivedPath> Arbitrary<DerivedPath>::arbitrary()
{
- switch (*gen::inRange<uint8_t>(0, 1)) {
+ switch (*gen::inRange<uint8_t>(0, std::variant_size_v<DerivedPath::Raw>)) {
case 0:
return gen::just<DerivedPath>(*gen::arbitrary<DerivedPath::Opaque>());
- default:
+ case 1:
return gen::just<DerivedPath>(*gen::arbitrary<DerivedPath::Built>());
+ default:
+ assert(false);
}
}