aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/linux/linux_libc_support_unittest.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/linux/linux_libc_support_unittest.cc b/src/common/linux/linux_libc_support_unittest.cc
index d3907e94..a7c5a26a 100644
--- a/src/common/linux/linux_libc_support_unittest.cc
+++ b/src/common/linux/linux_libc_support_unittest.cc
@@ -59,8 +59,12 @@ TEST(LinuxLibcSupportTest, strcmp) {
for (unsigned i = 0; ; ++i) {
if (!test_data[i*2])
break;
- ASSERT_EQ(my_strcmp(test_data[i*2], test_data[i*2 + 1]),
- strcmp(test_data[i*2], test_data[i*2 + 1]));
+ int libc_result = strcmp(test_data[i*2], test_data[i*2 + 1]);
+ if (libc_result > 1)
+ libc_result = 1;
+ else if (libc_result < -1)
+ libc_result = -1;
+ ASSERT_EQ(my_strcmp(test_data[i*2], test_data[i*2 + 1]), libc_result);
}
}