소스 검색

NaCl unit test.

Branimir Karadžić 11 년 전
부모
커밋
2ea546dba0
3개의 변경된 파일21개의 추가작업 그리고 14개의 파일을 삭제
  1. 19 12
      3rdparty/UnitTest++/src/Config.h
  2. 1 1
      3rdparty/UnitTest++/src/Posix/SignalTranslator.h
  3. 1 1
      premake/unittest++.lua

+ 19 - 12
3rdparty/UnitTest++/src/Config.h

@@ -4,23 +4,30 @@
 // Standard defines documented here: http://predef.sourceforge.net
 
 #if defined(_MSC_VER)
-    #pragma warning(disable:4127) // conditional expression is constant
-	#pragma warning(disable:4702) // unreachable code
-	#pragma warning(disable:4722) // destructor never returns, potential memory leak
-
-	#if (_MSC_VER == 1200)  // VC6
-		#pragma warning(disable:4786)
-		#pragma warning(disable:4290)
-	#endif
+#	pragma warning(disable:4127) // conditional expression is constant
+#	pragma warning(disable:4702) // unreachable code
+#	pragma warning(disable:4722) // destructor never returns, potential memory leak
+
+#	if (_MSC_VER == 1200)  // VC6
+#		pragma warning(disable:4786)
+#		pragma warning(disable:4290)
+#	endif
 #endif
 
-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(linux) || \
-    defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)        
-    #define UNITTEST_POSIX
+#if defined(unix) \
+	|| defined(__unix__) \
+	|| defined(__unix) \
+	|| defined(linux) \
+	|| defined(__APPLE__) \
+	|| defined(__NetBSD__) \
+	|| defined(__OpenBSD__) \
+	|| defined(__FreeBSD__) \
+	|| defined(__native_client__)
+#	define UNITTEST_POSIX
 #endif
 
 #if defined(__MINGW32__)
-    #define UNITTEST_MINGW
+#	define UNITTEST_MINGW
 #endif
 
 // by default, MemoryOutStream is implemented in terms of std::ostringstream, which can be expensive.

+ 1 - 1
3rdparty/UnitTest++/src/Posix/SignalTranslator.h

@@ -26,7 +26,7 @@ private:
 //    struct sigaction m_old_SIGALRM_action;
 };
 
-#if !defined (__GNUC__)
+#if !defined(__GNUC__) && !defined(__clang__)
     #define UNITTEST_EXTENSION
 #else
     #define UNITTEST_EXTENSION __extension__

+ 1 - 1
premake/unittest++.lua

@@ -29,7 +29,7 @@ project "UnitTest++"
 		"../3rdparty/UnitTest++/src/*.h",
 	}
 
-	configuration { "linux or osx or android-*" }
+	configuration { "linux or osx or android-* or *nacl*" }
 		files {
 			"../3rdparty/UnitTest++/src/Posix/**.cpp",
 			"../3rdparty/UnitTest++/src/Posix/**.h",