當前位置: 首頁>>代碼示例>>C++>>正文


C++ CuSuiteNew函數代碼示例

本文整理匯總了C++中CuSuiteNew函數的典型用法代碼示例。如果您正苦於以下問題:C++ CuSuiteNew函數的具體用法?C++ CuSuiteNew怎麽用?C++ CuSuiteNew使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CuSuiteNew函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: main

int main(void) {
    char *output = NULL;
    CuSuite* suite = CuSuiteNew();

    abs_top_srcdir = getenv("abs_top_srcdir");
    if (abs_top_srcdir == NULL)
        die("env var abs_top_srcdir must be set");

    abs_top_builddir = getenv("abs_top_builddir");
    if (abs_top_builddir == NULL)
        die("env var abs_top_builddir must be set");

    if (asprintf(&src_root, "%s/tests/root", abs_top_srcdir) < 0) {
        die("failed to set src_root");
    }

    CuSuiteSetup(suite, setup, teardown);

    SUITE_ADD_TEST(suite, testSaveNewFile);
    SUITE_ADD_TEST(suite, testNonExistentLens);
    SUITE_ADD_TEST(suite, testMultipleXfm);
    SUITE_ADD_TEST(suite, testMtime);
    SUITE_ADD_TEST(suite, testRelPath);

    CuSuiteRun(suite);
    CuSuiteSummary(suite, &output);
    CuSuiteDetails(suite, &output);
    printf("%s\n", output);
    free(output);
    return suite->failCount;
}
開發者ID:Azendale,項目名稱:augeas,代碼行數:31,代碼來源:test-save.c

示例2: main

int
main (void)
{
    CuString *output = CuStringNew ();
    CuSuite* suite = CuSuiteNew ();
    int ret;

    _p11_mutex_init (&race_mutex);
    mock_module_init ();
    _p11_library_init ();

#ifdef OS_UNIX
    SUITE_ADD_TEST (suite, test_fork_initialization);
#endif

    SUITE_ADD_TEST (suite, test_recursive_initialization);
    SUITE_ADD_TEST (suite, test_threaded_initialization);

    CuSuiteRun (suite);
    CuSuiteSummary (suite, output);
    CuSuiteDetails (suite, output);
    printf ("%s\n", output->buffer);
    ret = suite->failCount;
    CuSuiteDelete (suite);
    CuStringDelete (output);

    return ret;
}
開發者ID:pexip,項目名稱:os-p11-kit,代碼行數:28,代碼來源:test-init.c

示例3: CuSuiteNew

CuSuite *get_give_suite(void)
{
    CuSuite *suite = CuSuiteNew();
    SUITE_ADD_TEST(suite, test_give);
    SUITE_ADD_TEST(suite, test_give_cmd);
    SUITE_ADD_TEST(suite, test_give_cmd_limit);
    SUITE_ADD_TEST(suite, test_give_men);
    SUITE_ADD_TEST(suite, test_give_men_magicians);
    SUITE_ADD_TEST(suite, test_give_men_limit);
    SUITE_ADD_TEST(suite, test_give_men_in_ocean);
    SUITE_ADD_TEST(suite, test_give_men_none);
    SUITE_ADD_TEST(suite, test_give_men_too_many);
    SUITE_ADD_TEST(suite, test_give_men_other_faction);
    SUITE_ADD_TEST(suite, test_give_men_requires_contact);
    SUITE_ADD_TEST(suite, test_give_men_not_to_self);
    SUITE_ADD_TEST(suite, test_give_unit);
    SUITE_ADD_TEST(suite, test_give_unit_humans);
    SUITE_ADD_TEST(suite, test_give_unit_other_race);
    SUITE_ADD_TEST(suite, test_give_unit_limits);
    SUITE_ADD_TEST(suite, test_give_unit_to_ocean);
    SUITE_ADD_TEST(suite, test_give_unit_to_peasants);
    SUITE_ADD_TEST(suite, test_give_peasants);
    SUITE_ADD_TEST(suite, test_give_herbs);
    SUITE_ADD_TEST(suite, test_give_okay);
    SUITE_ADD_TEST(suite, test_give_denied_by_rules);
    SUITE_ADD_TEST(suite, test_give_invalid_target);
    SUITE_ADD_TEST(suite, test_give_new_unit);
    SUITE_ADD_TEST(suite, test_give_dead_unit);
    return suite;
}
開發者ID:ennorehling,項目名稱:eressea,代碼行數:30,代碼來源:give.test.c

