OSDN Git Service

fix strerror_r test
authorNick Kralevich <nnk@google.com>
Tue, 15 Jan 2013 18:35:09 +0000 (10:35 -0800)
committerNick Kralevich <nnk@google.com>
Tue, 15 Jan 2013 18:35:09 +0000 (10:35 -0800)
e6e60065ff093ff8c859ab146cf543531cb1967c modified strerror_r to
treat errno as signed. However, the change to the test code
modified the "strerror" test, not the "strerror_r" test.

Make the same change for the strerror_r code.

Change-Id: Ia236a53df5745935e229a4446a74da8bed0cfd7b

tests/string_test.cpp

index 3f7d500..08c73a1 100644 (file)
@@ -77,7 +77,7 @@ TEST(string, strerror_r) {
 
   // Invalid.
   ASSERT_EQ(0, strerror_r(-1, buf, sizeof(buf)));
-  ASSERT_STREQ("Unknown error 4294967295", buf);
+  ASSERT_STREQ("Unknown error -1", buf);
   ASSERT_EQ(0, strerror_r(1234, buf, sizeof(buf)));
   ASSERT_STREQ("Unknown error 1234", buf);