这篇教程C++ CU_add_test函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CU_add_test函数的典型用法代码示例。如果您正苦于以下问题:C++ CU_add_test函数的具体用法?C++ CU_add_test怎么用?C++ CU_add_test使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CU_add_test函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mainint main ( void ){ CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if ( CUE_SUCCESS != CU_initialize_registry() ) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite( "libcomponent_test_suite", init_suite, clean_suite ); if ( NULL == pSuite ) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "libcomponent_tests", libcomponent_tests)) || (NULL == CU_add_test(pSuite, "power_of_ten_tests", power_of_ten_tests)) || (NULL == CU_add_test(pSuite, "find_nearest_E12_tests", find_nearest_E12_tests))) { CU_cleanup_registry(); return CU_get_error(); } // Run all tests using the basic interface CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); printf("/n"); CU_basic_show_failures(CU_get_failure_list()); printf("/n/n"); /* Clean up registry and return */ CU_cleanup_registry(); return CU_get_error();}
开发者ID:oskarhallbom,项目名称:lab6,代码行数:35,
示例2: main/* The main() function for setting up and running the tests. * Returns a CUE_SUCCESS on successful running, another * CUnit error code on failure. */int main() { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) { return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("Suite_1", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "", test_empty_cyclic_buffer)) || (NULL == CU_add_test(pSuite, "", test_one_element_cyclic_buffer)) || (NULL == CU_add_test(pSuite, "", test_cyclic)) || (NULL == CU_add_test(pSuite, "", test_empty_get)) || (NULL == CU_add_test(pSuite, "", test_full_put)) ) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:bk1,项目名称:linuxos-examples,代码行数:36,
示例3: setup_thumbnail_testsint setup_thumbnail_tests() { CU_pSuite pSuite = NULL; // Note: Uncomment this to generate the thumbnails, they should be examined by eye to make sure they are good // before using them in tests. // generate_thumbnails(); /* add a suite to the registry */ pSuite = CU_add_suite("Thumbnails", NULL, NULL); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the background scanning suite */ if ( NULL == CU_add_test(pSuite, "Test thumbnail API", test_image_reading) || NULL == CU_add_test(pSuite, "Test thumbnail creation", test_thumbnailing) ) { CU_cleanup_registry(); return CU_get_error(); } return 0;} /* setupbackground_tests() */
开发者ID:andygrundman,项目名称:libmediascan,代码行数:30,
示例4: mainint main(void){ CU_pSuite pSuite = NULL; if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); pSuite = CU_add_suite("toml suite", init_toml, fini_toml); if (NULL == pSuite) goto out; if ((NULL == CU_add_test(pSuite, "test fruit", testFruit))) goto out; if ((NULL == CU_add_test(pSuite, "test types", testTypes))) goto out; if ((NULL == CU_add_test(pSuite, "test hex", testHex))) goto out; if ((NULL == CU_add_test(pSuite, "test good examples", testGoodExamples))) goto out; if ((NULL == CU_add_test(pSuite, "test bad examples", testBadExamples))) goto out; CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests();out: CU_cleanup_registry(); exit(CU_get_error());}
开发者ID:medcat,项目名称:libtoml,代码行数:33,
示例5: mainint main() { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("Suite_1", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ /* NOTE - ORDER IS IMPORTANT - MUST TEST fread() AFTER fprintf() */ if ( (NULL == CU_add_test(pSuite, "test of init args", test_init_args)) || (NULL == CU_add_test(pSuite, "test of term args", test_term_args)) ) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_list_tests_to_file(); CU_automated_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:debosvi,项目名称:bozVideo,代码行数:30,
示例6: array_test_suitevoid array_test_suite(CU_pSuite suite) { // Add tests if(CU_add_test(suite, "Test for array create", test_array_create) == NULL) { return; } if(CU_add_test(suite, "Test for array set", test_array_set) == NULL) { return; } if(CU_add_test(suite, "Test for array get", test_array_get) == NULL) { return; } if(CU_add_test(suite, "Test for array free", test_array_free) == NULL) { return; }}
开发者ID:acasaccia,项目名称:openomf,代码行数:7,
示例7: mainint main(){ CU_pSuite ps = NULL; if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); if(NULL == (ps = CU_add_suite("suite_1", init_suite1, clean_suite1))) { CU_cleanup_registry(); return CU_get_error(); } if ( (NULL == CU_add_test(ps, "test_set_lrumc_data_buff()", test_set_lrumc_data_buff)) || (NULL == CU_add_test(ps, "test_set_lrumc_data_int()", test_set_lrumc_data_int)) || (NULL == CU_add_test(ps, "test_set_lrumc_data_double()", test_set_lrumc_data_double)) || (NULL == CU_add_test(ps, "test_set_lrumc_data_object()", test_set_lrumc_data_object)) || (NULL == CU_add_test(ps, "test_set_lrumc_data_bool()", test_set_lrumc_data_bool)) || (NULL == CU_add_test(ps, "test_add_lrumc_data_buff()", test_add_lrumc_data_buff)) || (NULL == CU_add_test(ps, "test_add_lrumc_data_int()", test_add_lrumc_data_int)) || (NULL == CU_add_test(ps, "test_add_lrumc_data_double()", test_add_lrumc_data_double)) || (NULL == CU_add_test(ps, "test_add_lrumc_data_object()", test_add_lrumc_data_object)) || (NULL == CU_add_test(ps, "test_add_lrumc_data_bool()", test_add_lrumc_data_bool)) ) { CU_cleanup_registry(); return CU_get_error(); } CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:KevinQi1981,项目名称:irid,代码行数:35,
示例8: mainint main(){ CU_pSuite pSuite = NULL; /* Initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* Add a suite to the registry */ pSuite = CU_add_suite("newcunittest", init_suite, clean_suite); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* Add the tests to the suite */ if (0 || (NULL == CU_add_test(pSuite, "testScpi_glue_input", testScpi_glue_input)) || (NULL == CU_add_test(pSuite, "test_output_matches", test_output_matches)) || (NULL == CU_add_test(pSuite, "test_output_load", test_output_load)) || (NULL == CU_add_test(pSuite, "test_bjarni3", test_bjarni3)) || (NULL == CU_add_test(pSuite, "test_applyq", test_applyq)) || 0) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:vjine,项目名称:discotmc,代码行数:33,
示例9: ags_functional_machine_add_and_destroy_test_add_testvoidags_functional_machine_add_and_destroy_test_add_test(){ /* add the tests to the suite */ if((CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsPanel", ags_functional_machine_add_and_destroy_test_panel) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsMixer", ags_functional_machine_add_and_destroy_test_mixer) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsSpectrometer", ags_functional_machine_add_and_destroy_test_spectrometer) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsEqualizer10", ags_functional_machine_add_and_destroy_test_equalizer10) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsDrum", ags_functional_machine_add_and_destroy_test_drum) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsMatrix", ags_functional_machine_add_and_destroy_test_matrix) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsSynth", ags_functional_machine_add_and_destroy_test_synth) == NULL) || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsSyncsynth", ags_functional_machine_add_and_destroy_test_syncsynth) == NULL)#ifdef AGS_WITH_LIBINSTPATCH || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy AgsFFPlayer", ags_functional_machine_add_and_destroy_test_ffplayer) == NULL)#endif || (CU_add_test(pSuite, "functional test of GSequencer machine add and destroy Audiorec", ags_functional_machine_add_and_destroy_test_audiorec) == NULL) ){ CU_cleanup_registry(); exit(CU_get_error()); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); ags_test_quit(); CU_cleanup_registry(); exit(CU_get_error());}
开发者ID:gsequencer,项目名称:gsequencer,代码行数:34,
示例10: mainint main (int argc, char** argv) { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("Suite_1", setup, teardown); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if (NULL == CU_add_test(pSuite, "List Creation Test", test_linkedList_create) || NULL == CU_add_test(pSuite, "List Add Test", test_linkedList_add) || NULL == CU_add_test(pSuite, "List Remove Test", test_linkedList_remove)) { CU_cleanup_registry(); return CU_get_error(); } CU_set_output_filename(argv[1]); CU_list_tests_to_file(); CU_automated_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:jawi,项目名称:celix,代码行数:29,
示例11: main/* The main() function for setting up and running the tests. * Returns a CUE_SUCCESS on successful running, another * CUnit error code on failure. */int main(){ CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("Suite_1", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ /* NOTE - ORDER IS IMPORTANT - MUST TEST fread() AFTER fprintf() */ if ((NULL == CU_add_test(pSuite, "test of fprintf()", testFPRINTF)) || (NULL == CU_add_test(pSuite, "test of fread()", testFREAD))) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:gobbigustavo,项目名称:PaiDePiper,代码行数:34,
示例12: mainint main() { CU_pSuite pSuite = NULL; /* On initialise la suite de tests */ if(CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* On ajoute la suite au registre */ pSuite = CU_add_suite("Suite de tests pour calloc2", init_suite1, clean_suite1); if(NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* On ajoute les tests à la suite. L'ordre est important ! * test_strlen1 sera exécuté en premier, puis test_strlen2, etc ...*/ if(NULL == CU_add_test(pSuite, "test_calloc2_1", test_calloc2_1) || NULL == CU_add_test(pSuite, "test_calloc2_2", test_calloc2_2) || NULL == CU_add_test(pSuite, "test_calloc2_3", test_calloc2_3) ) { CU_cleanup_registry(); return CU_get_error(); } /* On exécute les tests et on vide ensuite la mémoire utilisée par CUnit */ CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:CharlyBVo,项目名称:SINF1252,代码行数:29,
示例13: register_protocol_suiteint register_protocol_suite() { /* Add protocol test suite */ CU_pSuite suite = CU_add_suite("protocol", protocol_suite_init, protocol_suite_cleanup); if (suite == NULL) { CU_cleanup_registry(); return CU_get_error(); } /* Add tests */ if ( CU_add_test(suite, "base64-decode", test_base64_decode) == NULL || CU_add_test(suite, "instruction-parse", test_instruction_parse) == NULL || CU_add_test(suite, "instruction-read", test_instruction_read) == NULL || CU_add_test(suite, "instruction-write", test_instruction_write) == NULL || CU_add_test(suite, "nest-write", test_nest_write) == NULL ) { CU_cleanup_registry(); return CU_get_error(); } return 0;}
开发者ID:avldya,项目名称:guacamole-server,代码行数:25,
示例14: main/* *Function main. *This function builds the suite of tests. *After execution it shows a tabe that records all the tests and *that shows where there is an error. */int main() { CU_pSuite pSuite = NULL; if(CUE_SUCCESS != CU_initialize_registry()) { return CU_get_error(); } pSuite = CU_add_suite("Suite de tests pour sender.c et receiver.c", init_suite,clean_suite); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } if( (NULL == CU_add_test(pSuite,"real address",real_add_test))||(NULL == CU_add_test(pSuite,"test create socket",test_create_socket))) { CU_cleanup_registry(); return CU_get_error(); } CU_basic_run_tests(); CU_basic_show_failures(CU_get_failure_list()); CU_cleanup_registry(); return CU_get_error();}
开发者ID:cmomin,项目名称:LINGI1341-Projet1,代码行数:31,
示例15: mainint main(){ CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("Message Buffer Tests", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "Create Message Buffer", test_create_buffer)) || (NULL == CU_add_test(pSuite, "Test run", test_buffer_run)) ) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:BlakeJarvis,项目名称:csound,代码行数:30,
示例16: main/* The main() function for setting up and running the tests. * Returns a CUE_SUCCESS on successful running, another * CUnit error code on failure. */int main() { CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("test_files", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "testSaveMatrix", testSaveMatrix)) || (NULL == CU_add_test(pSuite, "testSaveMatrixDifferent", testSaveMatrix2)) || (NULL == CU_add_test(pSuite, "testSaveMatrixRectangle", testSaveMatrixRectangle))) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:balhar-jakub,项目名称:LLS,代码行数:32,
示例17: mainint main(int argc, char **argv) { opts_init(); CU_pSuite maildir_suite = NULL; CU_pSuite regexp_suite = NULL; CU_pSuite fsm_suite = NULL; if (CU_initialize_registry() != CUE_SUCCESS) goto exit; if (!(maildir_suite = CU_add_suite("Test maildir.", init_maildir_suite, clean_maildir_suite))) goto clean; for (int i = 0; i < sizeof(maildir_tests) / sizeof(struct test); ++i) { if (!CU_add_test(maildir_suite, maildir_tests[i].name, maildir_tests[i].func)) goto clean; } if (!(regexp_suite = CU_add_suite("Test regexp.", init_regexp_suite, clean_regexp_suite))) goto clean; for (int i = 0; i < sizeof(regexp_tests) / sizeof(struct test); ++i) { if (!CU_add_test(regexp_suite, regexp_tests[i].name, regexp_tests[i].func)) goto clean; } if (!(fsm_suite = CU_add_suite("Test FSM.", init_fsm_suite, clean_fsm_suite))) goto clean; for (int i = 0; i < sizeof(fsm_tests) / sizeof(struct test); ++i) { if (!CU_add_test(fsm_suite, fsm_tests[i].name, fsm_tests[i].func)) goto clean; } CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests();clean: CU_cleanup_registry();exit: opts_final(); return CU_get_error();}
开发者ID:kesot,项目名称:smtp-client-course-project,代码行数:33,
示例18: expander_add_testsint expander_add_tests(CU_pSuite suite){ if (NULL == CU_add_test(suite, "expander_indexes", test_expander_indexes)) { CU_cleanup_registry(); return CU_get_error(); } if (NULL == CU_add_test(suite, "expander_attr_mapping", test_expander_attr_mapping)) { CU_cleanup_registry(); return CU_get_error(); } if (NULL == CU_add_test(suite, "expander_role_mapping", test_expander_role_mapping)) { CU_cleanup_registry(); return CU_get_error(); } if (NULL == CU_add_test(suite, "expander_user_mapping", test_expander_user_mapping)) { CU_cleanup_registry(); return CU_get_error(); } if (NULL == CU_add_test(suite, "expander_alias", test_expander_alias)) { CU_cleanup_registry(); return CU_get_error(); } return 0;}
开发者ID:Chainfire,项目名称:selinux,代码行数:26,
示例19: mainint main(){ CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("asf suite", NULL, NULL); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "vector", test_vector)) || (NULL == CU_add_test(pSuite, "strUtil", test_strUtil)) || (NULL == CU_add_test(pSuite, "solve1d", test_solve1d)) || (NULL == CU_add_test(pSuite, "complex", test_complex))) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); int nfail = CU_get_number_of_failures(); CU_cleanup_registry(); return nfail>0;}
开发者ID:asfadmin,项目名称:ASF_MapReady,代码行数:32,
示例20: mainintmain(int argc, char **argv){ CU_pSuite suite = NULL; unsigned int num_failures; if (CU_initialize_registry() != CUE_SUCCESS) { return CU_get_error(); } suite = CU_add_suite("bit_array", NULL, NULL); if (suite == NULL) { CU_cleanup_registry(); return CU_get_error(); } if ( CU_add_test(suite, "test_1bit", test_1bit) == NULL || CU_add_test(suite, "test_64bit", test_64bit) == NULL || CU_add_test(suite, "test_find", test_find) == NULL || CU_add_test(suite, "test_resize", test_resize) == NULL || CU_add_test(suite, "test_errors", test_errors) == NULL) { CU_cleanup_registry(); return CU_get_error(); } CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); num_failures = CU_get_number_of_failures(); CU_cleanup_registry(); return num_failures;}
开发者ID:spdk,项目名称:spdk,代码行数:35,
示例21: mainintmain(int argc, char **argv){ CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if(CUE_SUCCESS != CU_initialize_registry()){ return CU_get_error(); } /* add a suite to the registry */ pSuite = CU_add_suite("AgsRecallIDTest", ags_recall_id_test_init_suite, ags_recall_id_test_clean_suite); if(pSuite == NULL){ CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if((CU_add_test(pSuite, "test of AgsRecallID find reycling context", ags_recall_id_test_find_recycling_context) == NULL) || (CU_add_test(pSuite, "test of AgsRecallID find parent reycling context", ags_recall_id_test_find_parent_recycling_context) == NULL)){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return(CU_get_error());}
开发者ID:gsequencer,项目名称:gsequencer,代码行数:35,
示例22: mainint main() { CU_pSuite pSuite = NULL; /* Initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* Add a suite to the registry */ pSuite = CU_add_suite("dwistring_test", init_suite, clean_suite); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* Add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "test_concat_null", test_concat_null)) || (NULL == CU_add_test(pSuite, "test_concat_both_null", test_concat_both_null))|| (NULL == CU_add_test(pSuite, "test_concat_both_null", test_concat_both_null))|| (NULL == CU_add_test(pSuite, "test_concatall_three_values", test_concatall_three_values))|| (NULL == CU_add_test(pSuite, "test_contains_char_positive", test_contains_char_positive))|| (NULL == CU_add_test(pSuite, "test_contains_char_null", test_contains_char_null))|| (NULL == CU_add_test(pSuite, "test_contains_char_empty", test_contains_char_empty))|| (NULL == CU_add_test(pSuite, "test_null_string_normal", test_null_string_normal))|| (NULL == CU_add_test(pSuite, "test_null_string_nullpointer", test_null_string_nullpointer))|| (NULL == CU_add_test(pSuite, "test_concatall_first_null", test_concatall_first_null))) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:DanielWieczorek,项目名称:dwilib,代码行数:35,
示例23: mainint main(int argc, char **argv){ CU_pSuite suite = NULL; unsigned int num_failures; if (CU_initialize_registry() != CUE_SUCCESS) { return CU_get_error(); } suite = CU_add_suite("nvmf", NULL, NULL); if (suite == NULL) { CU_cleanup_registry(); return CU_get_error(); } if ( CU_add_test(suite, "create_subsystem", nvmf_test_create_subsystem) == NULL || CU_add_test(suite, "find_subsystem", nvmf_test_find_subsystem) == NULL || CU_add_test(suite, "discovery_log", test_discovery_log) == NULL) { CU_cleanup_registry(); return CU_get_error(); } CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); num_failures = CU_get_number_of_failures(); CU_cleanup_registry(); return num_failures;}
开发者ID:spdk,项目名称:spdk,代码行数:29,
示例24: main/* The main() function for setting up and running the tests. * Returns a CUE_SUCCESS on successful running, another * CUnit error code on failure. */int main(){ CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("Suite_1", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ /* NOTE - ORDER IS IMPORTANT - MUST TEST fread() AFTER fprintf() */ if ((NULL == CU_add_test(pSuite, "test of find_base_pairs()", testFIND_BASE_PAIRS)) || (NULL == CU_add_test(pSuite, "test of cotransfold()", testCOTRANSFOLD)) || (NULL == CU_add_test(pSuite, "test of classify_base_pairs()", testCLASSIFY_BASE_PAIRS)) || (NULL == CU_add_test(pSuite, "test of boltzmann()", testBOLTZMANN))) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:kn,项目名称:rna_features,代码行数:36,
示例25: us900_add_suite/* The main() function for setting up and running the tests. * Returns a CUE_SUCCESS on successful running, another * CUnit error code on failure. */int us900_add_suite (void){#ifdef HAVE_CUNIT CU_pSuite pSuite = NULL; /* add a suite to the registry */ pSuite = CU_add_suite("us900_srv_csrattrs", us900_init_suite, us900_destroy_suite); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "CSR Server Attributes API1", us900_test1)) || (NULL == CU_add_test(pSuite, "CSR Server Attributes API2", us900_test2))) { CU_cleanup_registry(); return CU_get_error(); } return CUE_SUCCESS;#endif}
开发者ID:DDvO,项目名称:libest,代码行数:29,
示例26: mainint main(){ CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("Suite 1", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* add the tests to the suite */ if ( (NULL == CU_add_test(pSuite, "test chord_reset" , test_chord_reset)) || (NULL == CU_add_test(pSuite, "test chord_touch_start" , test_chord_touch_start)) || (NULL == CU_add_test(pSuite, "test chord_touch_end" , test_chord_touch_end)) || (NULL == CU_add_test(pSuite, "test chord_state_is_empty", test_chord_state_is_empty))|| (NULL == CU_add_test(pSuite, "test chord_state_bitmap" , test_chord_state_bitmap)) ){ CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:juhakivekas,项目名称:asetniop-for-linux,代码行数:33,
示例27: mainintmain (){ CU_pSuite pSuite1 = NULL; /* initialize registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add suites to registry */ pSuite1 = CU_add_suite("Test merge", setup_suite1, teardown_suite1); if (pSuite1 == NULL) { CU_cleanup_registry(); return CU_get_error(); } /* add tests to suite */ if ( (NULL == CU_add_test(pSuite1, "test merge", test_merge_suite1)) || (NULL == CU_add_test(pSuite1, "test mergesort", test_merge_sort_suite1)) ) { CU_cleanup_registry(); return CU_get_error(); } /* run tests */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:Risto-Stevcev,项目名称:c-mergesort,代码行数:32,
示例28: mainint main() { CU_pSuite pSuite = NULL; /* Initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* Add a suite to the registry */ pSuite = CU_add_suite("logTest", init_suite, clean_suite); if (NULL == pSuite) { CU_cleanup_registry(); return CU_get_error(); } /* Add the tests to the suite */ if ((NULL == CU_add_test(pSuite, "test2", test2)) || (NULL == CU_add_test(pSuite, "test1", test1))) { CU_cleanup_registry(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:jzendle,项目名称:INIT-101-UTIL,代码行数:27,
示例29: mainint main(int argc, char *argv[]){ CU_pSuite suite = NULL; if (CU_initialize_registry() != CUE_SUCCESS) return CU_get_error(); suite = CU_add_suite("Suite_1", init_suite1, clean_suite1); if (!suite) { CU_cleanup_registry(); return CU_get_error(); } if (!CU_add_test(suite, "test1", testF) || !CU_add_test(suite, "test2", testQ)) { CU_cleanup_registry(); return CU_get_error(); } CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); return CU_get_error();}
开发者ID:jianzi123,项目名称:my_libucmq,代码行数:25,
示例30: main/* The main() function for setting up and running the tests. * Returns a CUE_SUCCESS on successful running, another * CUnit error code on failure. * */int main() { ks3_global_init(); int ret = load_ak_sk(); if (ret != 0) { printf("[ERROR] load ak, sk failed/n"); return ret; } ret = CreateBucket(host, bucket); if (ret != 0) { printf("[ERROR] create bucket failed/n"); return ret; } CU_pSuite pSuite = NULL; /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) return CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("Suite_1", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); ks3_global_destroy(); return CU_get_error(); } /* add the tests to the suite */ if (NULL == CU_add_test(pSuite, "test upload part para null/n", TEST_UPLOAD_PART_ALL_NULL) || NULL == CU_add_test(pSuite, "test upload part para return code null/n", TEST_UPLOAD_PART_RETURNCODE_NULL) || NULL == CU_add_test(pSuite, "test upload part para host/n", TEST_UPLOAD_PART_HOST) || NULL == CU_add_test(pSuite, "test upload part para bucket/n", TEST_UPLOAD_PART_BUCKET) || NULL == CU_add_test(pSuite, "test upload part para object/n", TEST_UPLOAD_PART_OBJECT) || NULL == CU_add_test(pSuite, "test upload part para key/n", TEST_UPLOAD_PART_KEY) || NULL == CU_add_test(pSuite, "test upload part para uploadid partnum/n", TEST_UPLOAD_PART_UPLOAD_PARTNUM) || NULL == CU_add_test(pSuite, "test upload part para query/n", TEST_UPLOAD_PART_QUERYPARA) || NULL == CU_add_test(pSuite, "test upload part para header/n", TEST_UPLOAD_PART_HEADERPARA) || NULL == CU_add_test(pSuite, "clean bucket/n", clean)) { CU_cleanup_registry(); ks3_global_destroy(); return CU_get_error(); } /* Run all tests using the CUnit Basic interface */ CU_basic_set_mode(CU_BRM_VERBOSE); CU_basic_run_tests(); CU_cleanup_registry(); ret = DeleteBucket(host, bucket); if (ret != 0) { printf("[ERROR] delete bucket failed/n"); } ks3_global_destroy(); return CU_get_error();}
开发者ID:ks3sdk,项目名称:ks3-c-sdk,代码行数:63,
注:本文中的CU_add_test函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CU_basic_run_tests函数代码示例 C++ CU_add_suite函数代码示例 |