summaryrefslogtreecommitdiff
path: root/test/std/atomics/atomics.flag/init03.pass.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:54:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:54:09 +0000
commitb4c64ad90b81d2a779786b7edb4c5c6dd28cc57d (patch)
tree13f237c02db4d1894ab06884d1b739344766bede /test/std/atomics/atomics.flag/init03.pass.cpp
parent61b9a7258a7693d7f3674a5a1daf7b036ff1d382 (diff)
Notes
Diffstat (limited to 'test/std/atomics/atomics.flag/init03.pass.cpp')
-rw-r--r--test/std/atomics/atomics.flag/init03.pass.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/std/atomics/atomics.flag/init03.pass.cpp b/test/std/atomics/atomics.flag/init03.pass.cpp
new file mode 100644
index 0000000000000..0910bc5ceccb6
--- /dev/null
+++ b/test/std/atomics/atomics.flag/init03.pass.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// UNSUPPORTED: libcpp-has-no-threads
+
+// <atomic>
+
+// struct atomic_flag
+
+// TESTING EXTENSION atomic_flag(bool)
+
+#include <atomic>
+#include <cassert>
+
+int main()
+{
+ std::atomic_flag f(false);
+ assert(f.test_and_set() == 0);
+}