mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 17:46:46 +02:00
Merge pull request #10126 from lf-/jade/kill-ndebug
Ban building Nix with NDEBUG
This commit is contained in:
commit
75c5e1a5cc
2 changed files with 4 additions and 2 deletions
|
@ -9,6 +9,10 @@
|
||||||
|
|
||||||
#include <sodium.h>
|
#include <sodium.h>
|
||||||
|
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#error "Nix may not be built with assertions disabled (i.e. with -DNDEBUG)."
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
void initLibUtil() {
|
void initLibUtil() {
|
||||||
|
|
|
@ -6,11 +6,9 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
#ifndef NDEBUG
|
|
||||||
TEST(OutputsSpec, no_empty_names) {
|
TEST(OutputsSpec, no_empty_names) {
|
||||||
ASSERT_DEATH(OutputsSpec::Names { std::set<std::string> { } }, "");
|
ASSERT_DEATH(OutputsSpec::Names { std::set<std::string> { } }, "");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TEST_DONT_PARSE(NAME, STR) \
|
#define TEST_DONT_PARSE(NAME, STR) \
|
||||||
TEST(OutputsSpec, bad_ ## NAME) { \
|
TEST(OutputsSpec, bad_ ## NAME) { \
|
||||||
|
|
Loading…
Reference in a new issue