当前位置: 首页>>代码示例>>C++>>正文


C++ RunTests函数代码示例

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


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

示例1: switch

void 
PictureTestWindow::RunTests(int32 testIndex, color_space *colorSpaces, int32 n)
{
	for (int32 csIndex = 0; csIndex < n; csIndex ++) {
		color_space colorSpace = colorSpaces[csIndex];
		const char *csText;
		switch (colorSpace) {
			case B_RGBA32:
				csText = "B_RGB32";
				break;
			case B_RGB32:
				csText = "B_RGB32";
				break;
			case B_RGB24:
				csText = "B_RGB24";
				break;
			case B_RGB16:
				csText = "B_RGB16";
				break;
			case B_RGB15:
				csText = "B_RGB15";
				break;
			default:
				csText = "Unknown";
		}
		
		BString text;
		text = "Color space: ";
		text += csText;
		fListView->AddItem(new BStringItem(text.String()));
		
		RunTests(testIndex, colorSpace);
	}
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:34,代码来源:PictureTestWindow.cpp

示例2: RunIsBetweenTestSuite

	void RunIsBetweenTestSuite()
	{
		auto IsBetweenTestSuite = max::Testing::TestSuite{ "max::Algorithms::IsBetween test suite" };
		
		IsBetweenTestSuite.AddTest( max::Testing::Test{ "inside range", []( max::Testing::Test & CurrentTest ) {
			CurrentTest.MAX_TESTING_ASSERT( max::Algorithms::IsBetween( 10, { 1, 100 } ) );
		}
		} );

		IsBetweenTestSuite.AddTest( max::Testing::Test{ "before range", []( max::Testing::Test & CurrentTest ) {
			CurrentTest.MAX_TESTING_ASSERT( ! max::Algorithms::IsBetween( 0, { 1, 100 } ) );
		}
		} );

		IsBetweenTestSuite.AddTest( max::Testing::Test{ "after range", []( max::Testing::Test & CurrentTest ) {
			CurrentTest.MAX_TESTING_ASSERT( ! max::Algorithms::IsBetween( 200, { 1, 100 } ) );
		}
		} );

		IsBetweenTestSuite.AddTest( max::Testing::Test{ "minimum and maximum switched", []( max::Testing::Test & CurrentTest ) {
			CurrentTest.MAX_TESTING_ASSERT( ! max::Algorithms::IsBetween( 10, { 100, 1 } ) );
		}
		} );

		IsBetweenTestSuite.RunTests();
	}
开发者ID:ProgramMax,项目名称:maxSocket,代码行数:26,代码来源:IsBetweenTest.cpp

示例3: UIShader_Prepare

void DeveloperScreen::render() {
	UIShader_Prepare();
	UIBegin();
	DrawBackground(1.0f);

	ui_draw2d.DrawText(UBUNTU48, "Developer Tools", dp_xres / 2, 20, 0xFFFFFFFF, ALIGN_HCENTER);

	if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres-10), LARGE_BUTTON_WIDTH, "Back", ALIGN_RIGHT | ALIGN_BOTTOM)) {
		screenManager()->finishDialog(this, DR_OK);
	}

	if (UIButton(GEN_ID, Pos(dp_xres / 2, 100), LARGE_BUTTON_WIDTH, "Run CPU tests", ALIGN_CENTER | ALIGN_TOP)) {
		// TODO: Run tests
		RunTests();
		// screenManager()->push(new EmuScreen())
	}


	if (UIButton(GEN_ID, Pos(10, dp_yres-10), LARGE_BUTTON_WIDTH, "Dump frame to log", ALIGN_BOTTOMLEFT)) {
		gpu->DumpNextFrame();
	}

	UIEnd();

	glsl_bind(UIShader_Get());
	ui_draw2d.Flush(UIShader_Get());
}
开发者ID:biskra,项目名称:ppsspp,代码行数:27,代码来源:MenuScreens.cpp

示例4: main

