diff options
Diffstat (limited to 'libcxx/test/language.support/support.runtime')
12 files changed, 0 insertions, 394 deletions
diff --git a/libcxx/test/language.support/support.runtime/csetjmp.pass.cpp b/libcxx/test/language.support/support.runtime/csetjmp.pass.cpp deleted file mode 100644 index dc034ce099e..00000000000 --- a/libcxx/test/language.support/support.runtime/csetjmp.pass.cpp +++ /dev/null @@ -1,24 +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 <csetjmp> - -#include <csetjmp> -#include <type_traits> - -#ifndef setjmp -#error setjmp not defined -#endif - -int main() -{ - std::jmp_buf jb; - static_assert((std::is_same<decltype(std::longjmp(jb, 0)), void>::value), - "std::is_same<decltype(std::longjmp(jb, 0)), void>::value"); -} diff --git a/libcxx/test/language.support/support.runtime/csignal.pass.cpp b/libcxx/test/language.support/support.runtime/csignal.pass.cpp deleted file mode 100644 index 717347df7f0..00000000000 --- a/libcxx/test/language.support/support.runtime/csignal.pass.cpp +++ /dev/null @@ -1,57 +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 <csignal> - -#include <csignal> -#include <type_traits> - -#ifndef SIG_DFL -#error SIG_DFL not defined -#endif - -#ifndef SIG_ERR -#error SIG_ERR not defined -#endif - -#ifndef SIG_IGN -#error SIG_IGN not defined -#endif - -#ifndef SIGABRT -#error SIGABRT not defined -#endif - -#ifndef SIGFPE -#error SIGFPE not defined -#endif - -#ifndef SIGILL -#error SIGILL not defined -#endif - -#ifndef SIGINT -#error SIGINT not defined -#endif - -#ifndef SIGSEGV -#error SIGSEGV not defined -#endif - -#ifndef SIGTERM -#error SIGTERM not defined -#endif - -int main() -{ - std::sig_atomic_t sig; - typedef void (*func)(int); - static_assert((std::is_same<decltype(std::signal(0, (func)0)), func>::value), ""); - static_assert((std::is_same<decltype(std::raise(0)), int>::value), ""); -} diff --git a/libcxx/test/language.support/support.runtime/cstdarg.pass.cpp b/libcxx/test/language.support/support.runtime/cstdarg.pass.cpp deleted file mode 100644 index 059ad2f4ff9..00000000000 --- a/libcxx/test/language.support/support.runtime/cstdarg.pass.cpp +++ /dev/null @@ -1,35 +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 <cstdarg> - -#include <cstdarg> - -#ifndef va_arg -#error va_arg not defined -#endif - -#if __cplusplus >= 201103L -# ifndef va_copy -# error va_copy is not defined when c++ >= 11 -# endif -#endif - -#ifndef va_end -#error va_end not defined -#endif - -#ifndef va_start -#error va_start not defined -#endif - -int main() -{ - std::va_list va; -} diff --git a/libcxx/test/language.support/support.runtime/cstdbool.pass.cpp b/libcxx/test/language.support/support.runtime/cstdbool.pass.cpp deleted file mode 100644 index f52c1556feb..00000000000 --- a/libcxx/test/language.support/support.runtime/cstdbool.pass.cpp +++ /dev/null @@ -1,32 +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 <cstdbool> - -#include <cstdbool> - -#ifndef __bool_true_false_are_defined -#error __bool_true_false_are_defined not defined -#endif - -#ifdef bool -#error bool should not be defined -#endif - -#ifdef true -#error true should not be defined -#endif - -#ifdef false -#error false should not be defined -#endif - -int main() -{ -} diff --git a/libcxx/test/language.support/support.runtime/cstdlib.pass.cpp b/libcxx/test/language.support/support.runtime/cstdlib.pass.cpp deleted file mode 100644 index e14e70e34e4..00000000000 --- a/libcxx/test/language.support/support.runtime/cstdlib.pass.cpp +++ /dev/null @@ -1,86 +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 <cstdlib> - -#include <cstdlib> -#include <type_traits> - -#ifndef EXIT_FAILURE -#error EXIT_FAILURE not defined -#endif - -#ifndef EXIT_SUCCESS -#error EXIT_SUCCESS not defined -#endif - -#ifndef MB_CUR_MAX -#error MB_CUR_MAX not defined -#endif - -#ifndef NULL -#error NULL not defined -#endif - -#ifndef RAND_MAX -#error RAND_MAX not defined -#endif - -int main() -{ - std::size_t s = 0; - std::div_t d; - std::ldiv_t ld; - std::lldiv_t lld; - char** endptr = 0; - static_assert((std::is_same<decltype(std::atof("")), double>::value), ""); - static_assert((std::is_same<decltype(std::atoi("")), int>::value), ""); - static_assert((std::is_same<decltype(std::atol("")), long>::value), ""); - static_assert((std::is_same<decltype(std::atoll("")), long long>::value), ""); - static_assert((std::is_same<decltype(std::getenv("")), char*>::value), ""); - static_assert((std::is_same<decltype(std::strtod("", endptr)), double>::value), ""); - static_assert((std::is_same<decltype(std::strtof("", endptr)), float>::value), ""); - static_assert((std::is_same<decltype(std::strtold("", endptr)), long double>::value), ""); - static_assert((std::is_same<decltype(std::strtol("", endptr,0)), long>::value), ""); - static_assert((std::is_same<decltype(std::strtoll("", endptr,0)), long long>::value), ""); - static_assert((std::is_same<decltype(std::strtoul("", endptr,0)), unsigned long>::value), ""); - static_assert((std::is_same<decltype(std::strtoull("", endptr,0)), unsigned long long>::value), ""); - static_assert((std::is_same<decltype(std::rand()), int>::value), ""); - static_assert((std::is_same<decltype(std::srand(0)), void>::value), ""); - static_assert((std::is_same<decltype(std::calloc(0,0)), void*>::value), ""); - static_assert((std::is_same<decltype(std::free(0)), void>::value), ""); - static_assert((std::is_same<decltype(std::malloc(0)), void*>::value), ""); - static_assert((std::is_same<decltype(std::realloc(0,0)), void*>::value), ""); - static_assert((std::is_same<decltype(std::abort()), void>::value), ""); - static_assert((std::is_same<decltype(std::atexit(0)), int>::value), ""); - static_assert((std::is_same<decltype(std::exit(0)), void>::value), ""); - static_assert((std::is_same<decltype(std::_Exit(0)), void>::value), ""); - static_assert((std::is_same<decltype(std::getenv("")), char*>::value), ""); - static_assert((std::is_same<decltype(std::system("")), int>::value), ""); - static_assert((std::is_same<decltype(std::bsearch(0,0,0,0,0)), void*>::value), ""); - static_assert((std::is_same<decltype(std::qsort(0,0,0,0)), void>::value), ""); - static_assert((std::is_same<decltype(std::abs(0)), int>::value), ""); - static_assert((std::is_same<decltype(std::abs((long)0)), long>::value), ""); - static_assert((std::is_same<decltype(std::abs((long long)0)), long long>::value), ""); - static_assert((std::is_same<decltype(std::labs((long)0)), long>::value), ""); - static_assert((std::is_same<decltype(std::llabs((long long)0)), long long>::value), ""); - static_assert((std::is_same<decltype(std::div(0,0)), std::div_t>::value), ""); - static_assert((std::is_same<decltype(std::div(0L,0L)), std::ldiv_t>::value), ""); - static_assert((std::is_same<decltype(std::div(0LL,0LL)), std::lldiv_t>::value), ""); - static_assert((std::is_same<decltype(std::ldiv(0L,0L)), std::ldiv_t>::value), ""); - static_assert((std::is_same<decltype(std::lldiv(0LL,0LL)), std::lldiv_t>::value), ""); - static_assert((std::is_same<decltype(std::mblen("",0)), int>::value), ""); - wchar_t* pw = 0; - const wchar_t* pwc = 0; - char* pc = 0; - static_assert((std::is_same<decltype(std::mbtowc(pw,"",0)), int>::value), ""); - static_assert((std::is_same<decltype(std::wctomb(pc,L' ')), int>::value), ""); - static_assert((std::is_same<decltype(std::mbstowcs(pw,"",0)), std::size_t>::value), ""); - static_assert((std::is_same<decltype(std::wcstombs(pc,pwc,0)), std::size_t>::value), ""); -} diff --git a/libcxx/test/language.support/support.runtime/ctime.pass.cpp b/libcxx/test/language.support/support.runtime/ctime.pass.cpp deleted file mode 100644 index 495d6eb2c66..00000000000 --- a/libcxx/test/language.support/support.runtime/ctime.pass.cpp +++ /dev/null @@ -1,40 +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 <ctime> - -#include <ctime> -#include <type_traits> - -#ifndef NULL -#error NULL not defined -#endif - -#ifndef CLOCKS_PER_SEC -#error CLOCKS_PER_SEC not defined -#endif - -int main() -{ - std::clock_t c = 0; - std::size_t s = 0; - std::time_t t = 0; - std::tm tm = {0}; - static_assert((std::is_same<decltype(std::clock()), std::clock_t>::value), ""); - static_assert((std::is_same<decltype(std::difftime(t,t)), double>::value), ""); - static_assert((std::is_same<decltype(std::mktime(&tm)), std::time_t>::value), ""); - static_assert((std::is_same<decltype(std::time(&t)), std::time_t>::value), ""); - static_assert((std::is_same<decltype(std::asctime(&tm)), char*>::value), ""); - static_assert((std::is_same<decltype(std::ctime(&t)), char*>::value), ""); - static_assert((std::is_same<decltype(std::gmtime(&t)), std::tm*>::value), ""); - static_assert((std::is_same<decltype(std::localtime(&t)), std::tm*>::value), ""); - char* c1 = 0; - const char* c2 = 0; - static_assert((std::is_same<decltype(std::strftime(c1,s,c2,&tm)), std::size_t>::value), ""); -} diff --git a/libcxx/test/language.support/support.runtime/version_csetjmp.pass.cpp b/libcxx/test/language.support/support.runtime/version_csetjmp.pass.cpp deleted file mode 100644 index 7e37716d014..00000000000 --- a/libcxx/test/language.support/support.runtime/version_csetjmp.pass.cpp +++ /dev/null @@ -1,20 +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. -// -//===----------------------------------------------------------------------===// - -// <csetjmp> - -#include <csetjmp> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/language.support/support.runtime/version_csignal.pass.cpp b/libcxx/test/language.support/support.runtime/version_csignal.pass.cpp deleted file mode 100644 index be1045f1eb3..00000000000 --- a/libcxx/test/language.support/support.runtime/version_csignal.pass.cpp +++ /dev/null @@ -1,20 +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. -// -//===----------------------------------------------------------------------===// - -// <csignal> - -#include <csignal> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/language.support/support.runtime/version_cstdarg.pass.cpp b/libcxx/test/language.support/support.runtime/version_cstdarg.pass.cpp deleted file mode 100644 index f3ca9389b15..00000000000 --- a/libcxx/test/language.support/support.runtime/version_cstdarg.pass.cpp +++ /dev/null @@ -1,20 +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. -// -//===----------------------------------------------------------------------===// - -// <cstdarg> - -#include <cstdarg> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/language.support/support.runtime/version_cstdbool.pass.cpp b/libcxx/test/language.support/support.runtime/version_cstdbool.pass.cpp deleted file mode 100644 index 0415227e58e..00000000000 --- a/libcxx/test/language.support/support.runtime/version_cstdbool.pass.cpp +++ /dev/null @@ -1,20 +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. -// -//===----------------------------------------------------------------------===// - -// <cstdbool> - -#include <cstdbool> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/language.support/support.runtime/version_cstdlib.pass.cpp b/libcxx/test/language.support/support.runtime/version_cstdlib.pass.cpp deleted file mode 100644 index db419524f57..00000000000 --- a/libcxx/test/language.support/support.runtime/version_cstdlib.pass.cpp +++ /dev/null @@ -1,20 +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. -// -//===----------------------------------------------------------------------===// - -// <cstdlib> - -#include <cstdlib> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} diff --git a/libcxx/test/language.support/support.runtime/version_ctime.pass.cpp b/libcxx/test/language.support/support.runtime/version_ctime.pass.cpp deleted file mode 100644 index ce0bf2cf185..00000000000 --- a/libcxx/test/language.support/support.runtime/version_ctime.pass.cpp +++ /dev/null @@ -1,20 +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. -// -//===----------------------------------------------------------------------===// - -// <ctime> - -#include <ctime> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} |