mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Add Android implementation of writeToDebugConsole that prints to Logcat (#1710)
This commit is contained in:
		
				
					committed by
					
						
						Martin Hořeňovský
					
				
			
			
				
	
			
			
			
						parent
						
							dc8c8e957f
						
					
				
				
					commit
					e5c0e3322d
				
			@@ -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 ) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user