Fix StrError test.
This commit is contained in:
parent
53a475ac94
commit
d3a7a4c209
@ -269,10 +269,16 @@ TEST(UtilTest, StrError) {
|
|||||||
#else
|
#else
|
||||||
int error_code = EDOM;
|
int error_code = EDOM;
|
||||||
#endif
|
#endif
|
||||||
int result = StrError(error_code, message = buffer, 1);
|
|
||||||
|
int result = 0;
|
||||||
|
// StrError never uses buffer on MinGW.
|
||||||
|
#ifndef __MINGW32__
|
||||||
|
result = StrError(error_code, message = buffer, 1);
|
||||||
EXPECT_EQ(buffer, message); // Message should point to buffer.
|
EXPECT_EQ(buffer, message); // Message should point to buffer.
|
||||||
EXPECT_EQ(ERANGE, result);
|
EXPECT_EQ(ERANGE, result);
|
||||||
EXPECT_STREQ("", message);
|
EXPECT_STREQ("", message);
|
||||||
|
#endif
|
||||||
|
|
||||||
result = StrError(error_code, message = buffer, BUFFER_SIZE);
|
result = StrError(error_code, message = buffer, BUFFER_SIZE);
|
||||||
EXPECT_EQ(0, result);
|
EXPECT_EQ(0, result);
|
||||||
std::size_t message_size = std::strlen(message);
|
std::size_t message_size = std::strlen(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user