/third_party/openssl/test/ |
D | test_test.c | 22 #define TEST(expected, test) test_case((expected), #test, (test)) macro 35 if (!TEST(1, TEST_int_eq(1, 1)) in test_int() 36 || !TEST(0, TEST_int_eq(1, -1)) in test_int() 37 || !TEST(1, TEST_int_ne(1, 2)) in test_int() 38 || !TEST(0, TEST_int_ne(3, 3)) in test_int() 39 || !TEST(1, TEST_int_lt(4, 9)) in test_int() 40 || !TEST(0, TEST_int_lt(9, 4)) in test_int() 41 || !TEST(1, TEST_int_le(4, 9)) in test_int() 42 || !TEST(1, TEST_int_le(5, 5)) in test_int() 43 || !TEST(0, TEST_int_le(9, 4)) in test_int() [all …]
|
/third_party/ffmpeg/libavutil/tests/ |
D | pixfmt_best.c | 57 #define TEST(input, expected) do { \ in main() macro 71 TEST(pixfmt_list[i], pixfmt_list[i]); in main() 74 TEST(AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_MONOWHITE); in main() 75 TEST(AV_PIX_FMT_NV12, AV_PIX_FMT_YUV420P); in main() 76 TEST(AV_PIX_FMT_P010, AV_PIX_FMT_YUV420P10); in main() 77 TEST(AV_PIX_FMT_P016, AV_PIX_FMT_YUV420P16); in main() 78 TEST(AV_PIX_FMT_NV16, AV_PIX_FMT_YUV422P); in main() 79 TEST(AV_PIX_FMT_NV24, AV_PIX_FMT_YUV444P); in main() 80 TEST(AV_PIX_FMT_YUYV422, AV_PIX_FMT_YUV422P); in main() 81 TEST(AV_PIX_FMT_UYVY422, AV_PIX_FMT_YUV422P); in main() [all …]
|
/third_party/skia/tests/ |
D | FitsInTest.cpp | 14 #define TEST(S, s, D, expected) REPORTER_ASSERT(reporter, (SkTFitsIn<D>((S)(s)) == (expected))) macro 23 TEST(uint16_t, 257, int8_t, false); in DEF_TEST() 25 TEST(int32_t, 1, int8_t, true); in DEF_TEST() 26 TEST(int32_t, -1, int8_t, true); in DEF_TEST() 27 TEST(int32_t, (int32_t)(std::numeric_limits<int8_t>::max)(), int8_t, true); in DEF_TEST() 28 TEST(int32_t, ((int32_t)(std::numeric_limits<int8_t>::max)())+1, int8_t, false); in DEF_TEST() 29 TEST(int32_t, (int32_t)(std::numeric_limits<int8_t>::min)(), int8_t, true); in DEF_TEST() 30 TEST(int32_t, (int32_t)((std::numeric_limits<int8_t>::min)())-1, int8_t, false); in DEF_TEST() 32 TEST(int32_t, 1, uint8_t, true); in DEF_TEST() 33 TEST(int32_t, -1, uint8_t, false); in DEF_TEST() [all …]
|
/third_party/musl/libc-test/src/functionalext/thread/ |
D | pthread_rwlock_rdlock.c | 25 TEST(pthread_rwlock_wrlock(&g_rwlock1) == 0); in PthreadClockRdlockNoOutRealTimeW1() 27 TEST(pthread_rwlock_unlock(&g_rwlock1) == 0); in PthreadClockRdlockNoOutRealTimeW1() 36 TEST(pthread_rwlock_clockrdlock(&g_rwlock1, CLOCK_REALTIME, &ts) == 0); in PthreadClockRdlockNoOutRealTimeR2() 37 TEST(pthread_rwlock_unlock(&g_rwlock1) == 0); in PthreadClockRdlockNoOutRealTimeR2() 49 TEST(pthread_rwlock_init(&g_rwlock1, NULL) == 0); in pthread_rwlock_clockrdlock_0010() 51 TEST(pthread_create(&tid[0], NULL, PthreadClockRdlockNoOutRealTimeW1, NULL) == 0); in pthread_rwlock_clockrdlock_0010() 52 TEST(pthread_create(&tid[1], NULL, PthreadClockRdlockNoOutRealTimeR2, NULL) == 0); in pthread_rwlock_clockrdlock_0010() 54 TEST(pthread_join(tid[0], NULL) == 0); in pthread_rwlock_clockrdlock_0010() 55 TEST(pthread_join(tid[1], NULL) == 0); in pthread_rwlock_clockrdlock_0010() 56 TEST(pthread_rwlock_destroy(&g_rwlock1) == 0); in pthread_rwlock_clockrdlock_0010() [all …]
|
D | pthread_mutex_ext.c | 29 TEST(pthread_mutex_clocklock(mtx, CLOCK_REALTIME, &ts) == ETIMEDOUT); in PthreadClocklockOutRealTime() 33 TEST(timeDiff < 20); in PthreadClocklockOutRealTime() 46 TEST(pthread_create(&tid, NULL, PthreadClocklockOutRealTime, (void*)&mtx) == 0); in pthread_mutex_clocklock_0010() 48 TEST(pthread_mutex_lock(&mtx) == 0); in pthread_mutex_clocklock_0010() 51 TEST(pthread_mutex_unlock(&mtx) == 0); in pthread_mutex_clocklock_0010() 53 TEST(pthread_join(tid, NULL) == 0); in pthread_mutex_clocklock_0010() 65 TEST(pthread_mutex_clocklock(mtx, CLOCK_REALTIME, &ts) == 0); in PthreadClocklockNoOutRealTime() 78 TEST(pthread_create(&tid, NULL, PthreadClocklockNoOutRealTime, (void*)&mtx) == 0); in pthread_mutex_clocklock_0020() 80 TEST(pthread_mutex_lock(&mtx) == 0); in pthread_mutex_clocklock_0020() 82 TEST(pthread_mutex_unlock(&mtx) == 0); in pthread_mutex_clocklock_0020() [all …]
|
/third_party/musl/libc-test/src/functional/ |
D | pthread_cond.c | 5 #define TEST(r, f, m) ( \ macro 42 TEST(r, pthread_mutex_init(&mtx, 0), ""); in main() 43 TEST(r, pthread_cond_init(&cond, 0), ""); in main() 44 TEST(r, pthread_mutex_lock(&mtx), ""); in main() 45 TEST(r, pthread_create(&td, 0, start_signal, (void *[]){ &cond, &mtx }), ""); in main() 46 TEST(r, pthread_cond_wait(&cond, &mtx), ""); in main() 47 TEST(r, pthread_join(td, &res), ""); in main() 48 TEST(r, pthread_mutex_unlock(&mtx), ""); in main() 49 TEST(r, pthread_mutex_destroy(&mtx), ""); in main() 50 TEST(r, pthread_cond_destroy(&cond), ""); in main() [all …]
|
D | string.c | 13 #define TEST(r, f, x, m) ( \ macro 28 TEST(s, strcpy(b, b+16), b, "wrong return %p != %p"); in main() 30 TEST(s, strcpy(b+1, b+16), b+1, "wrong return %p != %p"); in main() 32 TEST(s, strcpy(b+2, b+16), b+2, "wrong return %p != %p"); in main() 34 TEST(s, strcpy(b+3, b+16), b+3, "wrong return %p != %p"); in main() 37 TEST(s, strcpy(b+1, b+17), b+1, "wrong return %p != %p"); in main() 39 TEST(s, strcpy(b+2, b+18), b+2, "wrong return %p != %p"); in main() 41 TEST(s, strcpy(b+3, b+19), b+3, "wrong return %p != %p"); in main() 44 TEST(s, memset(b, 'x', sizeof b), b, "wrong return %p != %p"); in main() 45 TEST(s, strncpy(b, "abc", sizeof b - 1), b, "wrong return %p != %p"); in main() [all …]
|
D | fscanf.c | 13 #define TEST(r, f, x, m) ( \ macro 80 TEST(i, pipe(p), 0, "failed to open pipe %d!=%d (%s)"); in main() 81 TEST(i, !(f = fdopen(p[0], "rb")), 0, "failed to fdopen pipe %d!=%d (%s)"); in main() 89 TEST(i, write(p[1], "hello, world\n", 13), 13, "write error %d!=%d (%s)"); in main() 90 TEST(i, fscanf(f, "%s %[own]", a, b), 2, "got %d fields, expected %d"); in main() 93 TEST(i, fgetc(f), 'r', "'%c' != '%c') (%s)"); in main() 95 TEST(i, write(p[1], " 0x12 0x34", 10), 10, "write error %d!=%d (%s)"); in main() 96 TEST(i, fscanf(f, "ld %5i%2i", &x, &y), 1, "got %d fields, expected %d"); in main() 97 TEST(i, x, 0x12, "%d != %d"); in main() 98 TEST(i, fgetc(f), '3', "'%c' != '%c'"); in main() [all …]
|
D | sscanf.c | 6 #define TEST(r, f, x, m) ( \ macro 15 TEST(i, sscanf(# x, "%lf", &d), 1, "got %d fields, expected %d"), \ 16 TEST(t, d, (double)x, "%g != %g") ) 25 TEST(i, sscanf("hello, world\n", "%s %s", a, b), 2, "only %d fields, expected %d"); in main() 29 TEST(i, sscanf("hello, world\n", "%[hel]%s", a, b), 2, "only %d fields, expected %d"); in main() 33 TEST(i, sscanf("hello, world\n", "%[hel] %s", a, b), 2, "only %d fields, expected %d"); in main() 39 TEST(i, sscanf("hello, world\n", "%8c%8c", a, b), 1, "%d fields, expected %d"); in main() 42 …TEST(i, sscanf("56789 0123 56a72", "%2d%d%*d %[0123456789]\n", &x, &y, a), 3, "only %d fields, exp… in main() 43 TEST(i, x, 56, "%d != %d"); in main() 44 TEST(i, y, 789, "%d != %d"); in main() [all …]
|
D | fwscanf.c | 9 #define TEST(r, f, x, m) ( \ macro 42 TEST(i, !!(f=writetemp(" 42")), 1, "failed to make temp file"); in main() 45 TEST(i, fwscanf(f, L" %n%*d%n", &x, &y), 0, "%d != %d"); in main() 46 TEST(i, x, 6, "%d != %d"); in main() 47 TEST(i, y, 8, "%d != %d"); in main() 48 TEST(i, ftell(f), 8, "%d != %d"); in main() 49 TEST(i, !!feof(f), 1, "%d != %d"); in main() 53 TEST(i, !!(f=writetemp("[abc123]....x")), 1, "failed to make temp file"); in main() 56 TEST(i, fwscanf(f, L"%10[^]]%n%10[].]%n", a, &x, b, &y), 2, "%d != %d"); in main() 59 TEST(i, x, 7, "%d != %d"); in main() [all …]
|
D | pthread_robust.c | 6 #define TEST(r, f, m) ( \ macro 35 TEST(r, pthread_barrier_init(&barrier2, 0, 2), "creating barrier"); in f() 38 TEST(r, pthread_mutexattr_init(&mtx_a), "initializing mutex attr"); in f() 39 TEST(r, pthread_mutexattr_setrobust(&mtx_a, PTHREAD_MUTEX_ROBUST), "setting robust attribute"); in f() 41 …TEST(r, pthread_mutexattr_setpshared(&mtx_a, PTHREAD_PROCESS_SHARED), "setting pshared attribute"); in f() 43 TEST(r, pthread_mutexattr_setprotocol(&mtx_a, PTHREAD_PRIO_INHERIT), "setting PI attribute"); in f() 44 TEST(r, pthread_mutex_init(&mtx, &mtx_a), "initializing robust mutex"); in f() 45 TEST(r, pthread_mutex_lock(&mtx), "locking robust mutex"); in f() 46 TEST(r, pthread_mutex_unlock(&mtx), "unlocking robust mutex"); in f() 47 TEST(r, pthread_create(&td, 0, start_lock, &mtx), "failed to create thread"); in f() [all …]
|
D | ungetc.c | 8 #define TEST(r, f, x, m) ( \ macro 22 TEST(i, !(f = tmpfile()), 0, "failed to create temp file %d!=%d (%s)"); in main() 26 TEST(i, fprintf(f, "hello, world\n"), 13, "%d != %d (%m)"); in main() 27 TEST(i, fseek(f, 0, SEEK_SET), 0, "%d != %d (%m)"); in main() 29 TEST(i, feof(f), 0, "%d != %d"); in main() 30 TEST(i, fgetc(f), 'h', "'%c' != '%c'"); in main() 31 TEST(i, ftell(f), 1, "%d != %d"); in main() 32 TEST(i, ungetc('x', f), 'x', "%d != %d"); in main() 33 TEST(i, ftell(f), 0, "%d != %d"); in main() 34 TEST(i, fscanf(f, "%[h]", a), 0, "got %d fields, expected %d"); in main() [all …]
|
D | strtol.c | 13 #define TEST(r, f, x, m) ( \ macro 31 TEST(l, atol("2147483647"), 2147483647L, "max 32bit signed %ld != %ld"); in main() 32 TEST(l, strtol("2147483647", 0, 0), 2147483647L, "max 32bit signed %ld != %ld"); in main() 33 TEST(ul, strtoul("4294967295", 0, 0), 4294967295UL, "max 32bit unsigned %lu != %lu"); in main() 36 TEST(l, strtol(s="2147483648", &c, 0), 2147483647L, "uncaught overflow %ld != %ld"); in main() 39 TEST(l, strtol(s="-2147483649", &c, 0), -2147483647L-1, "uncaught overflow %ld != %ld"); in main() 42 TEST(ul, strtoul(s="4294967296", &c, 0), 4294967295UL, "uncaught overflow %lu != %lu"); in main() 45 TEST(ul, strtoul(s="-1", &c, 0), -1UL, "rejected negative %lu != %lu"); in main() 48 TEST(ul, strtoul(s="-2", &c, 0), -2UL, "rejected negative %lu != %lu"); in main() 51 TEST(ul, strtoul(s="-2147483648", &c, 0), -2147483648UL, "rejected negative %lu != %lu"); in main() [all …]
|
/third_party/elfutils/tests/ |
D | leb128.c | 93 #define TEST(ARRAY, V) \ in test_sleb() macro 97 TEST (v0, 0); in test_sleb() 98 TEST (v1, 1); in test_sleb() 99 TEST (v23, 23); in test_sleb() 100 TEST (vm_1, -1); in test_sleb() 101 TEST (vm_2, -2); in test_sleb() 102 TEST (s127, 127); in test_sleb() 103 TEST (v128, 128); in test_sleb() 104 TEST (v129, 129); in test_sleb() 105 TEST (vm_127, -127); in test_sleb() [all …]
|
/third_party/ltp/tools/sparse/sparse-src/validation/ |
D | integer-const-expr.c | 30 #define TEST(R, X) _Static_assert(ICE_P(X) == R, "ICE_P(" #X ") => " #R); \ macro 46 TEST(1, 4); in main() 47 TEST(1, sizeof(long)); in main() 48 TEST(1, 5ull - 3u); in main() 49 TEST(1, 3.2); in main() 50 TEST(1, sizeof(fla)); in main() 52 TEST(0, square(2)); in main() 53 TEST(0, square(argc)); in main() 54 TEST(0, squarec(2)); in main() 55 TEST(0, squarec(argc)); in main() [all …]
|
D | generic-typename.c | 21 #define TEST(name, x) \ macro 24 TEST(bool, _Bool) 25 TEST(char, char) 26 TEST(uchar, unsigned char) 27 TEST(short, short) 28 TEST(ushort, unsigned short) 29 TEST(int, int) 30 TEST(uint, unsigned int) 31 TEST(long, long) 32 TEST(ulong, unsigned long) [all …]
|
D | abi-integer.c | 1 #define TEST(T, S, A) \ macro 6 TEST(int, 4, 4); in main() 9 TEST(long, 8, 8); in main() 10 TEST(void *, 8, 8); in main() 11 TEST(long long, 8, 8); in main() 13 TEST(long, 4, 4); in main() 14 TEST(void *, 8, 8); in main() 15 TEST(long long, 8, 8); in main() 17 TEST(long, 4, 4); in main() 18 TEST(void *, 4, 4); in main() [all …]
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/ |
D | pthread_rwlock_rdlock_sup.c | 21 #define TEST(c, ...) ((c) || (t_error(#c " failed: " __VA_ARGS__), 0)) macro 29 TEST(pthread_rwlock_rdlock(&g_rwlock1) == 0); in pthreadRdlockR1() 31 TEST(pthread_rwlock_unlock(&g_rwlock1) == 0); in pthreadRdlockR1() 38 TEST(pthread_rwlock_rdlock(&g_rwlock1) == 0); in pthreadRdlockR2() 40 TEST(pthread_rwlock_unlock(&g_rwlock1) == 0); in pthreadRdlockR2() 52 TEST(pthread_rwlock_init(&g_rwlock1, NULL) == 0); in pthread_rwlock_rdlock_0100() 53 TEST(pthread_rwlock_rdlock(&g_rwlock1) == 0); in pthread_rwlock_rdlock_0100() 54 TEST(pthread_rwlock_unlock(&g_rwlock1) == 0); in pthread_rwlock_rdlock_0100() 55 TEST(pthread_rwlock_destroy(&g_rwlock1) == 0); in pthread_rwlock_rdlock_0100() 66 TEST(pthread_rwlock_init(&g_rwlock1, NULL) == 0); in pthread_rwlock_rdlock_0200() [all …]
|
/third_party/gn/src/gn/ |
D | parser_unittest.cc | 93 TEST(Parser, Literal) { in TEST() function 98 TEST(Parser, BinaryOp) { in TEST() function 117 TEST(Parser, FunctionCall) { in TEST() function 130 TEST(Parser, ParenExpression) { in TEST() function 148 TEST(Parser, OrderOfOperationsLeftAssociative) { in TEST() function 159 TEST(Parser, OrderOfOperationsEqualityBoolean) { in TEST() function 179 TEST(Parser, UnaryOp) { in TEST() function 188 TEST(Parser, List) { in TEST() function 214 TEST(Parser, Assignment) { in TEST() function 224 TEST(Parser, Accessor) { in TEST() function [all …]
|
/third_party/musl/libc-test/src/functionalext/fortify/ |
D | unistd.c | 52 TEST(WIFEXITED(status) == 0); in unistd_dynamic_chk_001() 53 TEST(WIFSTOPPED(status) == 1); in unistd_dynamic_chk_001() 54 TEST(WSTOPSIG(status) == SIGSTOP); in unistd_dynamic_chk_001() 75 TEST(fd != err); in unistd_dynamic_chk_002() 91 TEST(WIFEXITED(status) == 0); in unistd_dynamic_chk_002() 92 TEST(WIFSTOPPED(status) == 1); in unistd_dynamic_chk_002() 93 TEST(WSTOPSIG(status) == SIGSTOP); in unistd_dynamic_chk_002() 115 TEST(fd != err); in unistd_dynamic_chk_003() 131 TEST(WIFEXITED(status) == 0); in unistd_dynamic_chk_003() 132 TEST(WIFSTOPPED(status) == 1); in unistd_dynamic_chk_003() [all …]
|
D | string_ext.c | 60 TEST(dst[0] == EQ_0); in test_strcat_0010() 90 TEST(WIFEXITED(status) == 0); in test_strcat_0020() 91 TEST(WIFSTOPPED(status) == 1); in test_strcat_0020() 92 TEST(WSTOPSIG(status) == SIGSTOP); in test_strcat_0020() 111 TEST(dst[0] == EQ_0); in test_strncat_0010() 141 TEST(WIFEXITED(status) == 0); in test_strncat_0020() 142 TEST(WIFSTOPPED(status) == 1); in test_strncat_0020() 143 TEST(WSTOPSIG(status) == SIGSTOP); in test_strncat_0020() 161 TEST(dst[0] == 'a'); in test_stpcpy_0010() 189 TEST(WIFEXITED(status) == 0); in test_stpcpy_0020() [all …]
|
/third_party/googletest/googletest/test/ |
D | googletest-failfast-unittest_.cc | 59 TEST(HasSimpleTest, Test0) {} in TEST() function 61 TEST(HasSimpleTest, Test1) { FAIL() << "Expected failure."; } in TEST() function 63 TEST(HasSimpleTest, Test2) { FAIL() << "Expected failure."; } in TEST() function 65 TEST(HasSimpleTest, Test3) { FAIL() << "Expected failure."; } in TEST() function 67 TEST(HasSimpleTest, Test4) { FAIL() << "Expected failure."; } in TEST() function 71 TEST(HasDisabledTest, Test0) {} in TEST() function 73 TEST(HasDisabledTest, DISABLED_Test1) { FAIL() << "Expected failure."; } in TEST() function 75 TEST(HasDisabledTest, Test2) { FAIL() << "Expected failure."; } in TEST() function 77 TEST(HasDisabledTest, Test3) { FAIL() << "Expected failure."; } in TEST() function 79 TEST(HasDisabledTest, Test4) { FAIL() << "Expected failure."; } in TEST() function [all …]
|
D | googletest-printers-test.cc | 299 TEST(PrintEnumTest, AnonymousEnum) { in TEST() function 304 TEST(PrintEnumTest, EnumWithoutPrinter) { in TEST() function 309 TEST(PrintEnumTest, EnumWithStreaming) { in TEST() function 314 TEST(PrintEnumTest, EnumWithPrintTo) { in TEST() function 321 TEST(PrintClassTest, BiggestIntConvertible) { in TEST() function 328 TEST(PrintCharTest, PlainChar) { in TEST() function 348 TEST(PrintCharTest, SignedChar) { in TEST() function 354 TEST(PrintCharTest, UnsignedChar) { in TEST() function 359 TEST(PrintCharTest, Char16) { EXPECT_EQ("U+0041", Print(u'A')); } in TEST() function 361 TEST(PrintCharTest, Char32) { EXPECT_EQ("U+0041", Print(U'A')); } in TEST() function [all …]
|
D | googletest-filepath-test.cc | 75 TEST(GetCurrentDirTest, ReturnsCurrentDir) { 99 TEST(IsEmptyTest, ReturnsTrueForEmptyPath) { in TEST() function 103 TEST(IsEmptyTest, ReturnsFalseForNonEmptyPath) { in TEST() function 111 TEST(RemoveDirectoryNameTest, WhenEmptyName) { in TEST() function 116 TEST(RemoveDirectoryNameTest, ButNoDirectory) { in TEST() function 121 TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileName) { in TEST() function 127 TEST(RemoveDirectoryNameTest, WhereThereIsNoFileName) { in TEST() function 133 TEST(RemoveDirectoryNameTest, ShouldGiveFileName) { in TEST() function 140 TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileName) { in TEST() function 153 TEST(RemoveDirectoryNameTest, RootFileShouldGiveFileNameForAlternateSeparator) { in TEST() function [all …]
|
/third_party/skia/third_party/externals/tint/src/writer/ |
D | float_to_string_test.cc | 46 TEST(FloatToStringTest, Zero) { in TEST() function 50 TEST(FloatToStringTest, One) { in TEST() function 54 TEST(FloatToStringTest, MinusOne) { in TEST() function 58 TEST(FloatToStringTest, Billion) { in TEST() function 62 TEST(FloatToStringTest, Small) { in TEST() function 66 TEST(FloatToStringTest, Highest) { in TEST() function 77 TEST(FloatToStringTest, Lowest) { in TEST() function 91 TEST(FloatToStringTest, Precision) { in TEST() function 102 TEST(FloatToBitPreservingStringTest, Zero) { in TEST() function 106 TEST(FloatToBitPreservingStringTest, One) { in TEST() function [all …]
|