/external/clang/test/Driver/ |
x86_64-nacl-types.cpp | 7 static_assert(alignof(char) == 1, "alignof char is wrong"); 9 static_assert(alignof(short) == 2, "sizeof short is wrong"); 10 static_assert(alignof(short) == 2, "alignof short is wrong"); 12 static_assert(alignof(int) == 4, "sizeof int is wrong"); 13 static_assert(alignof(int) == 4, "alignof int is wrong"); 15 static_assert(sizeof(long) == 4, "sizeof long is wrong"); 16 static_assert(sizeof(long) == 4, "alignof long is wrong"); 18 static_assert(sizeof(long long) == 8, "sizeof long long is wrong wrong"); 19 static_assert(alignof(long long) == 8, "alignof long long is wrong wrong"); 21 static_assert(sizeof(void*) == 4, "sizeof void * is wrong") [all...] |
/external/clang/test/SemaCXX/ |
static-assert.cpp | 5 static_assert(f(), "f"); // expected-error {{static_assert expression is not an integral constant expression}} expected-note {{non-constexpr function 'f' cannot be used in a constant expression}} 6 static_assert(true, "true is not false"); 7 static_assert(false, "false is false"); // expected-error {{static_assert failed "false is false"}} 10 static_assert(false, "false is false"); // expected-error {{static_assert failed "false is false"}} 14 static_assert(false, "false is false"); // expected-error {{static_assert failed "false is false"}} 18 static_assert(N == 2, "N is not 2!"); // expected-error {{static_assert failed "N is not 2!"} [all...] |
trivial-constructor.cpp | 5 static_assert(__has_trivial_constructor(T1), "T1 has trivial constructor!"); 10 static_assert(!__has_trivial_constructor(T2), "T2 has a user-declared constructor!"); 15 static_assert(!__has_trivial_constructor(T3), "T3 has a virtual function!"); 19 static_assert(!__has_trivial_constructor(T4), "T4 has a virtual base class!"); 23 static_assert(__has_trivial_constructor(T5), "All the direct base classes of T5 have trivial constructors!"); 30 static_assert(__has_trivial_constructor(T6), "All nonstatic data members of T6 have trivial constructors!"); 35 static_assert(!__has_trivial_constructor(T7), "t4 does not have a trivial constructor!"); 39 static_assert(!__has_trivial_constructor(T8), "The base class T2 does not have a trivial constructor!");
|
trivial-destructor.cpp | 5 static_assert(__has_trivial_destructor(T1), "T1 has trivial destructor!"); 10 static_assert(!__has_trivial_destructor(T2), "T2 has a user-declared destructor!"); 15 static_assert(__has_trivial_destructor(T3), "T3 has a virtual function (but still a trivial destructor)!"); 19 static_assert(__has_trivial_destructor(T4), "T4 has a virtual base class! (but still a trivial destructor)!"); 23 static_assert(__has_trivial_destructor(T5), "All the direct base classes of T5 have trivial destructors!"); 30 static_assert(__has_trivial_destructor(T6), "All nonstatic data members of T6 have trivial destructors!"); 35 static_assert(!__has_trivial_destructor(T7), "t2 does not have a trivial destructor!"); 39 static_assert(!__has_trivial_destructor(T8), "The base class T2 does not have a trivial destructor!");
|
literal-type.cpp | 3 static_assert(__is_literal(int), "fail"); 4 static_assert(__is_literal_type(int), "fail"); // alternate spelling for GCC 5 static_assert(__is_literal(void*), "fail"); 7 static_assert(__is_literal(E), "fail"); 8 static_assert(__is_literal(decltype(E1)), "fail"); 10 static_assert(__is_literal(IAR), "fail"); 13 static_assert(__is_literal(Vector), "fail"); 14 static_assert(__is_literal(VectorExt), "fail"); 45 static_assert(__is_literal(Empty), "fail"); 46 static_assert(__is_literal(LiteralType), "fail") [all...] |
member-pointer-ms.cpp | 5 // 2012, which supports C++11 and static_assert. It should pass for both 64-bit 37 static_assert(sizeof(int IncSingle::*) == kSingleDataSize, ""); 38 static_assert(sizeof(int IncMultiple::*) == kMultipleDataSize, ""); 39 static_assert(sizeof(int IncVirtual::*) == kVirtualDataSize, ""); 40 static_assert(sizeof(void (IncSingle::*)()) == kSingleFunctionSize, ""); 41 static_assert(sizeof(void (IncMultiple::*)()) == kMultipleFunctionSize, ""); 42 static_assert(sizeof(void (IncVirtual::*)()) == kVirtualFunctionSize, ""); 47 static_assert(sizeof(int IncUnspecified::*) == kUnspecifiedDataSize, ""); 48 static_assert(sizeof(void (IncUnspecified::*)()) == kUnspecifiedFunctionSize, ""); 56 static_assert(sizeof(int Single::*) == kSingleDataSize, "") [all...] |
/external/clang/test/CXX/special/class.copy/ |
p12-0x.cpp | 6 static_assert(B == __has_trivial_copy(T), ""); 7 static_assert(B == __is_trivially_constructible(T, T), ""); 8 static_assert(B == __is_trivially_constructible(T, const T &), ""); 9 static_assert(B == __is_trivially_constructible(T, T &&), ""); 57 static_assert(!__is_trivially_constructible(MutableTemplateCtorMember, const MutableTemplateCtorMember &), ""); 58 static_assert(__is_trivially_constructible(MutableTemplateCtorMember, MutableTemplateCtorMember &&), ""); 64 static_assert(!__is_trivially_constructible(MutableTemplateCtorMember2, const MutableTemplateCtorMember2 &), ""); 65 static_assert(__is_trivially_constructible(MutableTemplateCtorMember2, MutableTemplateCtorMember2 &&), ""); 76 static_assert(!__has_trivial_copy(TNT), "lie deliberately for gcc compatibility"); 77 static_assert(__is_trivially_constructible(TNT, TNT), "") [all...] |
p25-0x.cpp | 6 static_assert(B == __has_trivial_assign(T), ""); 7 static_assert(B == __is_trivially_assignable(T&, T), ""); 8 static_assert(B == __is_trivially_assignable(T&, const T &), ""); 9 static_assert(B == __is_trivially_assignable(T&, T &&), ""); 10 static_assert(B == __is_trivially_assignable(T&&, T), ""); 11 static_assert(B == __is_trivially_assignable(T&&, const T &), ""); 12 static_assert(B == __is_trivially_assignable(T&&, T &&), ""); 58 static_assert(!__is_trivially_assignable(MutableTemplateCtorMember, const MutableTemplateCtorMember &), ""); 59 static_assert(__is_trivially_assignable(MutableTemplateCtorMember, MutableTemplateCtorMember &&), ""); 70 static_assert(!__has_trivial_assign(TNT), "lie deliberately for gcc compatibility") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/diagnostics/syserr/ |
errc.pass.cpp | 18 static_assert(static_cast<int>(std::errc::address_family_not_supported) == EAFNOSUPPORT, ""); 19 static_assert(static_cast<int>(std::errc::address_in_use) == EADDRINUSE, ""); 20 static_assert(static_cast<int>(std::errc::address_not_available) == EADDRNOTAVAIL, ""); 21 static_assert(static_cast<int>(std::errc::already_connected) == EISCONN, ""); 22 static_assert(static_cast<int>(std::errc::argument_list_too_long) == E2BIG, ""); 23 static_assert(static_cast<int>(std::errc::argument_out_of_domain) == EDOM, ""); 24 static_assert(static_cast<int>(std::errc::bad_address) == EFAULT, ""); 25 static_assert(static_cast<int>(std::errc::bad_file_descriptor) == EBADF, ""); 26 static_assert(static_cast<int>(std::errc::bad_message) == EBADMSG, ""); 27 static_assert(static_cast<int>(std::errc::broken_pipe) == EPIPE, "") [all...] |
/external/clang/test/CXX/dcl.dcl/ |
p4-0x.cpp | 16 static_assert(S(true), ""); 17 static_assert(S(false), "not so fast"); // expected-error {{not so fast}} 18 static_assert(T(), ""); 19 static_assert(U(), ""); // expected-error {{ambiguous}} 21 static_assert(false, L"\x14hi" "!" R"x(")x"); // expected-error {{static_assert failed L"\024hi!\""}}
|
/external/clang/test/CodeGenCXX/ |
static-assert.cpp | 4 static_assert(true, ""); 7 static_assert(true, "");
|
/ndk/tests/build/wchar_t-size/jni/ |
test_always_signed.c | 10 #define STATIC_ASSERT(condition) \ 13 STATIC_ASSERT(sizeof(wchar_t) == 4); 15 STATIC_ASSERT(WCHAR_MIN == -1-2147483647); 16 STATIC_ASSERT(WCHAR_MAX == 2147483647);
|
test_8bit.c | 17 #define STATIC_ASSERT(condition) \ 21 STATIC_ASSERT(sizeof(__WCHAR_TYPE__) == 1); 22 STATIC_ASSERT(sizeof(wchar_t) == 1); 24 STATIC_ASSERT(sizeof(__WCHAR_TYPE__) == 4); 25 STATIC_ASSERT(sizeof(wchar_t) == 4); 30 STATIC_ASSERT(WCHAR_MIN == 0x80000000); 31 STATIC_ASSERT(WCHAR_MAX == 0x7fffffff);
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.trans/meta.trans.other/ |
aligned_storage.pass.cpp | 21 static_assert(std::is_same<std::aligned_storage_t<10, 1>, T1>::value, "" ); 23 static_assert(std::alignment_of<T1>::value == 1, ""); 24 static_assert(sizeof(T1) == 10, ""); 29 static_assert(std::is_same<std::aligned_storage_t<10, 2>, T1>::value, "" ); 31 static_assert(std::alignment_of<T1>::value == 2, ""); 32 static_assert(sizeof(T1) == 10, ""); 37 static_assert(std::is_same<std::aligned_storage_t<10, 4>, T1>::value, "" ); 39 static_assert(std::alignment_of<T1>::value == 4, ""); 40 static_assert(sizeof(T1) == 12, ""); 45 static_assert(std::is_same<std::aligned_storage_t<10, 8>, T1>::value, "" ) [all...] |
aligned_union.pass.cpp | 22 static_assert(std::is_same<std::aligned_union_t<10, char>, T1>::value, "" ); 24 static_assert(std::alignment_of<T1>::value == 1, ""); 25 static_assert(sizeof(T1) == 10, ""); 30 static_assert(std::is_same<std::aligned_union_t<10, short>, T1>::value, "" ); 32 static_assert(std::alignment_of<T1>::value == 2, ""); 33 static_assert(sizeof(T1) == 10, ""); 38 static_assert(std::is_same<std::aligned_union_t<10, int>, T1>::value, "" ); 40 static_assert(std::alignment_of<T1>::value == 4, ""); 41 static_assert(sizeof(T1) == 12, ""); 46 static_assert(std::is_same<std::aligned_union_t<10, double>, T1>::value, "" ) [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.c.headers/ |
math_h.pass.cpp | 20 static_assert((std::is_same<decltype(acos((double)0)), double>::value), ""); 21 static_assert((std::is_same<decltype(acosf(0)), float>::value), ""); 22 static_assert((std::is_same<decltype(acosl(0)), long double>::value), ""); 28 static_assert((std::is_same<decltype(asin((double)0)), double>::value), ""); 29 static_assert((std::is_same<decltype(asinf(0)), float>::value), ""); 30 static_assert((std::is_same<decltype(asinl(0)), long double>::value), ""); 36 static_assert((std::is_same<decltype(atan((double)0)), double>::value), ""); 37 static_assert((std::is_same<decltype(atanf(0)), float>::value), ""); 38 static_assert((std::is_same<decltype(atanl(0)), long double>::value), ""); 44 static_assert((std::is_same<decltype(atan2((double)0, (double)0)), double>::value), "") [all...] |
stdio_h.pass.cpp | 90 static_assert((std::is_same<decltype(remove("")), int>::value), ""); 91 static_assert((std::is_same<decltype(rename("","")), int>::value), ""); 92 static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), ""); 93 static_assert((std::is_same<decltype(tmpnam(cp)), char*>::value), ""); 94 static_assert((std::is_same<decltype(fclose(fp)), int>::value), ""); 95 static_assert((std::is_same<decltype(fflush(fp)), int>::value), ""); 96 static_assert((std::is_same<decltype(fopen("", "")), FILE*>::value), ""); 97 static_assert((std::is_same<decltype(freopen("", "", fp)), FILE*>::value), ""); 98 static_assert((std::is_same<decltype(setbuf(fp,cp)), void>::value), ""); 99 static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), "") [all...] |
wchar_h.pass.cpp | 45 static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), ""); 46 static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), ""); 47 static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), ""); 48 static_assert((std::is_same<decltype(swscanf(L"", L"")), int>::value), ""); 49 static_assert((std::is_same<decltype(vfwprintf(fp, L"", va)), int>::value), ""); 50 static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)), int>::value), ""); 51 static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)), int>::value), ""); 52 static_assert((std::is_same<decltype(vswscanf(L"", L"", va)), int>::value), ""); 53 static_assert((std::is_same<decltype(vwprintf(L"", va)), int>::value), ""); 54 static_assert((std::is_same<decltype(vwscanf(L"", va)), int>::value), "") [all...] |
stdint_h.pass.cpp | 23 static_assert(sizeof(int8_t)*CHAR_BIT == 8, 25 static_assert(std::is_signed<int8_t>::value, 28 static_assert(sizeof(int16_t)*CHAR_BIT == 16, 30 static_assert(std::is_signed<int16_t>::value, 33 static_assert(sizeof(int32_t)*CHAR_BIT == 32, 35 static_assert(std::is_signed<int32_t>::value, 38 static_assert(sizeof(int64_t)*CHAR_BIT == 64, 40 static_assert(std::is_signed<int64_t>::value, 44 static_assert(sizeof(uint8_t)*CHAR_BIT == 8, 46 static_assert(std::is_unsigned<uint8_t>::value [all...] |
/external/clang/test/CXX/expr/expr.prim/expr.prim.lambda/ |
p18.cpp | 21 static_assert(is_same<decltype(((r))), float const&>::value, 23 static_assert(is_same<decltype(x), float>::value, "should be float"); 24 static_assert(is_same<decltype((x)), const float&>::value, 26 static_assert(is_same<decltype(r), float&>::value, "should be float&"); 27 static_assert(is_same<decltype(ir), int&>::value, "should be int&"); 28 static_assert(is_same<decltype((ir)), int&>::value, "should be int&"); 29 static_assert(is_same<decltype(irc), const int&>::value, 31 static_assert(is_same<decltype((irc)), const int&>::value, 37 static_assert(is_same<decltype(x), float>::value, "should be float"); 38 static_assert(is_same<decltype((x)), float&>::value, [all...] |
/external/clang/test/CXX/class/ |
p6-0x.cpp | 11 static_assert(__is_trivial(Trivial), "Trivial is not trivial"); 12 static_assert(!__is_trivial(NonTrivial1), "NonTrivial1 is trivial"); 13 static_assert(!__is_trivial(NonTrivial2), "NonTrivial2 is trivial"); 14 static_assert(!__is_trivial(NonTrivial3), "NonTrivial3 is trivial"); 15 static_assert(!__is_trivial(NonTrivial4), "NonTrivial4 is trivial"); 16 static_assert(!__is_trivial(NonTrivial5), "NonTrivial5 is trivial"); 31 static_assert(!__is_trivial(NonTrivial6), "NonTrivial6 is trivial");
|
/external/clang/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/ |
p7.cpp | 8 static_assert(ss.a == 1, ""); 9 static_assert(ss.b[2] == 'd', ""); 10 static_assert(ss.c == 0, ""); 11 static_assert(ss.d == 's', ""); 21 static_assert(sizeof(a) == sizeof(b), ""); 22 static_assert(a[0] == b[0], ""); 23 static_assert(a[1] == b[1], "");
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/c.math/ |
cmath.pass.cpp | 20 static_assert((std::is_same<decltype(std::abs((float)0)), float>::value), ""); 21 static_assert((std::is_same<decltype(std::abs((double)0)), double>::value), ""); 22 static_assert((std::is_same<decltype(std::abs((long double)0)), long double>::value), ""); 28 static_assert((std::is_same<decltype(std::acos((float)0)), float>::value), ""); 29 static_assert((std::is_same<decltype(std::acos((bool)0)), double>::value), ""); 30 static_assert((std::is_same<decltype(std::acos((unsigned short)0)), double>::value), ""); 31 static_assert((std::is_same<decltype(std::acos((int)0)), double>::value), ""); 32 static_assert((std::is_same<decltype(std::acos((unsigned int)0)), double>::value), ""); 33 static_assert((std::is_same<decltype(std::acos((long)0)), double>::value), ""); 34 static_assert((std::is_same<decltype(std::acos((unsigned long)0)), double>::value), "") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.runtime/ |
cstdlib.pass.cpp | 42 static_assert((std::is_same<decltype(std::atof("")), double>::value), ""); 43 static_assert((std::is_same<decltype(std::atoi("")), int>::value), ""); 44 static_assert((std::is_same<decltype(std::atol("")), long>::value), ""); 45 static_assert((std::is_same<decltype(std::atoll("")), long long>::value), ""); 46 static_assert((std::is_same<decltype(std::getenv("")), char*>::value), ""); 47 static_assert((std::is_same<decltype(std::strtod("", endptr)), double>::value), ""); 48 static_assert((std::is_same<decltype(std::strtof("", endptr)), float>::value), ""); 49 static_assert((std::is_same<decltype(std::strtold("", endptr)), long double>::value), ""); 50 static_assert((std::is_same<decltype(std::strtol("", endptr,0)), long>::value), ""); 51 static_assert((std::is_same<decltype(std::strtoll("", endptr,0)), long long>::value), "") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/meta/meta.unary/meta.unary.cat/ |
class.pass.cpp | 19 static_assert(!std::is_void<T>::value, ""); 20 static_assert(!std::is_integral<T>::value, ""); 21 static_assert(!std::is_floating_point<T>::value, ""); 22 static_assert(!std::is_array<T>::value, ""); 23 static_assert(!std::is_pointer<T>::value, ""); 24 static_assert(!std::is_lvalue_reference<T>::value, ""); 25 static_assert(!std::is_rvalue_reference<T>::value, ""); 26 static_assert(!std::is_member_object_pointer<T>::value, ""); 27 static_assert(!std::is_member_function_pointer<T>::value, ""); 28 static_assert(!std::is_enum<T>::value, "") [all...] |