[libcxx-commits] [libcxx] 4947ecf - [libc++] Guard testing implementation details.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 8 08:35:06 PDT 2021
Author: Mark de Wever
Date: 2021-07-08T17:34:58+02:00
New Revision: 4947ecf4e994fb72e90b8bf8d6ba110f7a862e1a
URL: https://github.com/llvm/llvm-project/commit/4947ecf4e994fb72e90b8bf8d6ba110f7a862e1a
DIFF: https://github.com/llvm/llvm-project/commit/4947ecf4e994fb72e90b8bf8d6ba110f7a862e1a.diff
LOG: [libc++] Guard testing implementation details.
The unit tests test some implementation details. As @Quuxplusone pointed
out in D96664 this should only be tested when the tests use libc++. This
addresses the issue for code already in main.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D105568
Added:
Modified:
libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
index 5b18834e51462..7af82c3d779d8 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
@@ -39,8 +39,8 @@ void test_exception() {
context.check_arg_id(0);
assert(false);
} catch (const std::format_error& e) {
- assert(strcmp(e.what(), "Using manual argument numbering in automatic "
- "argument numbering mode") == 0);
+ LIBCPP_ASSERT(strcmp(e.what(), "Using manual argument numbering in automatic "
+ "argument numbering mode") == 0);
return;
}
assert(false);
diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
index 6d53995a627ad..c5f05d9a34d13 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
@@ -39,8 +39,8 @@ void test_exception() {
context.next_arg_id();
assert(false);
} catch (const std::format_error& e) {
- assert(strcmp(e.what(), "Using automatic argument numbering in manual "
- "argument numbering mode") == 0);
+ LIBCPP_ASSERT(strcmp(e.what(), "Using automatic argument numbering in manual "
+ "argument numbering mode") == 0);
return;
}
assert(false);
More information about the libcxx-commits
mailing list