Fix test-locale.cpp to report failing value (#2191)

ASSERT_TRUE("a"=="b") only reports that the strings do not match, hiding
their values.
ASSERT_STREQ("a","b") is a functionally equivalent test, but reports
back the values of the failing strings for easier troubleshooting.
This commit is contained in:
Ben Tucker
2016-09-08 13:44:13 -07:00
committed by Sergei Vorobev
parent fe08ab64ee
commit 7071137085
+3 -3
View File
@@ -15,7 +15,7 @@ class LocaleTest : public ::testing::Test
TEST_F(LocaleTest, Success)
{
setlocale (LC_ALL, "");
ASSERT_FALSE (nl_langinfo(CODESET) == NULL);
ASSERT_TRUE(nl_langinfo(CODESET) == std::string("UTF-8"));
setlocale(LC_ALL, "");
ASSERT_FALSE(nl_langinfo(CODESET) == NULL);
ASSERT_STREQ(nl_langinfo(CODESET), "UTF-8");
}