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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 25 07:46:18 PST 2022


Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.

I have no particular desire to block this, but should it scope-creep into a full refactor instead? (see my comment inline)



================
Comment at: libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp:150
+#endif
     }
     {
----------------
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
```


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