summaryrefslogtreecommitdiff
path: root/adb/sysdeps_win32_test.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-02-09 16:44:54 -0800
committerJosh Gao <jmgao@google.com>2016-02-10 13:38:32 -0800
commit22554c91676d8981fbfc8b4811d8be3b78a0b74a (patch)
treeead1381387eba2f76560d9a8fb0b9a313526913e /adb/sysdeps_win32_test.cpp
parentdc5bd3a1b9d8710db3cb5b6e3a5fb025a443a7d3 (diff)
adb: allow wine's output for sysdeps_win32 strerror test.
Change-Id: Ia5d04a2347df1bcd8c7efcc1da9cec9725007a58
Diffstat (limited to 'adb/sysdeps_win32_test.cpp')
-rwxr-xr-xadb/sysdeps_win32_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/adb/sysdeps_win32_test.cpp b/adb/sysdeps_win32_test.cpp
index 8f610cfda8..c3a3fd7c17 100755
--- a/adb/sysdeps_win32_test.cpp
+++ b/adb/sysdeps_win32_test.cpp
@@ -87,8 +87,12 @@ TEST(sysdeps_win32, adb_strerror) {
TestAdbStrError(-1, "Unknown error");
// Test very big, positive unknown error.
TestAdbStrError(1000000, "Unknown error");
+
// Test success case.
- TestAdbStrError(0, "No error");
+ // Wine returns "Success" for strerror(0), Windows returns "No error", so accept both.
+ std::string success = adb_strerror(0);
+ EXPECT_TRUE(success == "Success" || success == "No error") << "strerror(0) = " << success;
+
// Test error that regular strerror() should have a string for.
TestAdbStrError(EPERM, "Operation not permitted");
// Test error that regular strerror() doesn't have a string for, but that