12 #define EXPECT_LOCALE_EQ(_expected, _actual) \
13 EXPECT_PRED_FORMAT2(::helpers::CompareLocale, _expected, _actual); \
15 #define RESET_LOCALE() setlocale(LC_ALL, "C")
18 #define SET_LOCALE_AZERI() EXPECT_STREQ("Azeri_Azerbaijan.1254", setlocale(LC_ALL, "Azeri_Azerbaijan.1254"))
19 #define SET_LOCALE_DANISH() EXPECT_STREQ("Danish_Denmark.1252", setlocale(LC_ALL, "Danish_Denmark.1252"))
20 #define SET_LOCALE_ENGLISH() EXPECT_STREQ("en-US", setlocale(LC_ALL, "en-US"))
21 #define SET_LOCALE_FRENCH() EXPECT_STREQ("French_France.1252", setlocale(LC_ALL, "French_France.1252"))
22 #define SET_LOCALE_GERMAN() EXPECT_STREQ("German_Germany.1252", setlocale(LC_ALL, "German_Germany.1252"))
23 #define SET_LOCALE_GREEK() EXPECT_STREQ("Greek_Greece.1253", setlocale(LC_ALL, "Greek_Greece.1253"))
24 #define SET_LOCALE_HEBREW() EXPECT_STREQ("Hebrew_Israel.1255", setlocale(LC_ALL, "Hebrew_Israel.1255"))
25 #define SET_LOCALE_HUNGARIAN() EXPECT_STREQ("Hungarian_Hungary.1250", setlocale(LC_ALL, "Hungarian_Hungary.1250"))
26 #define SET_LOCALE_ICELANDIC() EXPECT_STREQ("Icelandic_Iceland.1252", setlocale(LC_ALL, "Icelandic_Iceland.1252"))
27 #define SET_LOCALE_IRISH() EXPECT_STREQ("Irish_Ireland.1252", setlocale(LC_ALL, "Irish_Ireland.1252"))
28 #define SET_LOCALE_JAPANESE() EXPECT_STREQ("Japanese_Japan.932", setlocale(LC_ALL, "Japanese_Japan.932"))
29 #define SET_LOCALE_LITHUANIAN() EXPECT_STREQ("Lithuanian_Lithuania.1257", setlocale(LC_ALL, "Lithuanian_Lithuania.1257"))
30 #define SET_LOCALE_POLISH() EXPECT_STREQ("Polish_Poland.1250", setlocale(LC_ALL, "Polish_Poland.1250"))
31 #define SET_LOCALE_RUSSIAN() EXPECT_STREQ("Russian_Russia.1251", setlocale(LC_ALL, "Russian_Russia.1251"))
32 #define SET_LOCALE_SPANISH() EXPECT_STREQ("Spanish_Spain.1252", setlocale(LC_ALL, "Spanish_Spain.1252"))
33 #define SET_LOCALE_THAI() EXPECT_STREQ("Thai_Thailand.874", setlocale(LC_ALL, "Thai_Thailand.874"))
34 #define SET_LOCALE_TURKISH() EXPECT_STREQ("Turkish_Turkey.1254", setlocale(LC_ALL, "Turkish_Turkey.1254"))
36 #define SET_LOCALE_AZERI() EXPECT_STREQ("az_AZ.utf8", setlocale(LC_ALL, "az_AZ.utf8"))
37 #define SET_LOCALE_DANISH() EXPECT_STREQ("da_DK.utf8", setlocale(LC_ALL, "da_DK.utf8"))
38 #define SET_LOCALE_ENGLISH() EXPECT_STREQ("en_US.utf8", setlocale(LC_ALL, "en_US.utf8"))
39 #define SET_LOCALE_FRENCH() EXPECT_STREQ("fr_FR.utf8", setlocale(LC_ALL, "fr_FR.utf8"))
40 #define SET_LOCALE_GERMAN() EXPECT_STREQ("de_DE.utf8", setlocale(LC_ALL, "de_DE.utf8"))
41 #define SET_LOCALE_GREEK() EXPECT_STREQ("el_GR.utf8", setlocale(LC_ALL, "el_GR.utf8"))
42 #define SET_LOCALE_HEBREW() EXPECT_STREQ("he_IL.utf8", setlocale(LC_ALL, "he_IL.utf8"))
43 #define SET_LOCALE_HUNGARIAN() EXPECT_STREQ("hu_HU.utf8", setlocale(LC_ALL, "hu_HU.utf8"))
44 #define SET_LOCALE_ICELANDIC() EXPECT_STREQ("is_IS.utf8", setlocale(LC_ALL, "is_IS.utf8"))
45 #define SET_LOCALE_IRISH() EXPECT_STREQ("ga_IE.utf8", setlocale(LC_ALL, "ga_IE.utf8"))
46 #define SET_LOCALE_JAPANESE() EXPECT_STREQ("ja_JP.utf8", setlocale(LC_ALL, "ja_JP.utf8"))
47 #define SET_LOCALE_LITHUANIAN() EXPECT_STREQ("lt_LT.utf8", setlocale(LC_ALL, "lt_LT.utf8"))
48 #define SET_LOCALE_POLISH() EXPECT_STREQ("pl_PL.utf8", setlocale(LC_ALL, "pl_PL.utf8"))
49 #define SET_LOCALE_RUSSIAN() EXPECT_STREQ("ru_RU.utf8", setlocale(LC_ALL, "ru_RU.utf8"))
50 #define SET_LOCALE_SPANISH() EXPECT_STREQ("es_ES.utf8", setlocale(LC_ALL, "es_ES.utf8"))
51 #define SET_LOCALE_THAI() EXPECT_STREQ("th_TH.utf8", setlocale(LC_ALL, "th_TH.utf8"))
52 #define SET_LOCALE_TURKISH() EXPECT_STREQ("tr_TR.utf8", setlocale(LC_ALL, "tr_TR.utf8"))
57 std::string locale(uint32_t value);
59 ::testing::AssertionResult CompareLocale(
60 const char* expressionExpected,
const char* expressionActual,
61 uint32_t localeExpected, uint32_t localeActual);
Base includes for helper methods.