2024-03-04 03:24:23 +00:00
|
|
|
#pragma once
|
|
|
|
///@file
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The path to the `unit-test-data` directory. See the contributing
|
|
|
|
* guide in the manual for further details.
|
|
|
|
*/
|
|
|
|
static Path getUnitTestData() {
|
|
|
|
return getEnv("_NIX_TEST_UNIT_DATA").value();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether we should update "golden masters" instead of running tests
|
|
|
|
* against them. See the contributing guide in the manual for further
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
static bool testAccept() {
|
|
|
|
return getEnv("_NIX_TEST_ACCEPT") == "1";
|
|
|
|
}
|
|
|
|
|
2024-03-04 04:21:10 +00:00
|
|
|
constexpr std::string_view cannotReadGoldenMaster =
|
|
|
|
"Cannot read golden master because another test is also updating it";
|
|
|
|
|
|
|
|
constexpr std::string_view updatingGoldenMaster =
|
|
|
|
"Updating golden master";
|
2024-03-04 03:24:23 +00:00
|
|
|
}
|