[libcxx-commits] [PATCH] D120550: [libcxx] [test] Fix the monetary locale pos/neg_format test for Windows and macOS

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 25 08:29:31 PST 2022


mstorsjo added inline comments.


================
Comment at: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp:150
+#endif
     }
     {
----------------
Quuxplusone wrote:
> Is the order always either `value-none-symbol-sign` or `sign-value-none-symbol`?
> Thus, could every one of these tests (even the ones you're not touching) profitably be refactored into something like this?
> ```
>         Fnf f(LOCALE_fr_FR_UTF_8, 1);
>         std::money_base::pattern p = f.neg_format();
> #ifdef __APPLE__
>         assert_has_sign_at_back(p);
> #else
>         assert_has_sign_at_front(p);
> #endif
> ```
I think there’s practically 5 different orders, so it could be possible to do something like that, yes. I’ll see if I can make a sensible improvement with that idea.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120550/new/

https://reviews.llvm.org/D120550



More information about the libcxx-commits mailing list