int main(int argc, char * argv[])
{
    CommandlineOptionsParse(argc, argv);
    ParametersSetup();

    if (options.tests){
  		RunTests();
        exit(EXIT_SUCCESS);
    }

  	// If option -p is used, set parameters set accordingly,
	// otherwise, use default set
  	SetParametersSet(options.parameterization);
    
    // If the temperature was chosen using
    // commandline options, use it
    // (-1.0 is a place holder value)
    if (options.temp != -1.0)
        parameters.finite_temperature.temperature = options.temp;
    
    if (parameters.finite_temperature.temperature == 0){
        SolveZeroTemperatureEOS();
    }
    else if (parameters.finite_temperature.temperature > 0){
        SolveFiniteTemperatureEOS();
    }
    else{
        printf("Values of temperature must be non-negative.\n");
        printf("(%f was provided).\n",
			   parameters.finite_temperature.temperature);
        exit(EXIT_FAILURE);
    }

    return 0;
}
开发者ID:cgraeff,项目名称:quarks_EOS,代码行数:35,代码来源:main.c

示例5: TestMain

int TestMain () {
#if !__TBB_TEST_SKIP_AFFINITY
    Harness::LimitNumberOfThreads( DesiredNumThreads );
#endif
#if !__TBB_TASK_PRIORITY
    REMARK( "Priorities disabled: Running as just yet another task scheduler test\n" );
#else
    test_propagation::TestSetPriority(); // TODO: move down when bug 1996 is fixed
#endif /* __TBB_TASK_PRIORITY */

    RunTests();
    tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1);
    PeriodicActivitiesBody::mode = 1;
    TestSwitchBetweenMastersRepeats = 1;
    return RunTests();
}
开发者ID:dakaufma,项目名称:tbb,代码行数:16,代码来源:test_task_priority.cpp

示例6: RunTests