示例4: CuGetBmpSuite

CuSuite* CuGetBmpSuite(void)
{
	CuSuite* suite = CuSuiteNew();
	SUITE_ADD_TEST(suite, test_bmpCreate);
	SUITE_ADD_TEST(suite, test_bmpReadSize);
    return suite;
}
開發者ID:MoriEdan,項目名稱:POSApp,代碼行數:7,代碼來源:bmptest.c

示例5: GetSuite

CuSuite *
GetSuite()
{
	CuSuite *suite = CuSuiteNew();
	SUITE_ADD_TEST( suite, test_uri_remove_dot_segments_1);
	SUITE_ADD_TEST( suite, test_uri_remove_dot_segments_2);
	SUITE_ADD_TEST( suite, test_uri_remove_dot_segments_3);
	SUITE_ADD_TEST( suite, test_uri_parse1);
	SUITE_ADD_TEST( suite, test_uri_parse2);
	SUITE_ADD_TEST( suite, test_uri_parse3);
	SUITE_ADD_TEST( suite, test_uri_merge_paths1);
	SUITE_ADD_TEST( suite, test_uri_merge_paths2);
	SUITE_ADD_TEST( suite, test_uri_comp_recomp_1);
	SUITE_ADD_TEST( suite, test_uri_trans_ref1);
	SUITE_ADD_TEST( suite, test_uri_trans_ref2);
	SUITE_ADD_TEST( suite, test_uri_trans_ref3);
	SUITE_ADD_TEST( suite, test_uri_trans_ref4);
	SUITE_ADD_TEST( suite, test_uri_trans_ref5);
	SUITE_ADD_TEST( suite, test_uri_trans_ref6);
	SUITE_ADD_TEST( suite, test_uri_trans_ref7);
	SUITE_ADD_TEST( suite, test_uri_trans_ref8);
	SUITE_ADD_TEST( suite, test_uri_trans_ref9);
	SUITE_ADD_TEST( suite, test_uri_trans_ref10);
	SUITE_ADD_TEST( suite, test_uri_parse_auth1);
	SUITE_ADD_TEST( suite, test_uri_parse_auth2);
	SUITE_ADD_TEST( suite, test_uri_parse_auth3);
	SUITE_ADD_TEST( suite, test_uri_parse_auth4);
    return suite;
}
開發者ID:azzmosphere,項目名稱:azzmos-0.1.2,代碼行數:29,代碼來源:test_uriparse.c

示例6: cactusCapTestSuite

CuSuite* cactusCapTestSuite(void) {
    CuSuite* suite = CuSuiteNew();
    SUITE_ADD_TEST(suite, testCap_getName);
    SUITE_ADD_TEST(suite, testCap_getOrientation);
    SUITE_ADD_TEST(suite, testCap_getReverse);
    SUITE_ADD_TEST(suite, testCap_getEvent);
    SUITE_ADD_TEST(suite, testCap_getEnd);
    SUITE_ADD_TEST(suite, testCap_getSegment);
    SUITE_ADD_TEST(suite, testCap_getOtherSegmentCap);
    SUITE_ADD_TEST(suite, testCap_segmentCoordinates);
    SUITE_ADD_TEST(suite, testCap_segmentCoordinatesReverseStrand);
    SUITE_ADD_TEST(suite, testCap_getCoordinate);
    SUITE_ADD_TEST(suite, testCap_setCoordinate);
    SUITE_ADD_TEST(suite, testCap_getStrand);
    SUITE_ADD_TEST(suite, testCap_getSide);
    SUITE_ADD_TEST(suite, testCap_getSequence);
    SUITE_ADD_TEST(suite, testCap_adjacent);
    SUITE_ADD_TEST(suite, testCap_getTopCap);
    SUITE_ADD_TEST(suite, testCap_getTopFace);
    SUITE_ADD_TEST(suite, testCap_getBottomAndTopFaceEnd);
    SUITE_ADD_TEST(suite, testCap_getParent);
    SUITE_ADD_TEST(suite, testCap_getChildNumber);
    SUITE_ADD_TEST(suite, testCap_getChild);
    SUITE_ADD_TEST(suite, testCap_isInternal);
    SUITE_ADD_TEST(suite, testCap_serialisation);
    SUITE_ADD_TEST(suite, testCap_construct);
    return suite;
}
開發者ID:benedictpaten,項目名稱:cactus,代碼行數:28,代碼來源:cactusCapTest.c

