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 @@
1#include <gtest/gtest.h>1#include <gtest/gtest.h>
2#if defined (ANDROID_NDK)
3#include <stdio.h>
4#endif
2 5
6
7
8#if defined(ANDROID_NDK)
9int CodecUtMain(int argc , char** argv ) {
10#else
3int main (int argc, char** argv) {11int 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);
5 20
6 return RUN_ALL_TESTS();21 return RUN_ALL_TESTS();
7}22}

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