[PATCH] D26979: Do not hard-code locale data in unit tests: get it from the OS instead

Eric van Gyzen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 28 09:13:49 PST 2016


vangyzen added inline comments.


================
Comment at: projects/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp:79
             const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l);
-            assert(np.thousands_sep() == L',');
+            assert(np.thousands_sep() == wexpected);
         }
----------------
vangyzen wrote:
> This assertion now fails for me.  wexpected is 0xa0 (NBSP), which is correct.  However, np.thousands_sep() is -62, which is 0xc2, which is the first byte of a UTF-8-encoded NBSP.  It looks like the library isn't correctly handling multibyte thousands separators.
D27167 adds support for multibyte strings in decimal_point and thousands_sep.  With that change, this unit test passes.


https://reviews.llvm.org/D26979





More information about the cfe-commits mailing list