mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 21:46:01 +01:00
More property tests
Also put proper comparison methods on `DerivedPath` and `NixStringContextElem`, which is needed for the tests but good in general.
This commit is contained in:
parent
ec0c0efec6
commit
ecd3e4ebd7
15 changed files with 279 additions and 24 deletions
|
|
@ -1,12 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include <rapidcheck.h>
|
||||
#include <rapidcheck/gen/Arbitrary.h>
|
||||
|
||||
#include "path.hh"
|
||||
#include <path.hh>
|
||||
|
||||
namespace nix {
|
||||
|
||||
struct StorePathName {
|
||||
std::string name;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace rc {
|
||||
using namespace nix;
|
||||
|
||||
template<>
|
||||
struct Arbitrary<StorePathName> {
|
||||
static Gen<StorePathName> arbitrary();
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Arbitrary<StorePath> {
|
||||
static Gen<StorePath> arbitrary();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue