[PATCH] Get all localization tests passing on linux!

Eric Fiselier eric at efcs.ca
Mon Aug 18 17:22:36 PDT 2014


Thanks for the comments. It seems not all of the changes made it into the last patch. I'll implement your advice and back out all of the categories.ctype tests and just mark them XFAIL.

================
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');
----------------
Dan Albert wrote:
> 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.
Yeah, Sorry I thought I took that out and just marked it XFAIL. 

================
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
----------------
Dan Albert wrote:
> 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 == '.'
I must have been tired. Thanks for the correction. I'll see what up with these tests.

================
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
----------------
Dan Albert wrote:
> 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.
I'll double check on this. I think this test passes on mac.

http://reviews.llvm.org/D4861






More information about the cfe-commits mailing list