[cfe-commits] [libcxx] r131509 - in /libcxx/trunk/test/thread/futures: futures.async/ futures.promise/ futures.shared_future/ futures.tas/futures.task.members/ futures.unique_future/
Howard Hinnant
hhinnant at apple.com
Tue May 17 16:32:48 PDT 2011
Author: hhinnant
Date: Tue May 17 18:32:48 2011
New Revision: 131509
URL: http://llvm.org/viewvc/llvm-project?rev=131509&view=rev
Log:
A bunch of future tests got invalidated with the latest updates to thread. Fixed the tests.
Modified:
libcxx/trunk/test/thread/futures/futures.async/async.pass.cpp
libcxx/trunk/test/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
libcxx/trunk/test/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp
libcxx/trunk/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp
libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp
libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp
libcxx/trunk/test/thread/futures/futures.shared_future/get.pass.cpp
libcxx/trunk/test/thread/futures/futures.shared_future/wait.pass.cpp
libcxx/trunk/test/thread/futures/futures.shared_future/wait_for.pass.cpp
libcxx/trunk/test/thread/futures/futures.shared_future/wait_until.pass.cpp
libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/dtor.pass.cpp
libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/make_ready_at_thread_exit.pass.cpp
libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/operator.pass.cpp
libcxx/trunk/test/thread/futures/futures.unique_future/get.pass.cpp
libcxx/trunk/test/thread/futures/futures.unique_future/wait.pass.cpp
libcxx/trunk/test/thread/futures/futures.unique_future/wait_for.pass.cpp
libcxx/trunk/test/thread/futures/futures.unique_future/wait_until.pass.cpp
Modified: libcxx/trunk/test/thread/futures/futures.async/async.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.async/async.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.async/async.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.async/async.pass.cpp Tue May 17 18:32:48 2011
@@ -164,7 +164,7 @@
Clock::time_point t1 = Clock::now();
assert(t1-t0 < ms(100));
}
-
+/*
{
std::future<std::unique_ptr<int>> f =
std::async(f4, std::unique_ptr<int>(new int(3)));
@@ -174,4 +174,4 @@
Clock::time_point t1 = Clock::now();
assert(t1-t0 < ms(100));
}
-}
+*/}
Modified: libcxx/trunk/test/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp Tue May 17 18:32:48 2011
@@ -16,7 +16,7 @@
#include <future>
#include <cassert>
-void func(std::promise<int>& p)
+void func(std::promise<int> p)
{
const int i = 5;
p.set_exception_at_thread_exit(std::make_exception_ptr(3));
Modified: libcxx/trunk/test/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp Tue May 17 18:32:48 2011
@@ -19,7 +19,7 @@
int i = 0;
-void func(std::promise<int&>& p)
+void func(std::promise<int&> p)
{
p.set_value_at_thread_exit(i);
i = 4;
Modified: libcxx/trunk/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp Tue May 17 18:32:48 2011
@@ -19,7 +19,7 @@
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
-void func(std::promise<std::unique_ptr<int>>& p)
+void func(std::promise<std::unique_ptr<int>> p)
{
p.set_value_at_thread_exit(std::unique_ptr<int>(new int(5)));
}
Modified: libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp Tue May 17 18:32:48 2011
@@ -16,7 +16,7 @@
#include <future>
#include <cassert>
-void func(std::promise<int>& p)
+void func(std::promise<int> p)
{
const int i = 5;
p.set_value_at_thread_exit(i);
Modified: libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp Tue May 17 18:32:48 2011
@@ -19,7 +19,7 @@
int i = 0;
-void func(std::promise<void>& p)
+void func(std::promise<void> p)
{
p.set_value_at_thread_exit();
i = 1;
Modified: libcxx/trunk/test/thread/futures/futures.shared_future/get.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.shared_future/get.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.shared_future/get.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.shared_future/get.pass.cpp Tue May 17 18:32:48 2011
@@ -18,13 +18,13 @@
#include <future>
#include <cassert>
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value(3);
}
-void func2(std::promise<int>& p)
+void func2(std::promise<int> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_exception(std::make_exception_ptr(3));
@@ -32,26 +32,26 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
j = 5;
p.set_value(j);
}
-void func4(std::promise<int&>& p)
+void func4(std::promise<int&> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_exception(std::make_exception_ptr(3.5));
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value();
}
-void func6(std::promise<void>& p)
+void func6(std::promise<void> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_exception(std::make_exception_ptr('c'));
Modified: libcxx/trunk/test/thread/futures/futures.shared_future/wait.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.shared_future/wait.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.shared_future/wait.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.shared_future/wait.pass.cpp Tue May 17 18:32:48 2011
@@ -16,7 +16,7 @@
#include <future>
#include <cassert>
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value(3);
@@ -24,14 +24,14 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
j = 5;
p.set_value(j);
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value();
Modified: libcxx/trunk/test/thread/futures/futures.shared_future/wait_for.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.shared_future/wait_for.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.shared_future/wait_for.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.shared_future/wait_for.pass.cpp Tue May 17 18:32:48 2011
@@ -20,7 +20,7 @@
typedef std::chrono::milliseconds ms;
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value(3);
@@ -28,14 +28,14 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(ms(500));
j = 5;
p.set_value(j);
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value();
Modified: libcxx/trunk/test/thread/futures/futures.shared_future/wait_until.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.shared_future/wait_until.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.shared_future/wait_until.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.shared_future/wait_until.pass.cpp Tue May 17 18:32:48 2011
@@ -20,7 +20,7 @@
typedef std::chrono::milliseconds ms;
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value(3);
@@ -28,14 +28,14 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(ms(500));
j = 5;
p.set_value(j);
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value();
Modified: libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/dtor.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/dtor.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/dtor.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/dtor.pass.cpp Tue May 17 18:32:48 2011
@@ -26,11 +26,11 @@
long operator()(long i, long j) const {return data_ + i + j;}
};
-void func(std::packaged_task<double(int, char)>& p)
+void func(std::packaged_task<double(int, char)> p)
{
}
-void func2(std::packaged_task<double(int, char)>& p)
+void func2(std::packaged_task<double(int, char)> p)
{
p(3, 'a');
}
Modified: libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/make_ready_at_thread_exit.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/make_ready_at_thread_exit.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/make_ready_at_thread_exit.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/make_ready_at_thread_exit.pass.cpp Tue May 17 18:32:48 2011
@@ -31,19 +31,19 @@
}
};
-void func0(std::packaged_task<double(int, char)>& p)
+void func0(std::packaged_task<double(int, char)> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.make_ready_at_thread_exit(3, 'a');
}
-void func1(std::packaged_task<double(int, char)>& p)
+void func1(std::packaged_task<double(int, char)> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.make_ready_at_thread_exit(3, 'z');
}
-void func2(std::packaged_task<double(int, char)>& p)
+void func2(std::packaged_task<double(int, char)> p)
{
p.make_ready_at_thread_exit(3, 'a');
try
@@ -56,7 +56,7 @@
}
}
-void func3(std::packaged_task<double(int, char)>& p)
+void func3(std::packaged_task<double(int, char)> p)
{
try
{
Modified: libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/operator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/operator.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/operator.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.tas/futures.task.members/operator.pass.cpp Tue May 17 18:32:48 2011
@@ -31,19 +31,19 @@
}
};
-void func0(std::packaged_task<double(int, char)>& p)
+void func0(std::packaged_task<double(int, char)> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p(3, 'a');
}
-void func1(std::packaged_task<double(int, char)>& p)
+void func1(std::packaged_task<double(int, char)> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p(3, 'z');
}
-void func2(std::packaged_task<double(int, char)>& p)
+void func2(std::packaged_task<double(int, char)> p)
{
p(3, 'a');
try
@@ -56,7 +56,7 @@
}
}
-void func3(std::packaged_task<double(int, char)>& p)
+void func3(std::packaged_task<double(int, char)> p)
{
try
{
Modified: libcxx/trunk/test/thread/futures/futures.unique_future/get.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.unique_future/get.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.unique_future/get.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.unique_future/get.pass.cpp Tue May 17 18:32:48 2011
@@ -18,13 +18,13 @@
#include <future>
#include <cassert>
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value(3);
}
-void func2(std::promise<int>& p)
+void func2(std::promise<int> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_exception(std::make_exception_ptr(3));
@@ -32,26 +32,26 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
j = 5;
p.set_value(j);
}
-void func4(std::promise<int&>& p)
+void func4(std::promise<int&> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_exception(std::make_exception_ptr(3.5));
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value();
}
-void func6(std::promise<void>& p)
+void func6(std::promise<void> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_exception(std::make_exception_ptr('c'));
Modified: libcxx/trunk/test/thread/futures/futures.unique_future/wait.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.unique_future/wait.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.unique_future/wait.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.unique_future/wait.pass.cpp Tue May 17 18:32:48 2011
@@ -16,7 +16,7 @@
#include <future>
#include <cassert>
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value(3);
@@ -24,14 +24,14 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
j = 5;
p.set_value(j);
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(std::chrono::milliseconds(500));
p.set_value();
Modified: libcxx/trunk/test/thread/futures/futures.unique_future/wait_for.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.unique_future/wait_for.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.unique_future/wait_for.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.unique_future/wait_for.pass.cpp Tue May 17 18:32:48 2011
@@ -20,7 +20,7 @@
typedef std::chrono::milliseconds ms;
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value(3);
@@ -28,14 +28,14 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(ms(500));
j = 5;
p.set_value(j);
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value();
Modified: libcxx/trunk/test/thread/futures/futures.unique_future/wait_until.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/thread/futures/futures.unique_future/wait_until.pass.cpp?rev=131509&r1=131508&r2=131509&view=diff
==============================================================================
--- libcxx/trunk/test/thread/futures/futures.unique_future/wait_until.pass.cpp (original)
+++ libcxx/trunk/test/thread/futures/futures.unique_future/wait_until.pass.cpp Tue May 17 18:32:48 2011
@@ -20,7 +20,7 @@
typedef std::chrono::milliseconds ms;
-void func1(std::promise<int>& p)
+void func1(std::promise<int> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value(3);
@@ -28,14 +28,14 @@
int j = 0;
-void func3(std::promise<int&>& p)
+void func3(std::promise<int&> p)
{
std::this_thread::sleep_for(ms(500));
j = 5;
p.set_value(j);
}
-void func5(std::promise<void>& p)
+void func5(std::promise<void> p)
{
std::this_thread::sleep_for(ms(500));
p.set_value();
More information about the cfe-commits
mailing list