aboutsummaryrefslogtreecommitdiff
path: root/tests/process-term/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/process-term/driver.cxx')
-rw-r--r--tests/process-term/driver.cxx24
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/process-term/driver.cxx b/tests/process-term/driver.cxx
index 8487bb7..799757c 100644
--- a/tests/process-term/driver.cxx
+++ b/tests/process-term/driver.cxx
@@ -10,9 +10,6 @@
# include <libbutl/win32-utility.hxx>
#endif
-#include <cassert>
-
-#ifndef __cpp_lib_modules_ts
#include <string>
#include <cerrno> // ERANGE
#include <utility> // move()
@@ -23,23 +20,13 @@
#ifndef _WIN32
# include <chrono>
#endif
-#endif
-// Other includes.
+#include <libbutl/process.hxx>
+#include <libbutl/optional.hxx>
+#include <libbutl/fdstream.hxx>
-#ifdef __cpp_modules_ts
-#ifdef __cpp_lib_modules_ts
-import std.core;
-import std.io;
-#endif
-import butl.process;
-import butl.optional;
-import butl.fdstream;
-#else
-#include <libbutl/process.mxx>
-#include <libbutl/optional.mxx>
-#include <libbutl/fdstream.mxx>
-#endif
+#undef NDEBUG
+#include <cassert>
using namespace std;
using namespace butl;
@@ -98,6 +85,7 @@ main (int argc, const char* argv[])
assert (!s.empty ());
char* e (nullptr);
+ errno = 0; // We must clear it according to POSIX.
uint64_t r (strtoull (s.c_str (), &e, 10)); // Can't throw.
assert (errno != ERANGE && e == s.c_str () + s.size ());