mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
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:
committed by
Sergei Vorobev
parent
fe08ab64ee
commit
7071137085
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user