DEF_TEST(PathOpsOpCubicsThreaded, reporter) { initializeTests(reporter, "cubicOp"); PathOpsThreadedTestRunner testRunner(reporter); for (int a = 0; a < 6; ++a) { // outermost for (int b = a + 1; b < 7; ++b) { for (int c = 0 ; c < 6; ++c) { for (int d = c + 1; d < 7; ++d) { *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable, (&testOpCubicsMain, a, b, c, d, &testRunner)); } } if (!reporter->allowExtendedTest()) goto finish; } } finish: testRunner.render(); ShowTestArray("cubicOp"); }
DEF_TEST(PathOpsSimplifyQuadsThreaded, reporter) { int threadCount = initializeTests(reporter, "testQuads"); PathOpsThreadedTestRunner testRunner(reporter, threadCount); int a = 0; for (; a < 16; ++a) { for (int b = a ; b < 16; ++b) { for (int c = b ; c < 16; ++c) { for (int d = c; d < 16; ++d) { *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable, (&testSimplifyQuadsMain, a, b, c, d, &testRunner)); } if (!reporter->allowExtendedTest()) goto finish; } } } finish: testRunner.render(); }
static void TestSimplifyQuadralateralsThreaded(skiatest::Reporter* reporter) { int threadCount = initializeTests("testQuadralaterals"); PathOpsThreadedTestRunner testRunner(reporter, threadCount); for (int a = 0; a < 16; ++a) { for (int b = a ; b < 16; ++b) { for (int c = b ; c < 16; ++c) { for (int d = c; d < 16; ++d) { *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable, (&testSimplifyQuadralateralsMain, a, b, c, d, &testRunner)); } if (!reporter->allowExtendedTest()) goto finish; } } } finish: testRunner.render(); }
int main(int argc, char *argv[]) { /*bool promptOnExit(true); for (int i=0; i<argc; i++) { if (QString(argv[i]) == "-noprompt") promptOnExit = false; }*/ printf("Running tests...\n"); QApplication app(argc, argv); TestRunner testRunner("ut_symbian"); TestSymbianEngine ut_symbainEngine; testRunner.runTests(ut_symbainEngine); TestFiltering ut_filtering; testRunner.runTests(ut_filtering); TestMatchPhoneNumber ut_matchphonenumber; testRunner.runTests(ut_matchphonenumber); TestCntRelationship ut_relationship; testRunner.runTests(ut_relationship); TestCntSymbianDatabase ut_symbianDatabase; testRunner.runTests(ut_symbianDatabase); TestCntTransformContactData ut_transformContactData; testRunner.runTests(ut_transformContactData); testRunner.printResults(); /*if (promptOnExit) { printf("Press any key...\n"); getchar(); }*/ return 0; }
static void PathOpsSimplifyDegeneratesThreadedTest(skiatest::Reporter* reporter) { int threadCount = initializeTests(reporter, "testDegenerates"); PathOpsThreadedTestRunner testRunner(reporter, threadCount); for (int a = 0; a < 16; ++a) { int ax = a & 0x03; int ay = a >> 2; for (int b = a ; b < 16; ++b) { int bx = b & 0x03; int by = b >> 2; for (int c = a ; c < 16; ++c) { int cx = c & 0x03; int cy = c >> 2; bool abcIsATriangle = (bx - ax) * (cy - ay) != (by - ay) * (cx - ax); *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable, (&testSimplifyDegeneratesMain, a, b, c, abcIsATriangle, &testRunner)); } if (!reporter->allowExtendedTest()) goto finish; } } finish: testRunner.render(); }
int main( int argc, char *argv[] ) { QApplication a(argc, argv, true); QStringList argList = QCoreApplication::arguments(); QTextStream out(stdout); if( argList.size() < 2 ) { out << "Usage: fmltest <options-list>" << endl; return 0; } if( argList.size() > 3 && argList.at(1).compare("-dir2html") == 0 ) { out << "Searching for MathML files...\n" << endl; ::StartUpFDE( FmlDrawEngine_Qt ); QFmlTestDir2Html testRunner(argList.at(2), argList.at(3), "*.mml", "png" ); testRunner.run(); out << "Searching done\n" << endl; } return 1;//a.exec(); }
int main(int argc, char *argv[]) { bool promptOnExit(true); for (int i=0; i<argc; i++) { if (QString(argv[i]) == "-noprompt") promptOnExit = false; } printf("Running tests...\n"); QApplication app(argc, argv); TestRunner testRunner("ut_symbian"); UT_CntSqlSearch ut_sqlSearch; testRunner.runTests(ut_sqlSearch); testRunner.printResults(); /*if (promptOnExit) { printf("Press any key...\n"); getchar(); }*/ return 0; }
DEF_TEST(SkpSkGrThreaded, reporter) { if (!initTest()) { return; } SkpSkGrThreadedTestRunner testRunner(reporter); for (int dirIndex = 1; dirIndex <= 100; ++dirIndex) { SkString pictDir = make_in_dir_name(dirIndex); if (pictDir.size() == 0) { continue; } SkOSFile::Iter iter(pictDir.c_str(), "skp"); SkString filename; while (iter.next(&filename)) { SkString pngName = make_png_name(filename.c_str()); SkString oldPng = make_filepath(dirIndex, outSkDir, pngName.c_str()); SkString newPng = make_filepath(dirIndex, outGrDir, pngName.c_str()); if (sk_exists(oldPng.c_str()) && sk_exists(newPng.c_str())) { bumpCount(reporter, true); continue; } for (size_t index = 0; index < skipOverSkGrCount; ++index) { if (skipOverSkGr[index].directory == dirIndex && strcmp(filename.c_str(), skipOverSkGr[index].filename) == 0) { bumpCount(reporter, true); goto skipOver; } } *testRunner.fRunnables.append() = new SkpSkGrThreadedRunnable( &testSkGrMain, dirIndex, filename.c_str(), &testRunner); skipOver: ; } } testRunner.render(); SkpSkGrThreadState& max = testRunner.fRunnables[0]->fState; for (int dirIndex = 2; dirIndex <= 100; ++dirIndex) { SkpSkGrThreadState& state = testRunner.fRunnables[dirIndex - 1]->fState; for (int index = 0; index < state.fFoundCount; ++index) { int maxIdx = max.fFoundCount; if (maxIdx < kMaxFiles) { max.fError[maxIdx] = state.fError[index]; strcpy(max.fFilesFound[maxIdx], state.fFilesFound[index]); max.fDirsFound[maxIdx] = state.fDirsFound[index]; ++max.fFoundCount; continue; } for (maxIdx = 0; maxIdx < max.fFoundCount; ++maxIdx) { if (max.fError[maxIdx] < state.fError[index]) { max.fError[maxIdx] = state.fError[index]; strcpy(max.fFilesFound[maxIdx], state.fFilesFound[index]); max.fDirsFound[maxIdx] = state.fDirsFound[index]; break; } } } } TestResult encoder; encoder.fTestStep = kEncodeFiles; for (int index = 0; index < max.fFoundCount; ++index) { encoder.fDirNo = max.fDirsFound[index]; strcpy(encoder.fFilename, max.fFilesFound[index]); encoder.testOne(); SkDebugf("+"); } }
void C_InterfaceTestFixture::goblinsTestCase() { testRunner(GOBLINS_JSON, GOBLINS_ATLAS); }
void C_InterfaceTestFixture::raptorTestCase() { testRunner(RAPTOR_JSON, RAPTOR_ATLAS); }
void C_InterfaceTestFixture::spineboyTestCase() { testRunner(SPINEBOY_JSON, SPINEBOY_ATLAS); }
void DumpRenderTree::resetToConsistentStateBeforeTesting(const QUrl& url) { // reset so that any current loads are stopped // NOTE: that this has to be done before the testRunner is // reset or we get timeouts for some tests. m_page->blockSignals(true); m_page->triggerAction(QWebPage::Stop); m_page->blockSignals(false); QList<QWebSecurityOrigin> knownOrigins = QWebSecurityOrigin::allOrigins(); for (int i = 0; i < knownOrigins.size(); ++i) knownOrigins[i].setDatabaseQuota(databaseDefaultQuota); // reset the testRunner at this point, so that we under no // circumstance dump (stop the waitUntilDone timer) during the reset // of the DRT. m_controller->reset(); // reset mouse clicks counter m_eventSender->resetClickCount(); closeRemainingWindows(); // Call setTextSizeMultiplier(1.0) to reset TextZoomFactor and PageZoomFactor too. // It should be done before resetSettings() to guarantee resetting QWebSettings::ZoomTextOnly correctly. m_page->mainFrame()->setTextSizeMultiplier(1.0); m_page->resetSettings(); #ifndef QT_NO_UNDOSTACK m_page->undoStack()->clear(); #endif clearHistory(m_page); DumpRenderTreeSupportQt::scalePageBy(m_page->mainFrame(), 1, QPoint(0, 0)); DumpRenderTreeSupportQt::clearFrameName(m_page->mainFrame()); DumpRenderTreeSupportQt::removeUserStyleSheets(m_page); m_page->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded); m_page->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded); if (url.scheme() == "http" || url.scheme() == "https") { // credentials may exist from previous tests. m_page->setNetworkAccessManager(0); delete m_networkAccessManager; m_networkAccessManager = new NetworkAccessManager(this); m_page->setNetworkAccessManager(m_networkAccessManager); } WorkQueue::shared()->clear(); WorkQueue::shared()->setFrozen(false); DumpRenderTreeSupportQt::resetOriginAccessWhiteLists(); DumpRenderTreeSupportQt::setWindowsBehaviorAsEditingBehavior(m_page); QLocale::setDefault(QLocale::c()); testRunner()->setDeveloperExtrasEnabled(true); #ifndef Q_OS_WINCE setlocale(LC_ALL, ""); #endif DumpRenderTreeSupportQt::clearOpener(m_page->mainFrame()); }