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:
authorMike Cowan2019-07-31 22:12:34 +0100
committerMartin Hořeňovský2019-07-31 23:12:34 +0200
commite5c0e3322dfd9410d94e151674b0e16b3073fbfe (patch)
tree65e3fcf3bc5ddf48574037a196ff86f8740892cd /include/internal/catch_debug_console.cpp
parentdc8c8e957fd5e65f1c5e512e3b6b77d9fb42be75 (diff)
downloadcatch3-e5c0e3322dfd9410d94e151674b0e16b3073fbfe.tar.gz
Add Android implementation of writeToDebugConsole that prints to Logcat (#1710)
Diffstat (limited to 'include/internal/catch_debug_console.cpp')
-rw-r--r--include/internal/catch_debug_console.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/internal/catch_debug_console.cpp b/include/internal/catch_debug_console.cpp
index 5d25f651..26751c7e 100644
--- a/include/internal/catch_debug_console.cpp
+++ b/include/internal/catch_debug_console.cpp
@@ -11,7 +11,16 @@
#include "catch_platform.h"
#include "catch_windows_h_proxy.h"
-#ifdef CATCH_PLATFORM_WINDOWS
+#if defined(__ANDROID__)
+#include <android/log.h>
+
+ namespace Catch {
+ void writeToDebugConsole( std::string const& text ) {
+ __android_log_print( ANDROID_LOG_DEBUG, "Catch", text.c_str() );
+ }
+ }
+
+#elif defined(CATCH_PLATFORM_WINDOWS)
namespace Catch {
void writeToDebugConsole( std::string const& text ) {