aboutsummaryrefslogtreecommitdiff
path: root/tests/compiler/sloc-counter
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-10-14 21:16:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-10-14 21:23:56 +0300
commit79a99cfca1223aa1f17ceed0ab2fd5de16108b5b (patch)
tree63862c2f48f1314e33cf8283a1a52e13a399178b /tests/compiler/sloc-counter
parent8653effc5751e68e36e7e86db7a953a00dde8439 (diff)
Fortify tests against NDEBUG
Diffstat (limited to 'tests/compiler/sloc-counter')
-rw-r--r--tests/compiler/sloc-counter/driver.cxx4
-rw-r--r--tests/compiler/sloc-counter/test.cxx5
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/compiler/sloc-counter/driver.cxx b/tests/compiler/sloc-counter/driver.cxx
index c85c571..b888d42 100644
--- a/tests/compiler/sloc-counter/driver.cxx
+++ b/tests/compiler/sloc-counter/driver.cxx
@@ -3,12 +3,14 @@
#include <fstream>
#include <sstream>
-#include <cassert>
#include <iostream>
#include <libcutl/compiler/code-stream.hxx>
#include <libcutl/compiler/sloc-counter.hxx>
+#undef NDEBUG
+#include <cassert>
+
using namespace std;
using namespace cutl::compiler;
diff --git a/tests/compiler/sloc-counter/test.cxx b/tests/compiler/sloc-counter/test.cxx
index ff0f5b2..70201ee 100644
--- a/tests/compiler/sloc-counter/test.cxx
+++ b/tests/compiler/sloc-counter/test.cxx
@@ -12,6 +12,9 @@
#include <iostream>
+#undef NDEBUG
+#include <cassert>
+
char str[] = "multi\
line\
string\
@@ -25,7 +28,7 @@ int main(
char* argv[] /*array*/)
{
/* comment start */ int x = 0;
- char* s =
+ char* s =
/* comment start */"foo";
int y = 2
/* tricky stuff *//