void
PictureTestWindow::RunTests1()
{
	color_space colorSpaces[] = {
		B_RGBA32
	};
	RunTests(colorSpaces, 1);
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:8,代码来源:PictureTestWindow.cpp

示例7: main

int
main(int argc, char* argv[])
{
    nsresult rv;
    nsIServiceManager* servMgr;

    rv = NS_InitXPCOM2(&servMgr, NULL, NULL);
    if (NS_FAILED(rv)) return rv;

    if (argc > 1 && nsCRT::strcmp(argv[1], "-trace") == 0)
        gTrace = PR_TRUE;

#ifdef DEBUG
    TestSegmentedBuffer();
#endif

#if 0   // obsolete old implementation
    rv = NS_NewPipe(&in, &out, 4096 * 4);
    if (NS_FAILED(rv)) {
        printf("NewPipe failed\n");
        return -1;
    }

    rv = TestPipe(in, out);
    NS_RELEASE(in);
    NS_RELEASE(out);
    if (NS_FAILED(rv)) {
        printf("TestPipe failed\n");
        return -1;
    }
#endif
#if 0
    TestSearch("foo", 8);
    TestSearch("bar", 6);
    TestSearch("baz", 2);
#endif

    rv = TestChainedPipes();
    NS_ASSERTION(NS_SUCCEEDED(rv), "TestChainedPipes failed");
    RunTests(16, 1);
    RunTests(4096, 16);
    NS_RELEASE(servMgr);
    rv = NS_ShutdownXPCOM( NULL );
    NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");
    return 0;
}
开发者ID:fortunto2,项目名称:celtx,代码行数:46,代码来源:TestPipes.cpp

示例8: main

int main(int argc, char **argv)
{
  Testy_LogInit("tch.log");

  RunTests(argv[0]);

  Testy_LogShutdown();
  return 0;
}
开发者ID:AshishNamdev,项目名称:mozilla-central,代码行数:9,代码来源:Testy.cpp

示例9: RunTests

void UnitTest::Run() {
    tests.clear();
    RunTests();
    
    for(auto& test : tests) {
        bool succes = test.method();
        std::cout<<test.name << " -> "<<((succes) ? "SUCCES!" : "FAILED!")<<std::endl;
    }
}
开发者ID:JeppeNielsen,项目名称:EntitySystem,代码行数:9,代码来源:UnitTest.cpp

示例10: main

int
main(int argc, char **argv)
{
  if (NS_FAILED(NS_InitXPCOM2(nullptr, nullptr, nullptr)))
    return -1;
  RunTests();
  NS_ShutdownXPCOM(nullptr);
  return 0;
}
开发者ID:abhishekvp,项目名称:gecko-dev,代码行数:9,代码来源:TestThreadPool.cpp

示例11: RunTests

void cMiniBench::Run()
{
   for( int i = 1; i <= iterations; i++)
   {
      cout << "*****************************************************" << endl;
      cout << "Executing iteration " << i << " of " << iterations << "." << endl;
      RunTests();
      cout << "*****************************************************" << endl;
   }
}
开发者ID:van-smith,项目名称:miniBench,代码行数:10,代码来源:cMiniBench.cpp

示例12: UIShader_Prepare

void DeveloperScreen::render() {
	UIShader_Prepare();
	UIBegin(UIShader_Get());
	DrawBackground(1.0f);

	I18NCategory *g = GetI18NCategory("General");
	I18NCategory *d = GetI18NCategory("Developer");
	I18NCategory *s = GetI18NCategory("System");

	ui_draw2d.SetFontScale(1.5f, 1.5f);
	ui_draw2d.DrawText(UBUNTU24, d->T("Developer Tools"), dp_xres / 2, 10, 0xFFFFFFFF, ALIGN_HCENTER);
	ui_draw2d.SetFontScale(1.0f, 1.0f);

	int x = 50;
	int y = 40;
	const int stride = 40;
	const int w = 400;

	UICheckBox(GEN_ID, x, y += stride, s->T("Show Debug Statistics"), ALIGN_TOPLEFT, &g_Config.bShowDebugStats);

	bool reportingEnabled = Reporting::IsEnabled();
	const static std::string reportHostOfficial = "report.ppsspp.org";
	if (UICheckBox(GEN_ID, x, y += stride, s->T("Enable Compatibility Server Reports"), ALIGN_TOPLEFT, &reportingEnabled)) {
		g_Config.sReportHost = reportingEnabled ? reportHostOfficial : "";
	}

	VLinear vlinear(x, y + stride + 12, 16);

	if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres - 10), LARGE_BUTTON_WIDTH, 0, g->T("Back"), ALIGN_RIGHT | ALIGN_BOTTOM)) {
		screenManager()->finishDialog(this, DR_OK);
	}

	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Load language ini"), ALIGN_LEFT)) {
		i18nrepo.LoadIni(g_Config.languageIni);
		// After this, g and s are no longer valid. Need to reload them.
		g = GetI18NCategory("General");
		d = GetI18NCategory("Developer");
	}

	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Save language ini"), ALIGN_LEFT)) {
		i18nrepo.SaveIni(g_Config.languageIni);	
	}

	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Run CPU tests"), ALIGN_LEFT)) {
		// TODO: Run tests
		RunTests();
		// screenManager()->push(new EmuScreen())
	}

	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Dump frame to log"), ALIGN_LEFT)) {
		gpu->DumpNextFrame();
	}

	UIEnd();
}
开发者ID:jack00,项目名称:ppsspp,代码行数:55,代码来源:MenuScreens.cpp

示例13: LogRasterEngineInfo

int sseEngine::StartSimulation()
{
	m_pDisplay->InitializeWindow();

	LogRasterEngineInfo();

	RunTests();

	ManageSimulator();
	
	return 0;
}
开发者ID:onepremise,项目名称:Scale,代码行数:12,代码来源:sseEngine.cpp

示例14: E32Main

TInt E32Main()
	{
	__UHEAP_MARK;
    CTrapCleanup *cleanup=CTrapCleanup::New();
	test.Title();
    TRAPD(err,RunTests());
	test(!err);
	test.Close();
    delete(cleanup);
	__UHEAP_MARKEND;
    return(0);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:12,代码来源:T_RSREAD.CPP

示例15: main

int main(int _argc, char* _argv[])
{
	RunTests();

	SylDev::Framework::WindowCreationResult::Type result;
	SylDev::Framework::WindowClassDesc classDesc;
	SylDev::Framework::WindowDesc wndDesc;

	SylDev::Framework::Window<SylDev::App::WindowProcedure> window(result, classDesc, wndDesc, GetCommandLine());

	return 0;
}
开发者ID:kretzmoritz,项目名称:syl_dev,代码行数:12,代码来源:main.cpp


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