[libcxx] r246275 - Finally get the test suite passing in C++03!!
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 27 22:46:17 PDT 2015
Author: ericwf
Date: Fri Aug 28 00:46:17 2015
New Revision: 246275
URL: http://llvm.org/viewvc/llvm-project?rev=246275&view=rev
Log:
Finally get the test suite passing in C++03!!
After months of work there are only 4 tests still failing in C++03.
This patch fixes those tests.
All of the libc++ builders should be green.
Modified:
libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp
libcxx/trunk/test/std/experimental/algorithms/alg.search/search.pass.cpp
libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp
libcxx/trunk/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp
Modified: libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp?rev=246275&r1=246274&r2=246275&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp Fri Aug 28 00:46:17 2015
@@ -87,7 +87,8 @@ int main() {
}
{
// Test with in-place shared_count.
- Ptr p = std::make_shared<int>(42);
+ int val = 42;
+ Ptr p = std::make_shared<int>(val);
run_test(p);
assert(p.use_count() == 1);
}
Modified: libcxx/trunk/test/std/experimental/algorithms/alg.search/search.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/algorithms/alg.search/search.pass.cpp?rev=246275&r1=246274&r2=246275&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/algorithms/alg.search/search.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/algorithms/alg.search/search.pass.cpp Fri Aug 28 00:46:17 2015
@@ -35,9 +35,9 @@ struct MySearcher {
int main() {
typedef int * RI;
- static_assert(std::is_same<RI, decltype(std::experimental::search(RI(), RI(), MySearcher()))>::value, "" );
+ static_assert((std::is_same<RI, decltype(std::experimental::search(RI(), RI(), MySearcher()))>::value), "" );
- RI it{nullptr};
+ RI it(nullptr);
assert(it == std::experimental::search(it, it, MySearcher()));
assert(searcher_called == 1);
}
Modified: libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp?rev=246275&r1=246274&r2=246275&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.alg/re.alg.search/grep.pass.cpp Fri Aug 28 00:46:17 2015
@@ -19,6 +19,7 @@
#include <regex>
#include <cassert>
+#include "test_macros.h"
#include "test_iterators.h"
extern "C" void LLVMFuzzerTestOneInput(const char *data)
@@ -40,7 +41,10 @@ extern "C" void LLVMFuzzerTestOneInput(c
void fuzz_tests() // patterns that the fuzzer has found
{
+// Raw string literals are a C++11
+#if TEST_STD_VER >= 11
LLVMFuzzerTestOneInput(R"XX(Ã)_%()()((\8'_%()_%()_%()_%(()_%()_%()_%(.t;)()Â¥f()_%()(.)_%;)()!Â¥f(((()()XX");
+#endif
}
int main()
Modified: libcxx/trunk/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp?rev=246275&r1=246274&r2=246275&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp Fri Aug 28 00:46:17 2015
@@ -9,6 +9,10 @@
//
// UNSUPPORTED: libcpp-has-no-threads
+// notify_all_at_thread_exit(...) requires move semantics to transfer the
+// unique_lock.
+// UNSUPPORTED: c++98, c++03
+
// <condition_variable>
// void
More information about the cfe-commits
mailing list