示例7: CuSuiteNew

CuSuite *testfile(void)
{
    CuSuite *suite = CuSuiteNew("File I/O");

    SUITE_ADD_TEST(suite, test_open_noreadwrite);
    SUITE_ADD_TEST(suite, test_open_excl);
    SUITE_ADD_TEST(suite, test_open_read);
    SUITE_ADD_TEST(suite, test_open_readwrite);
    SUITE_ADD_TEST(suite, test_read); 
    SUITE_ADD_TEST(suite, test_seek);
    SUITE_ADD_TEST(suite, test_filename);
    SUITE_ADD_TEST(suite, test_fileclose);
    SUITE_ADD_TEST(suite, test_file_remove);
    SUITE_ADD_TEST(suite, test_open_write);
    SUITE_ADD_TEST(suite, test_open_writecreate);
    SUITE_ADD_TEST(suite, test_write);
    SUITE_ADD_TEST(suite, test_userdata_set);
    SUITE_ADD_TEST(suite, test_userdata_get);
    SUITE_ADD_TEST(suite, test_userdata_getnokey);
    SUITE_ADD_TEST(suite, test_getc);
    SUITE_ADD_TEST(suite, test_ungetc);
    SUITE_ADD_TEST(suite, test_gets);
    SUITE_ADD_TEST(suite, test_bigread);
    SUITE_ADD_TEST(suite, test_writev_buffered);
    SUITE_ADD_TEST(suite, test_writev_buffered_seek);
    SUITE_ADD_TEST(suite, test_mod_neg);
    SUITE_ADD_TEST(suite, test_truncate);
    SUITE_ADD_TEST(suite, test_fail_write_flush);
    SUITE_ADD_TEST(suite, test_fail_read_flush);
    SUITE_ADD_TEST(suite, test_xthread);

    return suite;
}
開發者ID:kheradmand,項目名稱:Break,代碼行數:33,代碼來源:testfile.c

示例8: RunAllTests

void RunAllTests(void)
{
    LOGD("RunAllTests() Entered!\n");
	CuString *output = CuStringNew();//Êä³ö½á¹¹Ìå
	CuSuite* suite = CuSuiteNew();//²âÊÔ×é¾ä±ú
	CuSuite* suite_test = NULL;//²âÊÔ×é¾ä±ú

	//Ôö¼ÓµÄ²âÊÔ×é
	printf("Step1\n");
	suite_test = CuGetSuite();
	CuSuiteRobSuite(suite, suite_test);
	CuSuiteDelete(suite_test);
	printf("Step2\n");
	suite_test = CuStringGetSuite();
	CuSuiteRobSuite(suite, suite_test);
	CuSuiteDelete(suite_test);
	printf("Step3\n");
	CuSuiteRun(suite);
	printf("Step4\n");
	CuSuiteSummary(suite, output);
	printf("Step5\n");
	CuSuiteDetails(suite, output);
	printf("%s\n", output->buffer);
	
	CuSuiteDelete(suite);
	CuStringDelete(output);
}
開發者ID:searKing,項目名稱:CuTest,代碼行數:27,代碼來源:AllTests.c

示例9: CuSuiteNew

CuSuite *get_pool_suite(void)
{
  CuSuite *suite = CuSuiteNew();
/*  SUITE_ADD_TEST(suite, test_pool); */
  SUITE_ADD_TEST(suite, test_change_resource);
  return suite;
}
開發者ID:UweKopf,項目名稱:server,代碼行數:7,代碼來源:pool_test.c

示例10: main

