History

Add unittest demo for android platform

zhuling13 committed 12 years ago

Commit 9a335121 parent 3d5990522 files · +2407 −-3Browse files

Showing the changes to test/api/simple_test.cpp (1 of 22 files). Show all

Unified · Split

test/api/simple_test.cpp+16−1
@@ -1,7 +1,22 @@
11 #include <gtest/gtest.h>
2+#if defined (ANDROID_NDK)
3+#include <stdio.h>
4+#endif
25
6+
7+
8+#if defined(ANDROID_NDK)
9+int CodecUtMain(int argc , char** argv ) {
10+#else
311 int main (int argc, char** argv) {
4− testing::InitGoogleTest (&argc, argv);
12+#endif
13+
14+#if defined(ANDROID_NDK)
15+ char xmlPath[1024] = "";
16+ sprintf(xmlPath,"xml:%s",argv[1]);
17+ ::testing::GTEST_FLAG(output) = xmlPath;
18+#endif
19+ ::testing::InitGoogleTest (&argc, argv);
520
621 return RUN_ALL_TESTS();
722 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t