• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TestInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中TestInfo的典型用法代码示例。如果您正苦于以下问题:C++ TestInfo类的具体用法?C++ TestInfo怎么用?C++ TestInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TestInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnTestEnd

// Called after the test ends.
// Print a summary only if the test failed.
void TersePrinter::OnTestEnd(const TestInfo& test_info)
{
	if (test_info.result()->Passed())
	{
		if (!useTerseOutput)
		{
			// print the message header
			test_header_printed_ = true;
			PrintTestHeader(COLOR_GREEN);
			// print the message trailer
			ColoredPrintf(COLOR_GREEN, "[       OK ] ");
			printf("%s.%s", test_case_name_.c_str(), test_info_name_.c_str());
			// print the test time
			if (GTEST_FLAG(print_time))
				printf(" (%s ms)\n", internal::StreamableToString(
				           test_info.result()->elapsed_time()).c_str());
			else
				printf("\n");
		}
	}
	else
	{
		ColoredPrintf(COLOR_RED, "%s", "[  FAILED  ] ");
		printf("%s.%s\n", test_case_name_.c_str(), test_info_name_.c_str());
	}
	fflush(stdout);
}
开发者ID:a-w,项目名称:astyle,代码行数:29,代码来源:TersePrinter.cpp


示例2: OnTestEnd

	void OnTestEnd(const TestInfo& test_info)
	{
		std::pair<gcString, bool> res = std::make_pair(m_szLastTest, test_info.result()->Passed());
		std::pair<gcString, uint64> end = std::make_pair(m_szLastTest, (uint64)test_info.result()->elapsed_time());

		onTestResultEvent(res);
		onTestEndEnd(end);
	}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:8,代码来源:gcUnitTestPage.cpp


示例3: prepare

void prepare(TestInfo info)
{
    //Loading::initRW();
    ADDeviceEmulator::runLater(1.5f, [info]() {
        info.finish();
    });
}
开发者ID:seagullua,项目名称:MathIsFun2,代码行数:7,代码来源:main.cpp


示例4: OnTestEnd

void SDKUnitTestListener::OnTestEnd(const TestInfo& test_info) {
	if (test_info.result()->Passed()) {
		PushResult( "[       OK ] " );
	} else {
		PushResult( "[  FAILED  ] " );
	}

	PrintTestName(test_info.test_case_name(), test_info.name() );

	if (GTEST_FLAG(print_time)) {
		PushResult( UTIL_VarArgs(" (%s ms)\n", internal::StreamableToString(
			test_info.result()->elapsed_time()).c_str()) );
	} else {
		PushResult( "\n" );
	}
}
开发者ID:Entropy-Soldier,项目名称:ges-legacy-code,代码行数:16,代码来源:sdk_listener.cpp


示例5: playGame

void playGame(TestInfo info,
              const char* table)
{
    TableCells table_cells;
    int x=0;
    int y=0;
    int max_ell = Cell::N -1;
    for(int i=0; i<Cell::N*Cell::N; ++i)
    {
        x = i%4;
        y =  max_ell - i/4;
        if(table[i] != '-')
        {
            Letter curr_letter(table[i]);
            table_cells.setLetter(x,y,curr_letter);
        }
    }
    int64_t score = 25000;

    SessionManager::getInstance()->beginTheGame();
    SessionManager::getInstance()->tableChanged(table_cells);
    SessionManager::getInstance()->scoreChanged(score);

    CCDirector::sharedDirector()->replaceScene(PlayScene::scene(GameMode::Continue));

    ADDeviceEmulator::runLater(1.5f, [info](){
            ADDeviceEmulator::createScreenShoot(info);
            info.finish();
        });
}
开发者ID:4Enjoy,项目名称:Letters-2048,代码行数:30,代码来源:main.cpp


示例6: openLevelScene