int main() {
    CuSuite *suites[] = {
        strtrim_get_cusuite(),
        strrpl_get_cusuite(),
        iv_parse_config_get_cusuite(),
        iv_parse_index_get_cusuite(),
        iv_parse_series_get_cusuite(),
        iv_parse_auth_get_cusuite(),
        iv_parse_categories_get_cusuite(),
    };
    CuString *output = CuStringNew();
    CuSuite *suite = CuSuiteNew();
    unsigned int i;
    for(i=0; i<SUITE_COUNT(suites); i++) {
        if(suites[i]) { CuSuiteAddSuite(suite, suites[i]); }
        /* Hack for CuTest odditiy - CuSuiteAddSuite() implementation copies
         * tests attached to suites[i] into suite and doesn't internally free
         * suites[i]. Documentation doesn't mention anything about this. */
        free(suites[i]);
    }
    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
    CuSuiteDelete(suite);
    CuStringDelete(output);
    return 0;
}
開發者ID:amboar,項目名稱:iviewiir,代碼行數:28,代碼來源:test-executor.c

示例11: RunAllTests

void RunAllTests(void)
{
    CuString *output = CuStringNew();
    CuSuite* suite = CuSuiteNew();


    SUITE_ADD_TEST(suite, TestInitLL);
    SUITE_ADD_TEST(suite, TestLengthLL);
    SUITE_ADD_TEST(suite, TestInsertLLIncreasesLength);
    SUITE_ADD_TEST(suite, TestInsertLLInserts);
    SUITE_ADD_TEST(suite, TestCountLL);
    SUITE_ADD_TEST(suite, TestIndexLL);
    SUITE_ADD_TEST(suite, TestRemoveLL);
    SUITE_ADD_TEST(suite, TestExtendLL);
    SUITE_ADD_TEST(suite, TestLookup);
    SUITE_ADD_TEST(suite, TestLookup2);
    SUITE_ADD_TEST(suite, TestLookup3);

    CuSuiteRun(suite);
    CuSuiteSummary(suite, output);
    CuSuiteDetails(suite, output);
    printf("%s\n", output->buffer);
    CuStringDelete(output);
    CuSuiteDelete(suite);
}
開發者ID:Ceasar,項目名稱:masochism,代碼行數:25,代碼來源:AllTests.c

示例12: CuSuiteNew

CuSuite *test_client()
{
    CuSuite* suite = CuSuiteNew();   

    SUITE_ADD_TEST(suite, test_client_setup);

    // write test
    SUITE_ADD_TEST(suite, test_write_file_succeeded);
    SUITE_ADD_TEST(suite, test_append_file_succeeded);
    SUITE_ADD_TEST(suite, test_write_file_failed_with_wrong_flag);
    SUITE_ADD_TEST(suite, test_write_file_with_normal_cover_appendable);
    SUITE_ADD_TEST(suite, test_append_file_failed_with_appendable_cover_normal);
    SUITE_ADD_TEST(suite, test_write_file_failed_with_invalid_key);
    
    // read test
    SUITE_ADD_TEST(suite, test_read_file_succeeded);
    SUITE_ADD_TEST(suite, test_read_part_file_succeeded);
    SUITE_ADD_TEST(suite, test_read_file_failed_with_wrong_flag);
    SUITE_ADD_TEST(suite, test_read_file_failed_with_eof);
    SUITE_ADD_TEST(suite, test_read_file_failed_with_key_is_not_exist);
    SUITE_ADD_TEST(suite, test_read_file_failed_with_invalid_key);

    //seek / tell / stat test
    SUITE_ADD_TEST(suite, test_seek_file_failed_with_invalid_pos);

    // open test
    SUITE_ADD_TEST(suite, test_open_file_failed_with_wrong_flag);

    SUITE_ADD_TEST(suite, test_client_teardown); 
    
    return suite;
}
開發者ID:HansonLu,項目名稱:aliyun-media-c-sdk,代碼行數:32,代碼來源:test_client.c

示例13: SequenceAnnotationGetSuite

CuSuite* SequenceAnnotationGetSuite() {
	CuSuite* sequenceAnnotationTests = CuSuiteNew();
	SUITE_ADD_TEST(sequenceAnnotationTests, PrintSequenceAnnotationTestInfo);
	SUITE_ADD_TEST(sequenceAnnotationTests, TestCreateSequenceAnnotation);
	SUITE_ADD_TEST(sequenceAnnotationTests, TestPrecedes);
	return sequenceAnnotationTests;
}
開發者ID:CytoComp,項目名稱:libSBOLc,代碼行數:7,代碼來源:test_sequenceannotation.c

示例14: CuSuiteNew

CuSuite *get_building_suite(void)
{
    CuSuite *suite = CuSuiteNew();
    SUITE_ADD_TEST(suite, test_buildingtype);
    SUITE_ADD_TEST(suite, test_largestbuilding);
    SUITE_ADD_TEST(suite, test_buildingcapacity);
    SUITE_ADD_TEST(suite, test_cmp_castle_size);
    SUITE_ADD_TEST(suite, test_cmp_taxes);
    SUITE_ADD_TEST(suite, test_cmp_wage);
    SUITE_ADD_TEST(suite, test_cmp_current_owner);
    SUITE_ADD_TEST(suite, test_register_building);
    SUITE_ADD_TEST(suite, test_btype_defaults);
    SUITE_ADD_TEST(suite, test_building_set_owner);
    SUITE_ADD_TEST(suite, test_building_effsize);
    SUITE_ADD_TEST(suite, test_buildingowner_resets_when_empty);
    SUITE_ADD_TEST(suite, test_buildingowner_goes_to_next_when_empty);
    SUITE_ADD_TEST(suite, test_buildingowner_goes_to_other_when_empty);
    SUITE_ADD_TEST(suite, test_buildingowner_goes_to_same_faction_when_empty);
    SUITE_ADD_TEST(suite, test_buildingowner_goes_to_next_after_leave);
    SUITE_ADD_TEST(suite, test_buildingowner_goes_to_other_after_leave);
    SUITE_ADD_TEST(suite, test_buildingowner_goes_to_same_faction_after_leave);
    SUITE_ADD_TEST(suite, test_buildingowner_goes_to_empty_unit_after_leave);
    SUITE_ADD_TEST(suite, test_building_type);
    SUITE_ADD_TEST(suite, test_active_building);
    SUITE_ADD_TEST(suite, test_buildingtype_exists);
    SUITE_ADD_TEST(suite, test_safe_building);
    return suite;
}
開發者ID:ennorehling,項目名稱:eressea,代碼行數:28,代碼來源:building.test.c

示例15: main

int main(int argc, char* argv[]) {
    CuSuite* suite = CuSuiteNew();

    if (argc < 2 || !strcmp(argv[1], "testCall0ReturnByte")) SUITE_ADD_TEST(suite, testCall0ReturnByte);
    if (argc < 2 || !strcmp(argv[1], "testCall0ReturnInt")) SUITE_ADD_TEST(suite, testCall0ReturnInt);
    if (argc < 2 || !strcmp(argv[1], "testCall0ReturnPtr")) SUITE_ADD_TEST(suite, testCall0ReturnPtr);
    if (argc < 2 || !strcmp(argv[1], "testCall0ReturnLong")) SUITE_ADD_TEST(suite, testCall0ReturnLong);
    if (argc < 2 || !strcmp(argv[1], "testCall0ReturnFloat")) SUITE_ADD_TEST(suite, testCall0ReturnFloat);
    if (argc < 2 || !strcmp(argv[1], "testCall0ReturnDouble")) SUITE_ADD_TEST(suite, testCall0ReturnDouble);
    if (argc < 2 || !strcmp(argv[1], "testCall0OneArgOfEach")) SUITE_ADD_TEST(suite, testCall0OneArgOfEach);
    if (argc < 2 || !strcmp(argv[1], "testCall0ManyArgsOfEach")) SUITE_ADD_TEST(suite, testCall0ManyArgsOfEach);
    if (argc < 2 || !strcmp(argv[1], "testCall0Unwind")) SUITE_ADD_TEST(suite, testCall0Unwind);
    if (argc < 2 || !strcmp(argv[1], "testCall0StackAlignment1")) SUITE_ADD_TEST(suite, testCall0StackAlignment1);
    if (argc < 2 || !strcmp(argv[1], "testCall0StackAlignment2")) SUITE_ADD_TEST(suite, testCall0StackAlignment2);

    CuSuiteRun(suite);

    if (argc < 2) {
        CuString *output = CuStringNew();
        CuSuiteSummary(suite, output);
        CuSuiteDetails(suite, output);
        printf("%s\n", output->buffer);
    }

    return suite->failCount;
}
開發者ID:AlexeyBychkov,項目名稱:robovm,代碼行數:26,代碼來源:test_call0.c


注:本文中的CuSuiteNew函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。