summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support/test_macros.h
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-17 19:46:40 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-17 19:46:40 +0000
commitc79795874adef276115f8bcf0b46da4155d2d46d (patch)
tree3c58305df7b6b28f1626e65f704ca3aba480be3a /libcxx/test/support/test_macros.h
parent7a5813597dad665e4461372edbc3a6ea8e8cb8f0 (diff)
downloadbcm5719-llvm-c79795874adef276115f8bcf0b46da4155d2d46d.tar.gz
bcm5719-llvm-c79795874adef276115f8bcf0b46da4155d2d46d.zip
Add Filesystem TS -- Complete
Add the completed std::experimental::filesystem implementation and tests. The implementation supports C++11 or newer. The TS is built as part of 'libc++experimental.a'. Users of the TS need to manually link this library. Building and testing the TS can be disabled using the CMake option '-DLIBCXX_ENABLE_FILESYSTEM=OFF'. Currently 'libc++experimental.a' is not installed by default. To turn on the installation of the library use '-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON'. llvm-svn: 273034
Diffstat (limited to 'libcxx/test/support/test_macros.h')
-rw-r--r--libcxx/test/support/test_macros.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index 037edbcb989..597c85f2f2c 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -93,4 +93,21 @@
#define LIBCPP_STATIC_ASSERT(...) ((void)0)
#endif
+#define ASSERT_NOEXCEPT(...) \
+ static_assert(noexcept(__VA_ARGS__), "Operation must be noexcept")
+
+#define ASSERT_NOT_NOEXCEPT(...) \
+ static_assert(!noexcept(__VA_ARGS__), "Operation must NOT be noexcept")
+
+namespace test_macros_detail {
+template <class T, class U>
+struct is_same { enum { value = 0};} ;
+template <class T>
+struct is_same<T, T> { enum {value = 1}; };
+} // namespace test_macros_detail
+
+#define ASSERT_SAME_TYPE(...) \
+ static_assert(test_macros_detail::is_same<__VA_ARGS__>::value, \
+ "Types differ uexpectedly")
+
#endif // SUPPORT_TEST_MACROS_HPP
OpenPOWER on IntegriCloud