summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2012-09-19 17:58:01 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2012-09-19 17:58:01 +0000
commit5d9f11fe81eaca3989ec7e8dbfe5b31608a75121 (patch)
tree1a0e97a3ff6a98ca233732392ae3ccf322df2bdb /test
parentdf246651195747a948cad465dc717133e22973d6 (diff)
downloadgtest-5d9f11fe81eaca3989ec7e8dbfe5b31608a75121.tar.gz
gtest-5d9f11fe81eaca3989ec7e8dbfe5b31608a75121.tar.bz2
gtest-5d9f11fe81eaca3989ec7e8dbfe5b31608a75121.tar.xz
Improves Android support (by David Turner).
git-svn-id: http://googletest.googlecode.com/svn/trunk@625 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test')
-rw-r--r--test/gtest-filepath_test.cc2
-rw-r--r--test/gtest_unittest.cc2
2 files changed, 3 insertions, 1 deletions
diff --git a/test/gtest-filepath_test.cc b/test/gtest-filepath_test.cc
index 66d4118..3196ea0 100644
--- a/test/gtest-filepath_test.cc
+++ b/test/gtest-filepath_test.cc
@@ -543,6 +543,8 @@ class DirectoryCreationTest : public Test {
return String(temp_dir);
else
return String::Format("%s\\", temp_dir);
+#elif GTEST_OS_LINUX_ANDROID
+ return String("/sdcard/");
#else
return String("/tmp/");
#endif // GTEST_OS_WINDOWS_MOBILE
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index 31a4565..79e11b6 100644
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -1275,7 +1275,7 @@ TEST(StringTest, FormatWorks) {
EXPECT_STREQ("<formatting error or buffer exceeded>",
String::Format("x%s", buffer).c_str());
-#if GTEST_OS_LINUX
+#if GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID
// On Linux, invalid format spec should lead to an error message.
// In other environment (e.g. MSVC on Windows), String::Format() may
// simply ignore a bad format spec, so this assertion is run on