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);
	}
}
示例#2
0
	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();
	}
示例#3
0
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());
}
示例#4
0
文件: main.c 项目: cgraeff/quarks_EOS
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;
}
示例#5
0
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();
}
void
PictureTestWindow::RunTests1()
{
	color_space colorSpaces[] = {
		B_RGBA32
	};
	RunTests(colorSpaces, 1);
}
示例#7
0
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;
}
示例#8
0
int main( int argc, char** argv )
{
    InitTests(argc, argv);
    AddTest("Format() works correct.", FormatTest);
    AddTest("Log handler can handle log lines.", LogHandlerTest);
    AddTest("CopyString() is correct.", CopyStringTest);
    return RunTests();
}
示例#9
0
int main(int argc, char **argv)
{
  Testy_LogInit("tch.log");

  RunTests(argv[0]);

  Testy_LogShutdown();
  return 0;
}
示例#10
0
void UnitTest::Run() {
    tests.clear();
    RunTests();
    
    for(auto& test : tests) {
        bool succes = test.method();
        std::cout<<test.name << " -> "<<((succes) ? "SUCCES!" : "FAILED!")<<std::endl;
    }
}
示例#11
0
int
main(int argc, char **argv)
{
  if (NS_FAILED(NS_InitXPCOM2(nullptr, nullptr, nullptr)))
    return -1;
  RunTests();
  NS_ShutdownXPCOM(nullptr);
  return 0;
}
示例#12
0
void cMiniBench::Run()
{
   for( int i = 1; i <= iterations; i++)
   {
      cout << "*****************************************************" << endl;
      cout << "Executing iteration " << i << " of " << iterations << "." << endl;
      RunTests();
      cout << "*****************************************************" << endl;
   }
}
示例#13
0
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();
}
示例#14
0
int sseEngine::StartSimulation()
{
	m_pDisplay->InitializeWindow();

	LogRasterEngineInfo();

	RunTests();

	ManageSimulator();
	
	return 0;
}
示例#15
0
void
PictureTestWindow::MessageReceived(BMessage *msg) {
	switch (msg->what) {
		case kMsgRunTests:
			RunTests();
			break;
		case kMsgRunTests1:
			RunTests1();
			break;
	}
	Inherited::MessageReceived(msg);
}
示例#16
0
TInt E32Main()
	{
	__UHEAP_MARK;
    CTrapCleanup *cleanup=CTrapCleanup::New();
	test.Title();
    TRAPD(err,RunTests());
	test(!err);
	test.Close();
    delete(cleanup);
	__UHEAP_MARKEND;
    return(0);
	}
示例#17
0
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;
}
示例#18
0
int main( )
{
	SDL_Init( SDL_INIT_EVERYTHING );
	IMG_Init( IMG_INIT_PNG | IMG_INIT_JPG );

	RunTests( );

	IMG_Quit( );
	SDL_Quit( );

	return 0;
}
int
main(
            int     /* argc */,
            char*   /* argv */ [])
{
    XALAN_USING_STD(cout)

#if !defined(NDEBUG) && defined(_MSC_VER)
    _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);

   _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
   _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
