diff options
Diffstat (limited to 'libcxx/test/language.support/support.dynamic/alloc.errors')
7 files changed, 0 insertions, 161 deletions
diff --git a/libcxx/test/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp b/libcxx/test/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp deleted file mode 100644 index cf8d4af9380..00000000000 --- a/libcxx/test/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// test bad_alloc - -#include <new> -#include <type_traits> -#include <cassert> - -int main() -{ - static_assert((std::is_base_of<std::exception, std::bad_alloc>::value), - "std::is_base_of<std::exception, std::bad_alloc>::value"); - static_assert(std::is_polymorphic<std::bad_alloc>::value, - "std::is_polymorphic<std::bad_alloc>::value"); - std::bad_alloc b; - std::bad_alloc b2 = b; - b2 = b; - const char* w = b2.what(); - assert(w); -} diff --git a/libcxx/test/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp b/libcxx/test/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp deleted file mode 100644 index 7de50330455..00000000000 --- a/libcxx/test/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp +++ /dev/null @@ -1,29 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// test bad_array_length - -#include <new> -#include <type_traits> -#include <cassert> - -int main() -{ -#if __LIBCPP_STD_VER > 11 - static_assert((std::is_base_of<std::bad_alloc, std::bad_array_length>::value), - "std::is_base_of<std::bad_alloc, std::bad_array_length>::value"); - static_assert(std::is_polymorphic<std::bad_array_length>::value, - "std::is_polymorphic<std::bad_array_length>::value"); - std::bad_array_length b; - std::bad_array_length b2 = b; - b2 = b; - const char* w = b2.what(); - assert(w); -#endif -} diff --git a/libcxx/test/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_new_length.pass.cpp b/libcxx/test/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_new_length.pass.cpp deleted file mode 100644 index 50521c0005a..00000000000 --- a/libcxx/test/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_new_length.pass.cpp +++ /dev/null @@ -1,27 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// test bad_array_new_length - -#include <new> -#include <type_traits> -#include <cassert> - -int main() -{ - static_assert((std::is_base_of<std::bad_alloc, std::bad_array_new_length>::value), - "std::is_base_of<std::bad_alloc, std::bad_array_new_length>::value"); - static_assert(std::is_polymorphic<std::bad_array_new_length>::value, - "std::is_polymorphic<std::bad_array_new_length>::value"); - std::bad_array_new_length b; - std::bad_array_new_length b2 = b; - b2 = b; - const char* w = b2.what(); - assert(w); -} diff --git a/libcxx/test/language.support/support.dynamic/alloc.errors/new.handler/new_handler.pass.cpp b/libcxx/test/language.support/support.dynamic/alloc.errors/new.handler/new_handler.pass.cpp deleted file mode 100644 index 6b799a3e83d..00000000000 --- a/libcxx/test/language.support/support.dynamic/alloc.errors/new.handler/new_handler.pass.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// test new_handler - -#include <new> - -void f() {} - -int main() -{ - std::new_handler p = f; -} diff --git a/libcxx/test/language.support/support.dynamic/alloc.errors/nothing_to_do.pass.cpp b/libcxx/test/language.support/support.dynamic/alloc.errors/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/language.support/support.dynamic/alloc.errors/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp b/libcxx/test/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp deleted file mode 100644 index 55a3edabfed..00000000000 --- a/libcxx/test/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp +++ /dev/null @@ -1,25 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// test get_new_handler - -#include <new> -#include <cassert> - -void f1() {} -void f2() {} - -int main() -{ - assert(std::get_new_handler() == 0); - std::set_new_handler(f1); - assert(std::get_new_handler() == f1); - std::set_new_handler(f2); - assert(std::get_new_handler() == f2); -} diff --git a/libcxx/test/language.support/support.dynamic/alloc.errors/set.new.handler/set_new_handler.pass.cpp b/libcxx/test/language.support/support.dynamic/alloc.errors/set.new.handler/set_new_handler.pass.cpp deleted file mode 100644 index 349bf440e0d..00000000000 --- a/libcxx/test/language.support/support.dynamic/alloc.errors/set.new.handler/set_new_handler.pass.cpp +++ /dev/null @@ -1,22 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -// test set_new_handler - -#include <new> -#include <cassert> - -void f1() {} -void f2() {} - -int main() -{ - assert(std::set_new_handler(f1) == 0); - assert(std::set_new_handler(f2) == f1); -} |