[all-commits] [llvm/llvm-project] 6efda5: [libcxx] [test] Fix the locale ctype widen tests o...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Apr 5 10:08:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6efda5e6d6531ced6e35ccb3f6499ca13b8edb60
      https://github.com/llvm/llvm-project/commit/6efda5e6d6531ced6e35ccb3f6499ca13b8edb60
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-04-05 (Tue, 05 Apr 2022)

  Changed paths:
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_1.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/widen_many.pass.cpp

  Log Message:
  -----------
  [libcxx] [test] Fix the locale ctype widen tests on Windows

On Windows, like on macOS and FreeBSD, widening char(-5) in the
"C" locale succeeds and produces L'\u00fb'.

Switch widen_many to test \xfb instead of \x85; the mingw
version of btowc widens \x85 in the "C" locale into
\u2026 (which is the corresponding character according to the
Windows-1252 codepage), while Microsoft CRT's btowc widens it
into \u0085 (just like macOS and FreeBSD). Switch this to test \xfb
which is the character tested by the widen_1 test (as `char(-5)`),
which gets handled the same by all Windows implementations of btowc.

Differential Revision: https://reviews.llvm.org/D121003




More information about the All-commits mailing list