[libcxx-commits] [libcxx] [libc++] Fixes charconv operator bool tests. (PR #80598)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 4 06:15:53 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Mark de Wever (mordante)
<details>
<summary>Changes</summary>
This was spotted by @<!-- -->philnik.
---
Full diff: https://github.com/llvm/llvm-project/pull/80598.diff
2 Files Affected:
- (modified) libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.pass.cpp (+2-2)
- (modified) libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.operator_bool.pass.cpp (+2-2)
``````````diff
diff --git a/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.pass.cpp
index b628a2c76acf5..a6aa590ee944f 100644
--- a/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.pass.cpp
+++ b/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.pass.cpp
@@ -28,13 +28,13 @@ constexpr bool test() {
{
std::from_chars_result value{nullptr, std::errc{}};
assert(bool(value) == true);
- static_assert(noexcept(bool(true)) == true);
+ static_assert(noexcept(bool(value)) == true);
}
// False
{
std::from_chars_result value{nullptr, std::errc::value_too_large};
assert(bool(value) == false);
- static_assert(noexcept(bool(true)) == true);
+ static_assert(noexcept(bool(value)) == true);
}
return true;
diff --git a/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.operator_bool.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.operator_bool.pass.cpp
index ef9364d3a6470..621eb8a493fd3 100644
--- a/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.operator_bool.pass.cpp
+++ b/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.operator_bool.pass.cpp
@@ -28,13 +28,13 @@ constexpr bool test() {
{
std::to_chars_result value{nullptr, std::errc{}};
assert(bool(value) == true);
- static_assert(noexcept(bool(true)) == true);
+ static_assert(noexcept(bool(value)) == true);
}
// False
{
std::to_chars_result value{nullptr, std::errc::value_too_large};
assert(bool(value) == false);
- static_assert(noexcept(bool(true)) == true);
+ static_assert(noexcept(bool(value)) == true);
}
return true;
``````````
</details>
https://github.com/llvm/llvm-project/pull/80598
More information about the libcxx-commits
mailing list