[libcxx-commits] [libcxx] d13f1cb - [libc++][test] Fix max_size test for Arm big endian
Michael Platings via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 11 08:25:10 PDT 2023
Author: Michael Platings
Date: 2023-08-11T16:23:32+01:00
New Revision: d13f1cb569ca934493677af5a900a005e2dcd59b
URL: https://github.com/llvm/llvm-project/commit/d13f1cb569ca934493677af5a900a005e2dcd59b
DIFF: https://github.com/llvm/llvm-project/commit/d13f1cb569ca934493677af5a900a005e2dcd59b.diff
LOG: [libc++][test] Fix max_size test for Arm big endian
With ABI version 2 and big endian Arm, the full_size test matches the
current behaviour. It's possible that this would also be the case for
other big endian architectures but I don't have data on that.
Differential Revision: https://reviews.llvm.org/D157699
Added:
Modified:
libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
index 4bc622f843da67..559634896331fa 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
@@ -92,7 +92,15 @@ TEST_CONSTEXPR_CXX20 bool test() {
#else
+# if defined(__arm__) || defined(__aarch64__)
+# ifdef __BIG_ENDIAN__
+ full_size();
+# else
half_size();
+# endif
+# else
+ half_size();
+# endif
#endif
More information about the libcxx-commits
mailing list