[all-commits] [llvm/llvm-project] 47afa1: [libc++][z/OS] Disable portion of formatter.char.f...

Zibi Sarbinowski via All-commits all-commits at lists.llvm.org
Wed Jun 12 06:29:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47afa10bbaa89351afa9bcc53dd959e6181ebf3d
      https://github.com/llvm/llvm-project/commit/47afa10bbaa89351afa9bcc53dd959e6181ebf3d
  Author: Zibi Sarbinowski <zibi at ca.ibm.com>
  Date:   2024-06-12 (Wed, 12 Jun 2024)

  Changed paths:
    M libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.funsigned-char.pass.cpp

  Log Message:
  -----------
  [libc++][z/OS] Disable portion of formatter.char.funsigned-char.pass.cpp for no unicode (#94044)

This PR carves out small portion of the test in subject to avoid the
following failure when unicode is not available.

```
# | Assertion failure: result == expected .../formatter.char.funsigned-char.pass.cpp 56
# |
# | Format string   ?}
# | Expected output '\x{80}'
# | Actual output   '�'
```

This was traced down to different definition of
`__code_point_view::__consume()` under macro_LIBCXX_HAS_NO_UNICODE which
is called inside `__formatter::__escape()`. The `__consume()` returns
`__ok` and code assumes that escaped sequence was already written but it
is not., thus the failure. Here is the snippen code we fall into:

```
    typename __unicode::__consume_result __result = __view.__consume();
    if (__result.__status == __unicode::__consume_result::__ok) {
      __escape = __formatter::__is_escaped_sequence_written(__str, __result.__code_point, __escape, __mark);
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list