#endif

    XMLPlatformUtils::Initialize();

    XalanTransformer::initialize();

    {
        MemoryManagerType& theMemoryManager = XalanMemMgrs::getDefaultXercesMemMgr();

        XMLSupportInit                  theXMLSupportInit;
        XPathInit                       theXPathInit( theMemoryManager );

        XPathEnvSupportDefault          theXPathEnvSupport( theMemoryManager );
        XalanSourceTreeDOMSupport       theDOMSupport;
        XObjectFactoryDefault           theXObjectFactory( theMemoryManager );
        XPathFactoryDefault             theXPathFactory( theMemoryManager );
        XPathProcessorImpl              theXPathProcessor( theMemoryManager );

        XPathExecutionContextDefault    theExecutionContext(theXPathEnvSupport,
                                                            theDOMSupport,
                                                            theXObjectFactory);

        XalanStdOutputStream            theStdOut(cout, theMemoryManager);
        XalanOutputStreamPrintWriter    thePrintWriter(theStdOut);
        XalanSourceTreeParserLiaison    theLiaison(theDOMSupport, theMemoryManager);

        RunTests(theXPathFactory,
                 theXPathProcessor,
                 theXPathEnvSupport,
                 theDOMSupport,
                 theLiaison,
                 thePrintWriter,
                 theExecutionContext);
    }
    XalanTransformer::terminate();

    XMLPlatformUtils::Terminate();

    return 0;
}
示例#20
0
void
PictureTestWindow::RunTests()
{
	color_space colorSpaces[] = {
		B_RGBA32,
		B_RGB32,
		B_RGB24,
		B_RGB16,
		B_RGB15
	};

	RunTests(colorSpaces, sizeof(colorSpaces) / sizeof(color_space));	
}
示例#21
0
int main(int argc, char **argv)
{
	TestData::InitTestData();

	int numTotalRuns = (argc >= 2) ? atoi(argv[1]) : 100;
	int numTrialsPerTimedBlock = (argc >= 3) ? atoi(argv[2]) : 100;
#ifdef EMSCRIPTEN
	numTotalRuns = numTrialsPerTimedBlock = 10;
#endif
	// A list of test prefixes to include in the run.
	std::vector<const char *>prefixesArray;
	for(int i = 3; i < argc; ++i)
	{
		if (argv[i][0] != '-' && argv[i][0] != '/')
			prefixesArray.push_back(argv[i]);
	}
	if (prefixesArray.empty())
		prefixesArray.push_back(""); // Empty prefix runs all tests.
	prefixesArray.push_back(0); // Sentinel to terminate prefix string list.
	const char * const *prefixes = &prefixesArray[0];

	if (numTotalRuns == 0 || numTrialsPerTimedBlock == 0)
	{
		LOGI("Usage: %s <numTotalRuns> <numTrialsPerTimedBlock>", argv[0]); 
		LOGI("   Runs all tests.");
		LOGI("       %s <numTotalRuns> <numTrialsPerTimedBlock> prefix1 prefix2 prefix3...", argv[0]); 
		LOGI("   Runs all tests starting with one of the given prefixes, or residing in one of the named code files.");
		return 0;
	}

	JSONReport jsonReport;
	std::string jsonFilename = "test_results.json";
	for(int i = 1; i+1 < argc; ++i)
		if (!strcmp(argv[i], "--json"))
			jsonFilename = argv[i+1]; // Allow overriding the output file name from command line.
	jsonReport.Create(jsonFilename.c_str());

	int numFailures = RunTests(numTotalRuns, numTrialsPerTimedBlock, prefixes, jsonReport);
	LOGI("%d", globalPokedData);

	// When --exit0 is passed, we forcibly return 0 and not the number of failed tests.
	// Used by buildbot in valgrind runs to ignore any failures - the failures are detected
	// in a "real" run instead that carry more randomized trial runs.
	for(int i = 1; i < argc; ++i)
		if (!strcmp(argv[i], "--exit0"))
			return 0;

	return numFailures; // exit code of 0 denotes a successful run.
}
示例#22
0
bool cUnitTesting::Start() {
    std::vector<std::string> Campaigns;

    // No Campaign Name
    if (!g_Fodder->mStartParams->mCampaignName.size())
        Campaigns = g_Fodder->mVersions->GetCampaignNames();
    else
        Campaigns.push_back(g_Fodder->mStartParams->mCampaignName);

    bool TotalResult = true;
    for (auto& CampaignName : Campaigns) {
        bool Result = true;

        if (CampaignName == "Random Map" || CampaignName == "Single Map")
            continue;

        *g_Fodder->mParams = *g_Fodder->mStartParams;
        g_Fodder->mStartParams->mCampaignName = CampaignName;

        g_Debugger->TestStart(CampaignName, "Campaign");

        g_Fodder->mGame_Data.mCampaign.Clear();
        if (!g_Fodder->Campaign_Load(CampaignName)) {
            g_Debugger->Error("Campaign " + CampaignName + " not found");
            g_Debugger->TestComplete(CampaignName, "Campaign", "not found", 0, eTest_Skipped);
            continue;
        }

        // FIXME: Create test folder
        if (!g_ResourceMan->FileExists(g_ResourceMan->GetTestPath(g_Fodder->mVersionCurrent, "")) && g_Fodder->mStartParams->mDemoRecord) {

            std::string Command = "mkdir \"" + g_ResourceMan->GetTestPath(g_Fodder->mVersionCurrent, "") + "\"";
            system(Command.c_str());
        }

        auto campaignStartTime = std::chrono::steady_clock::now();
        if (!RunTests(CampaignName))
            Result = false;
        auto campaignDuration = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - campaignStartTime);

        g_Debugger->TestComplete(CampaignName, "Campaign", "", (size_t)campaignDuration.count(), Result ? eTest_Passed : eTest_Failed);

        if (!Result)
            TotalResult = false;
    }

    return TotalResult;
}
int main(int ac, char **av) {
  int opt;

  while (EOF != (opt = getopt(ac, av, "v"))) {
    switch (opt) {
      case 'v':
        ++verbosity;
        break;
      default:
        fprintf(stderr, "Usage: sel_ldr -- imc_shm_mmap_test.nexe [-v]\n");
        return 1;
    }
  }

  return RunTests(TestMain);
}
示例#24
0
文件: main.cpp 项目: elishemer/Boxes
int main()
{
	// run unit test
	if (! RunTests())
	{
		return 1;
	}
	// if all success

	// show the main menu
	Inventory* inventory = new Inventory();
	Menu menu(inventory);
	menu.Init();

	return 0;
}
示例#25
0
int main(int argc, char *argv[])
{
	std::vector< std::string > args = ceng::ArgsToVector( argc, argv );
	RunTests();

	std::string config_file = GetArgumentParam( "-config", args, "config.xml" );
	ceng::XmlLoadFromFile( GD.mConfigDo, config_file, "Config" );
	// no need to save anything...
	// ceng::XmlSaveToFile( GD.mConfigDo, config_file, "Config" );



	{
		poro::AppConfig appconf;
		appconf.title = "CardCreator App";
		
		appconf.internal_size_w = 2048;
		appconf.internal_size_h = 1536;
		appconf.window_w = 2048;
		appconf.window_h = 1536;
		

		/*appconf.internal_size_w = 1536;
		appconf.internal_size_h = 960;
		appconf.window_w = 1536;
		appconf.window_h = 960;*/

		/*appconf.internal_size_w = 1920 - 100;
		appconf.internal_size_h = 1200 - 50;
		appconf.window_w = 1920 - 100;
		appconf.window_h = 1200 - 50;
		*/

		appconf.report_fps = 1;
		appconf.framerate = 60;

		appconf.SetRandomSeed = ceng::SetRandomSeeds;
		appconf.record_events = true;
		
		/*appconf.do_a_playback = true;
		appconf.playback_file = "playbacks/140214-175946-playback-8384.poro_plbk";*/

		poro::RunPoro< CardCreatorApp >( appconf );
	}

	return 0;
}
示例#26
0
int test_main(int argc, char *argv[])
{	
	gsi_bool result;

	// Set debug output options
	//gsSetDebugFile(stdout);
	gsSetDebugLevel(GSIDebugCat_All, GSIDebugType_All, GSIDebugLevel_Debug);

	// enable Win32 C Runtime debugging 
	#if defined(_WIN32) && !defined(_XBOX) && defined(_DEBUG)
	{
		int tempFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
		_CrtSetDbgFlag(tempFlag | _CRTDBG_LEAK_CHECK_DF);
	}
	#endif

	if (!isBackendAvailable())
		return -1;


	result = RunTests(SCTEST_LOGIN_UNIQUE, gsi_false);


	// For Testing AuthService logins w/o submitting snapshots
	//////////////////////////////////////////////////////////
	/*gsSetDebugLevel(GSIDebugCat_All, GSIDebugType_All, GSIDebugLevel_None);
	printf("=== Testing wsLoginProfile === \n");
	result = RunTests(SCTEST_LOGIN_PROFILE, gsi_true);
	printf("=== Testing wsLoginRemoteAuth === \n");
	result = RunTests(SCTEST_LOGIN_REMOTEAUTH, gsi_true);*/


#if defined(_WIN32) && !defined(_XBOX) && defined (_UNIX)
	fflush(stderr);
	printf("Done - Press Enter\r\n"); 
	fflush(stdout);
	getc(stdin);
#else
	printf("Done.\r\n"); 
#endif
		
	GSI_UNUSED(argc);
	GSI_UNUSED(argv);
		
	return gsi_is_true(result)?0:-1;
}
示例#27
0
void DeveloperScreen::render() {
	UIShader_Prepare();
	UIBegin(UIShader_Get());
	DrawBackground(1.0f);

	VLinear vlinear(50, 100, 20);

	int w = 400;

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

	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);


	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();
}
bool test_file( const TestFile &tf, int filters )
{
	const char *fn = tf.fn;
			
	LOG->Trace("Testing: %s", fn );
	CString error;
	SoundReader *s = SoundReader_FileReader::OpenFile( fn, error );
	s = ApplyFilters( s, filters );
	
	if( s == NULL )
	{
		LOG->Trace( "File '%s' failed to open: %s", fn, error.c_str() );
		return false;
	}
	//SoundReader *snd = s;
	SoundReader *snd = s->Copy();
	delete s;

	bool ret = RunTests( snd, tf );

	delete snd;

	/* Check SetPosition_Accurate consistency:
	 * 
	 * Reopen the file from scratch, seek to 100ms, read some data, do some
	 * operations that would result in the internal TOC being filled (seek
	 * to the end), then re-read the data at 100ms and make sure it's the same. */
	
	snd = SoundReader_FileReader::OpenFile( fn, error );
	snd = ApplyFilters( snd, filters );
	
	if( snd == NULL )
	{
		LOG->Trace( "File '%s' failed to open: %s", fn, error.c_str() );
		return false;
	}

	if( !CheckSetPositionAccurate( snd ) )
		ret = false;

	delete snd;
	return ret;
}
示例#29
0
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
	theInstance = hInstance;

	RunTests();
	//OneOff();

	ULONG_PTR gdiplusToken;
	Gdiplus::GdiplusStartupInput gdiplusStartupInput;
	Gdiplus::GdiplusStartup( &gdiplusToken, &gdiplusStartupInput, NULL );

	CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
	BufferedPaintInit();

	if ( !InitApp() || !RegisterTextEdit( hInstance ) )
		return 0;

	HWND hwnd = CreateWindow( APPCLASS,
	                          TEXT( "Let's edit some shit, yeah?" ),
	                          WS_OVERLAPPEDWINDOW,
	                          CW_USEDEFAULT, CW_USEDEFAULT,
	                          CW_USEDEFAULT, CW_USEDEFAULT,
	                          NULL,
	                          NULL,
	                          theInstance,
	                          0 );

	ShowWindow( hwnd, nShowCmd );

	MSG msg;
	while ( GetMessage( &msg, NULL, 0, 0 ) )
	{
		TranslateMessage( &msg );
		DispatchMessage ( &msg );
	}

	BufferedPaintUnInit();
	CoUninitialize();
	Gdiplus::GdiplusShutdown( gdiplusToken );

	return 0;
}
示例#30
0
int RegressMain() {
    RedirectIOToConsole();

    if (!FindTestFilesDir()) {
        return Usage();
    }

    InstallCrashHandler();
    InitAllCommonControls();
    ScopedGdiPlus gdi;
    mui::Initialize();

    RunTests();

    printflush("All tests completed successfully!\n");
    mui::Destroy();
    UninstallCrashHandler();

    system("pause");
    return 0;
}