/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/boost/libs/nowide/test/ |
D | test_fstream.cpp | 25 TEST(f); in make_empty_file() 42 TEST(f); in read_file() 68 TEST(f); in test_with_different_buffer_sizes() 70 TEST(f.put('a')); in test_with_different_buffer_sizes() 71 TEST(f.put('b')); in test_with_different_buffer_sizes() 72 TEST(f.put('c')); in test_with_different_buffer_sizes() 73 TEST(f.put('d')); in test_with_different_buffer_sizes() 74 TEST(f.put('e')); in test_with_different_buffer_sizes() 75 TEST(f.put('f')); in test_with_different_buffer_sizes() 76 TEST(f.put('g')); in test_with_different_buffer_sizes() [all …]
|
D | test_stackstring.cpp | 41 TEST(ss.uses_stack_memory()); in stackstring_to_wide() 48 TEST(ss.uses_stack_memory()); in stackstring_to_narrow() 55 TEST(ss.uses_heap_memory() || s.empty()); in heap_stackstring_to_wide() 62 TEST(ss.uses_heap_memory() || s.empty()); in heap_stackstring_to_narrow() 75 TEST(s.get() == NULL); in test_main() 80 TEST(s.get() == NULL); in test_main() 82 TEST(s2.get() == NULL); in test_main() 87 TEST(s.get() == std::string("foo")); in test_main() 89 TEST(s.get() == NULL); in test_main() 91 TEST(s2.get() == std::string("foo")); in test_main() [all …]
|
D | test_fstream_cxx11.cpp | 24 TEST(f << contents); in create_file() 30 TEST(stream); in get_file_contents() 44 TEST(f); in make_ifstream() 46 TEST(f >> s); in make_ifstream() 47 TEST(s == "Hello"); in make_ifstream() 57 TEST(f); in test_ifstream() 59 TEST(f >> s); in test_ifstream() 60 TEST(s == "World"); in test_ifstream() 69 TEST(f); in test_ifstream() 71 TEST(f >> s); in test_ifstream() [all …]
|
D | test_stdio.cpp | 42 TEST(f); in create_test_file() 43 TEST(std::fputs("test\n", f) >= 0); in create_test_file() 66 TEST(f); in test_main() 68 TEST(std::fgets(buf, 16, f) != 0); in test_main() 69 TEST(strcmp(buf, "test\n") == 0); in test_main() 75 TEST(file_exists(filename)); in test_main() 76 TEST(boost::nowide::remove(filename.c_str()) == 0); in test_main() 77 TEST(!file_exists(filename)); in test_main() 82 TEST(!file_exists(filename)); in test_main() 83 TEST(boost::nowide::fopen(filename.c_str(), "r") == NULL); in test_main() [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/boost/libs/locale/test/ |
D | test_date_time.cpp | 28 #define TESTR(X) do { TEST(X); RESET(); } while(0) 69 TEST(calendar() == cal); in main() 70 TEST(calendar(loc) == cal); in main() 71 TEST(calendar(tz) == cal); in main() 72 TEST(calendar(loc,"GMT+01:00") != cal); in main() 73 TEST(calendar(g("ru_RU.UTF-8")) != cal); in main() 75 TEST(cal.minimum(month())==0); in main() 76 TEST(cal.maximum(month())==11); in main() 77 TEST(cal.minimum(day())==1); in main() 78 TEST(cal.greatest_minimum(day())==1); in main() [all …]
|
/third_party/flutter/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/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/functional/ |
D | fscanf.c | 8 #define TEST(r, f, x, m) ( \ macro 36 TEST(i, pipe(p), 0, "failed to open pipe %d!=%d (%s)"); in main() 37 TEST(i, !(f = fdopen(p[0], "rb")), 0, "failed to fdopen pipe %d!=%d (%s)"); in main() 45 TEST(i, write(p[1], "hello, world\n", 13), 13, "write error %d!=%d (%s)"); in main() 46 TEST(i, fscanf(f, "%s %[own]", a, b), 2, "got %d fields, expected %d"); in main() 49 TEST(i, fgetc(f), 'r', "'%c' != '%c') (%s)"); in main() 51 TEST(i, write(p[1], " 0x12 0x34", 10), 10, "write error %d!=%d (%s)"); in main() 52 TEST(i, fscanf(f, "ld %5i%2i", &x, &y), 1, "got %d fields, expected %d"); in main() 53 TEST(i, x, 0x12, "%d != %d"); in main() 54 TEST(i, fgetc(f), '3', "'%c' != '%c'"); in main() [all …]
|
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 | 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 | 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 | 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 | 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 …]
|
/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/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 …]
|
/third_party/glib/tests/ |
D | testgdate.c | 20 #define TEST(m,cond) G_STMT_START { failed = !(cond); \ macro 79 TEST("sizeof(GDate) is not more than 8 bytes on this platform", sizeof(GDate) < 9); in main() 83 TEST("Empty constructor produces invalid date", !g_date_valid(d)); in main() 89 TEST("January 1, Year 1 created and valid", g_date_valid(d)); in main() 93 TEST("January 1, Year 1 is Julian date 1", j == 1); in main() 95 TEST("Returned month is January", g_date_get_month(d) == G_DATE_JANUARY); in main() 96 TEST("Returned day is 1", g_date_get_day(d) == 1); in main() 97 TEST("Returned year is 1", g_date_get_year(d) == 1); in main() 99 TEST("Bad month is invalid", !g_date_valid_month(G_DATE_BAD_MONTH)); in main() 100 TEST("Month 13 is invalid", !g_date_valid_month(13)); 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/googletest/googletest/test/ |
D | googletest-failfast-unittest_.cc | 60 TEST(HasSimpleTest, Test0) {} in TEST() function 62 TEST(HasSimpleTest, Test1) { FAIL() << "Expected failure."; } in TEST() function 64 TEST(HasSimpleTest, Test2) { FAIL() << "Expected failure."; } in TEST() function 66 TEST(HasSimpleTest, Test3) { FAIL() << "Expected failure."; } in TEST() function 68 TEST(HasSimpleTest, Test4) { FAIL() << "Expected failure."; } in TEST() function 72 TEST(HasDisabledTest, Test0) {} in TEST() function 74 TEST(HasDisabledTest, DISABLED_Test1) { FAIL() << "Expected failure."; } in TEST() function 76 TEST(HasDisabledTest, Test2) { FAIL() << "Expected failure."; } in TEST() function 78 TEST(HasDisabledTest, Test3) { FAIL() << "Expected failure."; } in TEST() function 80 TEST(HasDisabledTest, Test4) { FAIL() << "Expected failure."; } 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() 74 TEST(fd != err); in unistd_dynamic_chk_002() 90 TEST(WIFEXITED(status) == 0); in unistd_dynamic_chk_002() 91 TEST(WIFSTOPPED(status) == 1); in unistd_dynamic_chk_002() 92 TEST(WSTOPSIG(status) == SIGSTOP); in unistd_dynamic_chk_002() 113 TEST(fd != err); in unistd_dynamic_chk_003() 129 TEST(WIFEXITED(status) == 0); in unistd_dynamic_chk_003() 130 TEST(WIFSTOPPED(status) == 1); in unistd_dynamic_chk_003() [all …]
|