当前位置: 首页>>代码示例>>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;未经允许,请勿转载。