void openLevelScene(TestInfo info, CollectionID id, int difficulty)
{
    CCDirector::sharedDirector()->replaceScene(LevelScene::scene(id,difficulty));
    ADDeviceEmulator::runLater(2.5f, [info](){

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:seagullua,项目名称:Kids-Words,代码行数:9,代码来源:main.cpp


示例7: openAllCollectionsScene

void openAllCollectionsScene(TestInfo info)
{
    CCDirector::sharedDirector()->replaceScene(SelectCollection::scene());
    ADDeviceEmulator::runLater(2.5f, [info](){

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:seagullua,项目名称:Kids-Words,代码行数:9,代码来源:main.cpp


示例8: continueGame

void continueGame(TestInfo info)
{
    CCDirector::sharedDirector()->replaceScene(PlayScene::scene(GameMode::Continue));
    ADDeviceEmulator::runLater(1.5f, [info](){

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:4Enjoy,项目名称:Letters-2048,代码行数:9,代码来源:main.cpp


示例9: openMainScene

void openMainScene(TestInfo info)
{
    CCDirector::sharedDirector()->replaceScene(MainMenu::scene());
    ADDeviceEmulator::runLater(2.5f, [info]() {

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:seagullua,项目名称:MathIsFun2,代码行数:9,代码来源:main.cpp


示例10: purchaseBuy

void purchaseBuy(TestInfo info)
{
    CCDirector::sharedDirector()->replaceScene(SettingsScene::scene(true));
    ADDeviceEmulator::runLater(2.5f, [info](){

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:4Enjoy,项目名称:Letters-2048,代码行数:9,代码来源:main.cpp


示例11: openSettings

void openSettings(TestInfo info)
{
    CCDirector::sharedDirector()->replaceScene(SettingsScene::scene());
    ADDeviceEmulator::runLater(1.5f, [info](){

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:4Enjoy,项目名称:Letters-2048,代码行数:9,代码来源:main.cpp


示例12: openOneCollectionScene

void openOneCollectionScene(TestInfo info,
                            int collection_number)
{
    Collection* collection = RW::getCollectionByIndex(collection_number);

    CCDirector::sharedDirector()->replaceScene(SelectLevel::scene(collection));
    ADDeviceEmulator::runLater(2.5f, [info]() {

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:seagullua,项目名称:MathIsFun2,代码行数:12,代码来源:main.cpp


示例13: OnTestEnd

void TestSuite::OnTestEnd(const TestInfo& test_info) {
    const TestResult *testResult = test_info.result();

    if (testResult->Passed()) {
        this->currentTestInfo->status = true;
        this->currentTestInfo->summary = "Test passed";
    }

    this->currentTestInfo->timeInMillis = testResult->elapsed_time();

    this->testsResults->addResult(this->currentTestInfo);

    delete this->currentTestInfo;
}
开发者ID:antoinedube,项目名称:automatic-test-runner,代码行数:14,代码来源:TestSuite.cpp


示例14: openAllCollectionScene

void openAllCollectionScene(TestInfo info,
                            bool first_collections)
{
    // 'scene' is an autorelease object
    CCScene *scene = CCScene::create();

    // 'layer' is an autorelease object
    SelectCollection *layer = SelectCollection::create();

    BackgroundHolder::backgroundSwitchTo(scene,0,false);
    scene->addChild(layer);
    CCDirector::sharedDirector()->replaceScene(scene);

    //move scroll zone
    if(!first_collections)
        layer->moveCollectionScrollZone();

    ADDeviceEmulator::runLater(4.5f, [info]() {

        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:seagullua,项目名称:MathIsFun2,代码行数:23,代码来源:main.cpp


示例15: openOneLevelScene

void openOneLevelScene(TestInfo info,
                       int collection_number,
                       int level_number,
                       int free_space_id)
{
    Collection* collection = RW::getCollectionByIndex(collection_number);

    //get level
    std::vector<Level*> levels = collection->getLevels();
    Level* level;
    for(unsigned int i=0; i<levels.size() ; ++i)
    {
        if(levels[i]->getLevelID() == level_number)
        {
            level = levels[i];
            break;
        }
    }

    // 'scene' is an autorelease object
    CCScene *scene = CCScene::create();

    // 'layer' is an autorelease object
    LevelScene *layer = LevelScene::create(level);

    BackgroundHolder::backgroundSwitchTo(scene,0,false);
    scene->addChild(layer);
    CCDirector::sharedDirector()->replaceScene(scene);
    layer->clickEquationSpace(free_space_id);

    ADDeviceEmulator::runLater(3.5f, [info]() {


        ADDeviceEmulator::createScreenShoot(info);
        info.finish();
    });
}
开发者ID:seagullua,项目名称:MathIsFun2,代码行数:37,代码来源:main.cpp


示例16: OnTestEnd

// Called after a test ends
void AlternatePrinter::OnTestEnd(const TestInfo& test_info) {
	fprintf(stdout, "*** TEST %s.%s ending.\n", test_info.test_case_name(), test_info.name());
	fflush(stdout);
}
开发者ID:janekang,项目名称:snippets,代码行数:5,代码来源:GoogleTestWithAlternativeOutput.cpp


示例17: OnTestStart

void SDKUnitTestListener::OnTestStart(const TestInfo& test_info) {
	PushResult( "[ RUN      ] " );
	PrintTestName(test_info.test_case_name(), test_info.name());
	PushResult( "\n" );
}
开发者ID:Entropy-Soldier,项目名称:ges-legacy-code,代码行数:5,代码来源:sdk_listener.cpp


示例18: OnTestStart

// Called before the test starts.
// Save information for the failure message.
// The test start information is actually printed by
// OnTestPartResult() and prints the failures only.
void TersePrinter::OnTestStart(const TestInfo& test_info)
{
	test_header_printed_ = false;
	test_case_name_ = test_info.test_case_name();
	test_info_name_ = test_info.name();
}
开发者ID:a-w,项目名称:astyle,代码行数:10,代码来源:TersePrinter.cpp


示例19: UnitTestInfo

void TestSuite::OnTestStart(const TestInfo& test_info) {
    this->currentTestInfo = new UnitTestInfo();
    this->currentTestInfo->test_case_name = test_info.test_case_name();
    this->currentTestInfo->test_name = test_info.name();
}
开发者ID:antoinedube,项目名称:automatic-test-runner,代码行数:5,代码来源:TestSuite.cpp


示例20: OnTestStart

	void OnTestStart(const TestInfo& test_info)
	{
		m_szLastTest = gcString("{0}/{1}", test_info.test_case_name(), test_info.name());
		onTestStartEvent(m_szLastTest);
	}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:5,代码来源:gcUnitTestPage.cpp



注:本文中的TestInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TestInterface类代码示例发布时间:2022-05-31
下一篇:
C++ TestFiberManager类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap