aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/tests/derived-path.hh
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2023-01-30 18:54:53 +0100
committerGitHub <noreply@github.com>2023-01-30 18:54:53 +0100
commitc9b9260f348299aad70ea2010db6e291ee1e8114 (patch)
tree7c380cb7a6a04fc95d4397e35ba69dd53c235b0d /src/libstore/tests/derived-path.hh
parenta31d7d4e5e5eeeb7ca12ca798dc383045e5be1a1 (diff)
parent560142fec0debefe7f983e60663dc3db4bdd79a9 (diff)
Merge pull request #7713 from obsidiansystems/more-rapid-check
Add more property tests
Diffstat (limited to 'src/libstore/tests/derived-path.hh')
-rw-r--r--src/libstore/tests/derived-path.hh28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libstore/tests/derived-path.hh b/src/libstore/tests/derived-path.hh
new file mode 100644
index 000000000..3bc812440
--- /dev/null
+++ b/src/libstore/tests/derived-path.hh
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <rapidcheck/gen/Arbitrary.h>
+
+#include <derived-path.hh>
+
+#include "tests/path.hh"
+#include "tests/outputs-spec.hh"
+
+namespace rc {
+using namespace nix;
+
+template<>
+struct Arbitrary<DerivedPath::Opaque> {
+ static Gen<DerivedPath::Opaque> arbitrary();
+};
+
+template<>
+struct Arbitrary<DerivedPath::Built> {
+ static Gen<DerivedPath::Built> arbitrary();
+};
+
+template<>
+struct Arbitrary<DerivedPath> {
+ static Gen<DerivedPath> arbitrary();
+};
+
+}