[PATCH] Get all localization tests passing on linux!

Dan Albert danalbert at google.com
Mon Aug 18 17:17:05 PDT 2014


================
Comment at: test/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp:38
@@ -37,3 +37,3 @@
             assert(f.tolower('1') == '1');
-            assert(f.tolower('\xDA') == '\xFA');
+            //assert(f.tolower('\xDA') == '\xFA');
             assert(f.tolower('\xFA') == '\xFA');
----------------
Eric Fiselier wrote:
> Dan Albert wrote:
> > I think you meant to #ifdef this one as you did in the next test.
> > 
> > Either way, this doesn't look right to me. Do we know why this is happening? Is this a legitimate difference between Mac and glibc, or is glibc broken? If it's just a difference, then we should still check against the expected glibc behavior. If Linux is broken, we should XFAIL the test rather than skipping the broken part.
> FreeBSD also fails on these tests as well for the same reason and I suspect darwin does as well. This needs more investigation.
Okay. Still, if it needs more investigation then it needs more investigation, but we definitely shouldn't be commenting out anything.

================
Comment at: test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp:79
@@ +78,3 @@
+#   else
+        const char in[] = "10" "\x2E" "06" "\x2E" "2009";
+#   endif
----------------
Eric Fiselier wrote:
> Dan Albert wrote:
> > What?
> GLIBC's locale data says that U002E is used as the separator. 
> http://www.fileformat.info/info/unicode/char/2e/index.htm 
> 
> I don't think that seems unreasonable. More investigation needed though.
But 0x2e == '.'

================
Comment at: test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp:70
@@ +69,3 @@
+#   else
+        const char in[] = "11:55:59 PM";
+#   endif
----------------
Eric Fiselier wrote:
> Dan Albert wrote:
> > Pretty sure this is more bad locale data.
> Probably, but I think GLIBC is correct. Having 12 hour time for en_US seems to make more sense than 24 hour.
Yeah, that's strange. Does this test fail on Mac? If it doesn't, it probably should.

http://reviews.llvm.org/D4861






More information about the cfe-commits mailing list