summaryrefslogtreecommitdiffstats
path: root/test/symbol_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/symbol_test.cpp')
-rw-r--r--test/symbol_test.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/test/symbol_test.cpp b/test/symbol_test.cpp
index 4af598b..7cb6666 100644
--- a/test/symbol_test.cpp
+++ b/test/symbol_test.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Raul.
- Copyright 2007-2012 David Robillard <http://drobilla.net>
+ Copyright 2007-2019 David Robillard <http://drobilla.net>
Raul is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -14,8 +14,11 @@
along with Raul. If not, see <http://www.gnu.org/licenses/>.
*/
+#undef NDEBUG
+
#include "raul/Symbol.hpp"
+#include <cassert>
#include <iostream>
#include <list>
#include <string>
@@ -25,12 +28,6 @@ main()
{
using Symbol = Raul::Symbol;
-#define CHECK(cond) \
- do { if (!(cond)) { \
- std::cerr << "Test failed: " << (cond) << std::endl; \
- return 1; \
- } } while (0)
-
std::list<std::string> names;
names.emplace_back("Dry/Wet Balance");
names.emplace_back("foo+1bar(baz)");
@@ -47,11 +44,11 @@ main()
names.emplace_back("");
for (const auto& name : names) {
- CHECK(!Symbol::symbolify(name).empty());
+ assert(!Symbol::symbolify(name).empty());
}
Symbol original("sym");
- CHECK(original == Symbol(original));
+ assert(original == Symbol(original));
bool valid = true;
try {
@@ -60,7 +57,7 @@ main()
std::cerr << "Caught exception: " << e.what() << std::endl;
valid = false;
}
- CHECK(!valid);
+ assert(!valid);
valid = true;
try {
@@ -69,7 +66,7 @@ main()
std::cerr << "Caught exception: " << e.what() << std::endl;
valid = false;
}
- CHECK(!valid);
+ assert(!valid);
return 0;
}