summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/boost_install/test/thread/quick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/tools/boost_install/test/thread/quick.cpp')
-rw-r--r--src/boost/tools/boost_install/test/thread/quick.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/boost/tools/boost_install/test/thread/quick.cpp b/src/boost/tools/boost_install/test/thread/quick.cpp
new file mode 100644
index 000000000..387489209
--- /dev/null
+++ b/src/boost/tools/boost_install/test/thread/quick.cpp
@@ -0,0 +1,27 @@
+
+// Copyright 2017, 2018 Peter Dimov.
+//
+// Distributed under the Boost Software License, Version 1.0.
+//
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/thread.hpp>
+#include <boost/core/lightweight_test.hpp>
+
+void f( int & x, int y )
+{
+ x = y;
+}
+
+int main()
+{
+ int x = 0;
+
+ boost::thread th( f, boost::ref( x ), 12 );
+ th.join();
+
+ BOOST_TEST_EQ( x, 12 );
+
+ return boost::report_errors();
+}