Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_debug_console.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-08-29 13:51:55 +0200
committerMartin Hořeňovský2017-08-29 13:51:55 +0200
commit5932576f534ef08a3d13b0cd99464999dbe7b50b (patch)
tree9a2e382dc711547ade17b33b5d208beb77a0995b /include/internal/catch_debug_console.cpp
parentfaead531518a8e9dee4eb1a516bc6ea9072bbb74 (diff)
downloadcatch3-5932576f534ef08a3d13b0cd99464999dbe7b50b.tar.gz
Split writeToDebugConsole out of main path
Diffstat (limited to 'include/internal/catch_debug_console.cpp')
-rw-r--r--include/internal/catch_debug_console.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/internal/catch_debug_console.cpp b/include/internal/catch_debug_console.cpp
new file mode 100644
index 00000000..d817c561
--- /dev/null
+++ b/include/internal/catch_debug_console.cpp
@@ -0,0 +1,29 @@
+/*
+ * Created by Martin on 29/08/2017.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+#include "catch_debug_console.h"
+#include "catch_stream.h"
+#include "catch_platform.h"
+
+#ifdef CATCH_PLATFORM_WINDOWS
+
+#include "catch_windows_h_proxy.h"
+
+ namespace Catch {
+ void writeToDebugConsole( std::string const& text ) {
+ ::OutputDebugStringA( text.c_str() );
+ }
+ }
+#else
+ namespace Catch {
+ void writeToDebugConsole( std::string const& text ) {
+ // !TBD: Need a version for Mac/ XCode and other IDEs
+ Catch::cout() << text;
+ }
+ }
+#endif // Platform