Skip to content

Commit

Permalink
Add Android implementation of writeToDebugConsole that prints to Logc…
Browse files Browse the repository at this point in the history
…at (#1710)
  • Loading branch information
michaelcowan authored and horenmar committed Jul 31, 2019
1 parent dc8c8e9 commit e5c0e33
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/internal/catch_debug_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit e5c0e33

Please sign in to comment.