aboutsummaryrefslogtreecommitdiff
path: root/tests/progress/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-09-22 23:32:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-09-22 23:32:28 +0200
commitc09cd7512491cee1e82c1ad8128ce9fd4bc3f79b (patch)
treea659ed768d849130ab5780a11b7f791a463a1a91 /tests/progress/driver.cxx
parent2a00871f07067f8f9e2de08bb9c8f50e1bf6a650 (diff)
Initial modularization with both Clang and VC hacks
Note: gave up on VC about half way though.
Diffstat (limited to 'tests/progress/driver.cxx')
-rw-r--r--tests/progress/driver.cxx35
1 files changed, 29 insertions, 6 deletions
diff --git a/tests/progress/driver.cxx b/tests/progress/driver.cxx
index 0ff68f0..c8c2080 100644
--- a/tests/progress/driver.cxx
+++ b/tests/progress/driver.cxx
@@ -4,20 +4,43 @@
#ifndef _WIN32
# include <unistd.h> // write()
-
-# include <thread> // this_thread::sleep_for()
#else
# include <libbutl/win32-utility.hxx>
-
# include <io.h> //_write()
#endif
+#include <cassert>
+
+#ifndef __cpp_lib_modules
+#include <string>
#include <cstddef> // size_t
#include <iostream>
+#ifndef _WIN32
+# include <thread> // this_thread::sleep_for()
+#endif
+#endif
-#include <libbutl/process.hxx>
-#include <libbutl/fdstream.hxx> // fdnull(), stderr_fd()
-#include <libbutl/diagnostics.hxx>
+// Other includes.
+
+#ifdef __cpp_modules
+#ifdef __cpp_lib_modules
+import std.core;
+import std.io;
+#ifndef _WIN32
+//@@ MOD TODO import std.threading;
+#endif
+#endif
+import butl.process;
+import butl.fdstream;
+import butl.diagnostics;
+
+import butl.optional; // @@ MOD Clang should not be necessary.
+import butl.small_vector; // @@ MOD Clang should not be necessary.
+#else
+#include <libbutl/process.mxx>
+#include <libbutl/fdstream.mxx> // fdnull(), stderr_fd()
+#include <libbutl/diagnostics.mxx>
+#endif
using namespace std;
using namespace butl;