这篇教程C++ test_case函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中test_case函数的典型用法代码示例。如果您正苦于以下问题:C++ test_case函数的具体用法?C++ test_case怎么用?C++ test_case使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了test_case函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: lisp_parser_testvoid lisp_parser_test(){#if 0 test_case(test_lisp_parse_1); test_case(test_lisp_parse_nested);#endif}
开发者ID:andyfischer,项目名称:ice,代码行数:7,
示例2: mainint main(void){ test_case("Hello, my name is Sara!"); test_case("Isn't it true that Padraig O'Malley didn't win (he came in 3rd!)? 'Tain't necessarily so!"); test_case("'Tain't an Archimedes' Screw"); return 0;}
开发者ID:jleffler,项目名称:soq,代码行数:7,
示例3: mainintmain (void){ float64_t v1 = 3.14159265359; float64_t v2 = -2.71828; float64_t v1_1[] = {v1}; float64_t v1_2[] = {v2}; float64_t e1[] = {v1 * v2}; test_case (v1_1, v1_2, e1); float64_t v2_1[] = {0}; float64_t v2_2[] = {__builtin_huge_val ()}; float64_t e2[] = {2.0}; test_case (v2_1, v2_2, e2); float64_t v3_1[] = {0}; float64_t v3_2[] = {-__builtin_huge_val ()}; float64_t e3[] = {-2.0}; test_case (v3_1, v3_2, e3); float64_t v4_1[] = {-0.0}; float64_t v4_2[] = {__builtin_huge_val ()}; float64_t e4[] = {-2.0}; test_case (v4_1, v4_2, e4); float64_t v5_1[] = {-0.0}; float64_t v5_2[] = {-__builtin_huge_val ()}; float64_t e5[] = {2.0}; test_case (v5_1, v5_2, e5); return 0;}
开发者ID:0day-ci,项目名称:gcc,代码行数:33,
示例4: mainint main(){ srand(time(NULL)); int T = MAXT; printf("%d/n", T); printf("/n""2/n""firstVwXyZ-wXyZ UVWXYZ/n""lastwxyz/n""8/n""F wxyz/n""L wxyz/n""F vwxyz/n""L vwxyz/n""F uvwxyz/n""L uvwxyz/n""N z/n""F ab/n"); --T; test_case(true); --T; while (T--) test_case(); return 0;}
开发者ID:lbv,项目名称:ffa-pc,代码行数:29,
示例5: mainintmain(int argc, char *argv[]){ uint8_t opt_arr1[] = { 0x1, 0x2, 0x1, 0x0 }; uint8_t opt_arr2[] = { 0x1, 0x4, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0 }; custom_opt_t opt; uint16_t expected_opt_size; uint16_t payload_sz; opt.code = CUSTOM_IP_OPT; opt.len = 3; opt.opt[0] = 'X'; opt.opt[1] = 'Y'; opt.opt[2] = 'Z'; expected_opt_size = 8; payload_sz = 5; test_case(payload_sz, NULL, 0, &opt, expected_opt_size); expected_opt_size = 8; payload_sz = 1000; test_case(payload_sz, opt_arr1, sizeof (opt_arr1), &opt, expected_opt_size); expected_opt_size = 24; payload_sz = 1000; strncpy(opt.opt, "Special Option", sizeof (opt.opt)); opt.len = strlen("Special Option"); test_case(payload_sz, opt_arr2, sizeof (opt_arr2), &opt, expected_opt_size);}
开发者ID:pombredanne,项目名称:Examples-1,代码行数:29,
示例6: mainint main(){ srand(time(NULL)); T = MAXT; for (int i = 0; i < 5; ++i) test_case(true); while (T) test_case(); return 0;}
开发者ID:M4573R,项目名称:pc-code,代码行数:11,
示例7: mainint main() { printf("%d", (int)sizeof_int()); test_case(0, 0); test_case(1, 1); test_case(0xffffffff, 0); test_case(0x10000000, 1); test_case(4, 12); return 0;}
开发者ID:Foshie,项目名称:Classes,代码行数:11,
示例8: mainint main(){ srand(time(NULL)); int T = MAXT; test_case(true); --T; while (T--) test_case(); return 0;}
开发者ID:M4573R,项目名称:pc-code,代码行数:11,
示例9: mainint main(){ srand(time(NULL)); T = MAXT; printf("%d/n", T); for (int i = 0; i < NCRIT; ++i) test_case(true); while (T) test_case(); return 0;}
开发者ID:M4573R,项目名称:pc-code,代码行数:12,
示例10: mainint main( int argc , char ** argv) { const char * existing_case = argv[1]; const char * missing_header = argv[2]; const char * missing_data = argv[3]; test_assert_false( ecl_sum_case_exists( "/does/not/exist" )); test_case( existing_case , true); test_case_no_path( existing_case , true); test_case( missing_header , false); test_case_no_path( missing_header , false); test_case( missing_data , false); test_case_no_path( missing_data , false);}
开发者ID:OPM,项目名称:ResInsight,代码行数:15,
示例11: mainintmain (void){ float32_t v1 = 3.14159265359; float32_t v2 = 1.383894; float32_t v3 = -2.71828; float32_t v4 = -3.4891931; test_case (v1, v2, v1 * v2); test_case (0.0, __builtin_huge_valf (), 2.0); test_case (0.0, -__builtin_huge_valf (), -2.0); test_case (-0.0, __builtin_huge_valf (), -2.0); test_case (-0.0, -__builtin_huge_valf (), 2.0); return 0;}
开发者ID:0day-ci,项目名称:gcc,代码行数:16,
示例12: test_isprintint test_isprint(void){ if (test_case(' ')) { SUCCESS_LOG return (1); }
开发者ID:vmonteco,项目名称:libft_test,代码行数:7,
示例13: mainint main(){ srand(time(NULL)); int T = MAXT; printf("%d/n", T); puts("1"); puts("0"); --T; puts("100"); puts("0"); --T; puts("2"); puts("0"); --T; puts("2"); puts("1 1"); --T; puts("2"); puts("1 2"); --T; puts("10"); puts("9 1 2 3 4 5 7 8 9 10"); --T; puts("100"); puts("4 1 10 11 50"); --T; while (T--) test_case(); return 0;}
开发者ID:lbv,项目名称:ffa-pc,代码行数:32,
示例14: checkpointbool checkpoint(void){ bool ok = true; // different types of sparsity option_enum pack_sparsity = CppAD::atomic_base<double>::pack_sparsity_enum; option_enum bool_sparsity = CppAD::atomic_base<double>::bool_sparsity_enum; option_enum set_sparsity = CppAD::atomic_base<double>::set_sparsity_enum; // test some different cases ok &= test_case(pack_sparsity, pack_sparsity); ok &= test_case(pack_sparsity, bool_sparsity); ok &= test_case(bool_sparsity, set_sparsity); ok &= test_case(set_sparsity, set_sparsity); return ok;}
开发者ID:fduffy,项目名称:CppAD,代码行数:16,
示例15: mainintmain(void){ SXE_HTTPD httpd; unsigned id; plan_tests(43); putenv((char *)(intptr_t)"SXE_LOG_LEVEL_LIBSXE_LIB_SXE=6"); putenv((char *)(intptr_t)"SXE_LOG_LEVEL_LIBSXE_LIB_SXE_LIST=5"); putenv((char *)(intptr_t)"SXE_LOG_LEVEL_LIBSXE_LIB_SXE_POOL=5"); putenv((char *)(intptr_t)"SXE_LOG_LEVEL_LIBSXE_LIB_SXE_HTTP=5"); putenv((char *)(intptr_t)"SXE_LOG_LEVEL_LIBSXE_LIB_SXE_HTTPD=6"); /* comment this line to debug this test */ test_sxe_register_and_init(1000); sxe_httpd_construct(&httpd, 2, 10, 512, 0); SXE_HTTPD_SET_HANDLER(&httpd, connect, h_connect); SXE_HTTPD_SET_HANDLER(&httpd, header, h_header); SXE_HTTPD_SET_HANDLER(&httpd, respond, h_respond); SXE_HTTPD_SET_HANDLER(&httpd, close, h_close); ok((listener = test_httpd_listen(&httpd, "0.0.0.0", 0)) != NULL, "HTTPD listening"); for (id = 0; id < TEST_CASES; id++) { test_case(cases[id].tapname, cases[id].request, cases[id].header_count); } sxe_close(listener); return exit_status();}
开发者ID:LucasSiba,项目名称:bits-and-pieces,代码行数:30,
示例16: suite_runint suite_run(SuiteT *suite) { pid_t pid; int test_idx = 0; int failure_count = 0; test_case_fp test_case; signal(SIGABRT, signal_callback_handler); while ( (test_case = suite->tests[test_idx++]) != NULL) { failure = NO; test_case(); if (failure == YES) { failure_count++; printf("F"); } else { printf("."); } } printf("/n"); return failure_count;}
开发者ID:pjherring,项目名称:task,代码行数:25,
示例17: test_bzeroint test_bzero(void){ if (test_case("11111", 0)) { SUCCESS_LOG return (1); }
开发者ID:vmonteco,项目名称:libft_test,代码行数:7,
示例18: mainint main(){ srand(time(NULL)); int T = MAXT; printf("%d/n", T); for (int r = 1; r <= 10; ++r) for (int h = 1; h <= 10; ++h) { printf("%d %d/n", r, h); --T; } printf("%d %d/n", MAXR, MAXH); --T; puts("1 500"); --T; puts("500 1"); --T; puts("10 10"); --T; puts("10 10"); --T; puts("13 27"); --T; puts("10 10"); --T; puts("13 27"); --T; while (T--) test_case(); return 0;}
开发者ID:lbv,项目名称:ffa-pc,代码行数:26,
示例19: test_isalnumint test_isalnum(void){ if (test_case(' ')) { SUCCESS_LOG return (1); }
开发者ID:vmonteco,项目名称:libft_test,代码行数:7,
示例20: TESTTEST(F16CIVBTest, test_half_to_float){ const char *expected_sha1[3] = { "68442b2c5704fd2792d92b15fa2e259a51c601dc" }; test_case(zimg::PixelType::HALF, zimg::PixelType::FLOAT, expected_sha1, INFINITY);}
开发者ID:theomission,项目名称:zimg,代码行数:8,
示例21: TESTTEST(F16CSSE2Test, test_float_to_half){ const char *expected_sha1[3] = { "4184caae2bd2a3f54722cba1d561cc8720b117ce" }; // The SSE2 approximation does not implement correct rounding. test_case(zimg::PixelType::FLOAT, zimg::PixelType::HALF, expected_sha1, 90.0);}
开发者ID:theomission,项目名称:zimg,代码行数:9,
示例22: mainint main() { fs::directory_iterator end_iter; for (fs::directory_iterator dir_itr("tests/cases"); dir_itr != end_iter; ++dir_itr) { std::string path = dir_itr->path().string(); std::cout << "Case: " << path << std::endl; test_case(path); }}
开发者ID:ALSchwalm,项目名称:SyntaxAwareSearch,代码行数:9,
示例23: TESTTEST(DepthConvertTest, test_full_luma){ const char *expected_sha1[][3] = { { "f0e4a68158eab0ab350c7161498a8eed3196c233" }, { "20c77820ff7d4443a0de7991218e2f8eee551e8d" }, { "07b6aebbfe48004c8acb12a3c76137db57ba9a0b" }, { "7ad2bc4ba1be92699ec22f489ae93a8b0dc89821" }, { "8907defd10af0b7c71abfb9c20147adc1b0a1f70" }, { "68442b2c5704fd2792d92b15fa2e259a51c601dc" }, { "8907defd10af0b7c71abfb9c20147adc1b0a1f70" }, { "483b6bdf608afbf1fba6bbca9657a8ca3822eef1" }, }; test_case(true, false, false, expected_sha1); test_case(true, false, true, expected_sha1);}
开发者ID:sekrit-twc,项目名称:zimg,代码行数:19,
示例24: mainint main() { int tests = 0; scanf("%d", &tests); for (int test_id = 1; test_id <= tests; test_id++) test_case(test_id); return 0;}
开发者ID:paulherman,项目名称:Competitive-Programming,代码行数:10,
示例25: mainint main(){ srand(time(NULL)); T = MAXT; while (T) test_case(); return 0;}
开发者ID:M4573R,项目名称:pc-code,代码行数:10,
示例26: mainint main(){ srand(time(NULL)); int T = MAXT; printf("%d/n", T); while (T--) test_case(); return 0;}
开发者ID:cacophonix,项目名称:pc-code,代码行数:11,
示例27: TESTTEST(ResizeImplSSETest, test_resize_v_f32){ const unsigned w = 640; const unsigned src_h = 480; const unsigned dst_h = 720; const zimg::PixelType type = zimg::PixelType::FLOAT; const char *expected_sha1[][3] = { { "6b7507617dc89d5d3077f9cc4c832b261dea2be0" }, { "d07a8c6f3452ada7bd865a3283dc308176541db3" }, { "bda98bc253213d2e28a54c6ccb7496f0ca5a3b7d" }, { "6ba3876cd08a5b11ee646954b52b379a3d8b1228" } }; const double expected_snr = 120.0; test_case(zimg::resize::BilinearFilter{}, false, w, src_h, w, dst_h, type, expected_sha1[0], expected_snr); test_case(zimg::resize::Spline16Filter{}, false, w, src_h, w, dst_h, type, expected_sha1[1], expected_snr); test_case(zimg::resize::LanczosFilter{ 4 }, false, w, src_h, w, dst_h, type, expected_sha1[2], expected_snr); test_case(zimg::resize::LanczosFilter{ 4 }, false, w, dst_h, w, src_h, type, expected_sha1[3], expected_snr);}
开发者ID:theomission,项目名称:zimg,代码行数:20,
注:本文中的test_case函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ test_cflag函数代码示例 C++ test_bit函数代码示例 |