diff options
Diffstat (limited to 'test/libcxx/language.support')
16 files changed, 328 insertions, 0 deletions
diff --git a/test/libcxx/language.support/cstdint/version.pass.cpp b/test/libcxx/language.support/cstdint/version.pass.cpp new file mode 100644 index 000000000000..4c9a43a62abc --- /dev/null +++ b/test/libcxx/language.support/cstdint/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <cstdint> + +#include <cstdint> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp b/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp new file mode 100644 index 000000000000..cc99b83aca4e --- /dev/null +++ b/test/libcxx/language.support/support.dynamic/alloc.errors/new.badlength/bad_array_length.pass.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// 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: c++98, c++03, c++11 +// test bad_array_length + +#include <new> +#include <type_traits> +#include <cassert> + +int main() +{ + 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); +} diff --git a/test/libcxx/language.support/support.dynamic/version.pass.cpp b/test/libcxx/language.support/support.dynamic/version.pass.cpp new file mode 100644 index 000000000000..ba1ff518e51f --- /dev/null +++ b/test/libcxx/language.support/support.dynamic/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <new> + +#include <new> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.exception/version.pass.cpp b/test/libcxx/language.support/support.exception/version.pass.cpp new file mode 100644 index 000000000000..acdedbb31fe3 --- /dev/null +++ b/test/libcxx/language.support/support.exception/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <exception> + +#include <exception> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.initlist/version.pass.cpp b/test/libcxx/language.support/support.initlist/version.pass.cpp new file mode 100644 index 000000000000..f3f08cd1f864 --- /dev/null +++ b/test/libcxx/language.support/support.initlist/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <initializer_list> + +#include <initializer_list> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp b/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp new file mode 100644 index 000000000000..19b463199cd6 --- /dev/null +++ b/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <cfloat> + +#include <cfloat> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp b/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp new file mode 100644 index 000000000000..3fe07a5174b3 --- /dev/null +++ b/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <climits> + +#include <climits> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.limits/limits/version.pass.cpp b/test/libcxx/language.support/support.limits/limits/version.pass.cpp new file mode 100644 index 000000000000..0cb3f6f52a4e --- /dev/null +++ b/test/libcxx/language.support/support.limits/limits/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <limits> + +#include <limits> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.rtti/version.pass.cpp b/test/libcxx/language.support/support.rtti/version.pass.cpp new file mode 100644 index 000000000000..0a9ece34f97e --- /dev/null +++ b/test/libcxx/language.support/support.rtti/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <typeinfo> + +#include <typeinfo> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp b/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp new file mode 100644 index 000000000000..7e37716d0145 --- /dev/null +++ b/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <csetjmp> + +#include <csetjmp> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp b/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp new file mode 100644 index 000000000000..be1045f1eb3b --- /dev/null +++ b/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <csignal> + +#include <csignal> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp b/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp new file mode 100644 index 000000000000..f3ca9389b15d --- /dev/null +++ b/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <cstdarg> + +#include <cstdarg> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp b/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp new file mode 100644 index 000000000000..0415227e58ea --- /dev/null +++ b/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <cstdbool> + +#include <cstdbool> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp b/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp new file mode 100644 index 000000000000..db419524f578 --- /dev/null +++ b/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <cstdlib> + +#include <cstdlib> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp b/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp new file mode 100644 index 000000000000..ce0bf2cf1853 --- /dev/null +++ b/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <ctime> + +#include <ctime> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/libcxx/language.support/support.types/version.pass.cpp b/test/libcxx/language.support/support.types/version.pass.cpp new file mode 100644 index 000000000000..2ab7c188de1d --- /dev/null +++ b/test/libcxx/language.support/support.types/version.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// <cstddef> + +#include <cstddef> + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} |