[libcxx-commits] [libcxx] 13410fa - [libc++] NFCI: Use Lit features to disable tests instead of #if
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 16 05:36:00 PDT 2020
Author: Louis Dionne
Date: 2020-10-16T08:35:34-04:00
New Revision: 13410fa79ff0176fd111b8e3e1ea64c54bc7fea1
URL: https://github.com/llvm/llvm-project/commit/13410fa79ff0176fd111b8e3e1ea64c54bc7fea1
DIFF: https://github.com/llvm/llvm-project/commit/13410fa79ff0176fd111b8e3e1ea64c54bc7fea1.diff
LOG: [libc++] NFCI: Use Lit features to disable tests instead of #if
Added:
Modified:
libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp
libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.compile.fail.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
index 60b535372bfa..a89c82213182 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
@@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: asan
+
// <vector>
// reference operator[](size_type n);
@@ -19,7 +21,6 @@
#include "test_iterators.h"
#include "test_macros.h"
-#ifndef _LIBCPP_HAS_NO_ASAN
extern "C" void __sanitizer_set_death_callback(void (*callback)(void));
void do_exit() {
@@ -65,6 +66,3 @@ int main(int, char**)
((void)foo);
}
}
-#else
-int main(int, char**) { return 0; }
-#endif
diff --git a/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp b/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp
index ecc24abf4be2..c70d342ddd0b 100644
--- a/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp
@@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++03, c++11
+
// <iomanip>
// quoted
@@ -17,9 +19,6 @@
#include "test_macros.h"
-#if TEST_STD_VER > 11
-// quoted is C++14 only
-
bool is_skipws ( const std::istream *is ) {
return ( is->flags() & std::ios_base::skipws ) != 0;
}
@@ -210,8 +209,3 @@ int main(int, char**)
return 0;
}
-#else
-int main(int, char**) {
- return 0;
-}
-#endif
diff --git a/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.compile.fail.cpp b/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.compile.fail.cpp
index 248b346e33a0..7575d3f95b9b 100644
--- a/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.compile.fail.cpp
+++ b/libcxx/test/std/utilities/intseq/intseq.intseq/integer_seq.compile.fail.cpp
@@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: c++03, c++11
+
// <utility>
// template<class T, T... I>
@@ -23,19 +25,9 @@
#include "test_macros.h"
-int main(int, char**)
-{
-#if TEST_STD_VER > 11
-
-// Should fail to compile, since float is not an integral type
+int main(int, char**) {
+ // Should fail to compile, since float is not an integral type
using floatmix = std::integer_sequence<float>;
floatmix::value_type I;
-
-#else
-
-X
-
-#endif // TEST_STD_VER > 11
-
- return 0;
+ return 0;
}
More information about the libcxx-commits
mailing list