git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@362252 91177308-0d34-0410-b5e6-96231b3b80d8
@@ -31,6 +31,8 @@
#include <algorithm>
#include <vector>
+#include "test_macros.h"
+
struct gen
{
std::ptrdiff_t operator()(std::ptrdiff_t n)
@@ -10,6 +10,8 @@
#ifndef _LIBCPP_VERSION
#error _LIBCPP_VERSION not defined
#endif
@@ -18,6 +18,8 @@
#include <atomic>
#include <type_traits>
enum cpp17_memory_order {
cpp17_memory_order_relaxed, cpp17_memory_order_consume, cpp17_memory_order_acquire,
@@ -12,6 +12,8 @@
@@ -21,6 +21,8 @@
#include <cstdlib>
#include <map>
void exit_success(int) {
std::_Exit(EXIT_SUCCESS);
#include <functional>
template <template <typename ...> class Container>
void test_set() {
#include <set>
@@ -16,6 +16,8 @@
#include <__tree>
#include <cassert>
struct Node
Node* __left_;
@@ -15,6 +15,8 @@
int main(int, char**) {
std::map<int, int> m;
((void)m);
#include <queue>
#include <stack>
@@ -19,6 +19,8 @@ struct equal_to;
struct unique_ptr;
#include <ext/hash_map>
namespace __gnu_cxx {
template class hash_map<int, int>;
@@ -18,6 +18,8 @@ struct equal_to;
#include <ext/hash_set>
template class hash_set<int>;
}
@@ -17,6 +17,7 @@
#define _LIBCPP_DEBUG 1
#include <array>
#include "debug_mode_helper.h"
int main(int, char**)
#include <deque>
struct A {
std::deque<A> d;
std::deque<A>::iterator it;
std::deque<int> q;
#include <forward_list>
@@ -19,6 +19,8 @@
std::list<int> l1;
@@ -21,6 +21,7 @@
#include <list>
#include "MoveOnly.h"
#include "test_allocator.h"
#include "min_allocator.h"
@@ -22,6 +22,8 @@
class A
int i_;
@@ -20,6 +20,8 @@
int a1[] = {1, 2, 3};
#include "test_iterators.h"
std::list<int> v1(3);
std::list<int> c1(100);
int a[] = {1, 2, 3};
std::vector<const int> v = {1, 2, 3};
std::vector<int> v;
@@ -13,6 +13,7 @@
void test_ctor_under_alloc() {
@@ -14,6 +14,7 @@
#include <unordered_map>
bool
is_power_of_two(unsigned long n)
#include <__hash_table>
is_prime(size_t n)
std::signal(SIGABRT, [](int) { std::_Exit(EXIT_SUCCESS); });
#include <unordered_set>
@@ -23,6 +23,7 @@
#include <utility>
#include "container_debug_tests.hpp"
using namespace IteratorDebugChecks;
@@ -26,6 +26,8 @@
template <typename Container>
Container makeContainer(int size) {
@@ -22,6 +22,7 @@
#include <__debug>
void signal_handler(int signal)
if (signal == SIGABRT)
@@ -18,6 +18,7 @@
void my_debug_function(std::__libcpp_debug_info const& info) {
assert(info.__msg_ == std::string("foo"));
std::exit(0);
#include <memory>
std::auto_ptr<int> p;
int identity(int v) { return v; }
int sum(int a, int b) { return a + b; }
#include <strstream>
@@ -13,6 +13,8 @@
#define _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
#include <__config>
#ifndef _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
#error _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
void f1() {}
void f2() {}
@@ -14,6 +14,8 @@
void fexit()
@@ -11,6 +11,8 @@
#include <cerrno>
_LIBCPP_NODISCARD_EXT int foo() { return 42; }
#define _LIBCPP_DISABLE_NODISCARD_AFTER_CXX17
_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; }
#include <stdexcept>
#include <system_error>
#include <experimental/algorithm>
#ifndef _LIBCPP_ALGORITHM
# error "<experimental/algorithm> must include <algorithm>"
# error _LIBCPP_VERSION not defined
#include <experimental/system_error>
#include <experimental/filesystem>
@@ -47,6 +47,8 @@
#include "test_memory_resource.hpp"
namespace ex = std::experimental::pmr;
template <class T>
@@ -24,6 +24,8 @@ int AssertCount = 0;
#include <experimental/deque>
#error header must provide _LIBCPP_VERSION
#include <experimental/forward_list>
#include <experimental/list>
#include <experimental/map>
#include <experimental/regex>
#include <experimental/set>
#include <experimental/string>
#include <experimental/unordered_map>
#include <experimental/unordered_set>
#include <experimental/vector>
struct POSType {
#include <experimental/memory_resource>
#include <experimental/numeric>
#include <experimental/string_view>
#include <experimental/any>
#include <experimental/type_traits>