mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
Make per-variant Arbitrary impls too
This is a nice idea that @roberth requested. If we could factor our a generic `std::variant` impl as a follow-up it would be even better!
This commit is contained in:
parent
ecd3e4ebd7
commit
560142fec0
4 changed files with 67 additions and 17 deletions
|
|
@ -10,6 +10,16 @@
|
|||
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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue