[all-commits] [llvm/llvm-project] ec3b41: [libc++][test] Rewrite tests for `std::byte` (#204...

A. Jiang via All-commits all-commits at lists.llvm.org
Sat Jun 20 01:16:45 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec3b4186a0f5bd182692721d14ed50af1f4af47d
      https://github.com/llvm/llvm-project/commit/ec3b4186a0f5bd182692721d14ed50af1f4af47d
  Author: A. Jiang <de34 at live.cn>
  Date:   2026-06-20 (Sat, 20 Jun 2026)

  Changed paths:
    A libcxx/test/std/language.support/support.types/byte.compile.pass.cpp
    R libcxx/test/std/language.support/support.types/byte.pass.cpp
    M libcxx/test/std/language.support/support.types/byteops/and.assign.pass.cpp
    M libcxx/test/std/language.support/support.types/byteops/and.pass.cpp
    R libcxx/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp
    R libcxx/test/std/language.support/support.types/byteops/lshift.assign.compile.fail.cpp
    M libcxx/test/std/language.support/support.types/byteops/lshift.assign.pass.cpp
    R libcxx/test/std/language.support/support.types/byteops/lshift.compile.fail.cpp
    M libcxx/test/std/language.support/support.types/byteops/lshift.pass.cpp
    M libcxx/test/std/language.support/support.types/byteops/not.pass.cpp
    M libcxx/test/std/language.support/support.types/byteops/or.assign.pass.cpp
    M libcxx/test/std/language.support/support.types/byteops/or.pass.cpp
    R libcxx/test/std/language.support/support.types/byteops/rshift.assign.compile.fail.cpp
    M libcxx/test/std/language.support/support.types/byteops/rshift.assign.pass.cpp
    R libcxx/test/std/language.support/support.types/byteops/rshift.compile.fail.cpp
    M libcxx/test/std/language.support/support.types/byteops/rshift.pass.cpp
    R libcxx/test/std/language.support/support.types/byteops/to_integer.compile.fail.cpp
    M libcxx/test/std/language.support/support.types/byteops/to_integer.pass.cpp
    M libcxx/test/std/language.support/support.types/byteops/xor.assign.pass.cpp
    M libcxx/test/std/language.support/support.types/byteops/xor.pass.cpp

  Log Message:
  -----------
  [libc++][test] Rewrite tests for `std::byte` (#204116)

Previously, test files for `std::byte` were less than ideal. There were
many issues.
- `byte.pass.cpp` tested many properties which hold for enumeration
types, but failed to verity that `std::byte` is a scoped enumeration
type. Also, it was not a `.compile.pass.cpp`.
- `enum_direct_init.pass.cpp` seemed to be completely redundant.
- It was not tested that compound assignment operators return references
to their left operands.
- Return types of operators were rarely tested.
- Constraints of functions were not tested using SFINAE techniques.
- Test cases were not made run in both constant evaluation and at run
time in the conventional way.

This patch
- rewrites tests for `std::byte` to address these issues,
- expands test coverage for integer types listed in `type_algorithms.h`,
and
- updates lit comments to new-style `// REQUIRES: std-at-least-c++17`.



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