diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-01-30 18:54:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 18:54:53 +0100 |
commit | c9b9260f348299aad70ea2010db6e291ee1e8114 (patch) | |
tree | 7c380cb7a6a04fc95d4397e35ba69dd53c235b0d /src/libexpr/tests/value/context.hh | |
parent | a31d7d4e5e5eeeb7ca12ca798dc383045e5be1a1 (diff) | |
parent | 560142fec0debefe7f983e60663dc3db4bdd79a9 (diff) |
Merge pull request #7713 from obsidiansystems/more-rapid-check
Add more property tests
Diffstat (limited to 'src/libexpr/tests/value/context.hh')
-rw-r--r-- | src/libexpr/tests/value/context.hh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libexpr/tests/value/context.hh b/src/libexpr/tests/value/context.hh new file mode 100644 index 000000000..54d21760e --- /dev/null +++ b/src/libexpr/tests/value/context.hh @@ -0,0 +1,30 @@ +#pragma once + +#include <rapidcheck/gen/Arbitrary.h> + +#include <value/context.hh> + +namespace rc { +using namespace nix; + +template<> +struct Arbitrary<NixStringContextElem::Opaque> { + static Gen<NixStringContextElem::Opaque> arbitrary(); +}; + +template<> +struct Arbitrary<NixStringContextElem::Built> { + static Gen<NixStringContextElem::Built> arbitrary(); +}; + +template<> +struct Arbitrary<NixStringContextElem::DrvDeep> { + static Gen<NixStringContextElem::DrvDeep> arbitrary(); +}; + +template<> +struct Arbitrary<NixStringContextElem> { + static Gen<NixStringContextElem> arbitrary(); +}; + +} |