[all-commits] [llvm/llvm-project] 8ec499: [libc++] Tidy up tests for deduction guides and ot...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Apr 5 07:53:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ec4999766bedd3f3195f8c5eebe84ed9320bfe1
      https://github.com/llvm/llvm-project/commit/8ec4999766bedd3f3195f8c5eebe84ed9320bfe1
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-04-05 (Tue, 05 Apr 2022)

  Changed paths:
    R libcxx/test/std/strings/basic.string/allocator_mismatch.compile.fail.cpp
    A libcxx/test/std/strings/basic.string/allocator_mismatch.verify.cpp
    R libcxx/test/std/strings/basic.string/char.bad.fail.cpp
    A libcxx/test/std/strings/basic.string/char.bad.verify.cpp
    R libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp
    M libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.pass.cpp
    R libcxx/test/std/strings/basic.string/string.cons/string_view.compile.fail.cpp
    M libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp
    R libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.fail.cpp
    M libcxx/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp
    R libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp
    M libcxx/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp
    R libcxx/test/std/strings/basic.string/traits_mismatch.compile.fail.cpp
    A libcxx/test/std/strings/basic.string/traits_mismatch.verify.cpp

  Log Message:
  -----------
  [libc++] Tidy up tests for deduction guides and other compile-time failing properties in std::string

Instead of using `.fail.cpp` tests, use `.verify.cpp` to check for the
exact reason of the failure. In the case of deduction guides, use SFINAE
based tests instead since that is our preferred way of testing those.

Finally, ensure that we actually run the test in `iter_alloc_deduction.pass.cpp`,
since we were not running anything before.

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




More information about the All-commits mailing list