static void PathOpsLineIntersectionOneOffTest(skiatest::Reporter* reporter) { int index = 0; SkASSERT(index < (int) tests_count); const SkDLine& line1 = tests[index][0]; const SkDLine& line2 = tests[index][1]; testOne(reporter, line1, line2); }
DEF_TEST(PathOpsAngle, reporter) { for (size_t index = 0; index < SK_ARRAY_COUNT(tests); ++index) { const SortSetTests& test = tests[index]; testOne(reporter, test); reporter->bumpTestCount(); } }
int main(void) { testEmpty(); testOne(); testManyPancakes(); testTooManyPancakes(); return 0; }
static void testSkpClipMain(PathOpsThreadState* data) { SkString str(data->fSerialNo); testOne(str); if (data->fReporter->verbose()) { SkDebugf("."); static int threadTestCount; sk_atomic_inc(&threadTestCount); if (threadTestCount % 100 == 0) { SkDebugf("\n"); } } }
int main(void) { float f = 0x02e03de8; float i = 0; while( i < 100000000) { testOne(f); // quiet NaN with 0 payload f += 200; i++; } printf( "I think you can accurately say your program succeeded!\n" ); return 0; }
float MultilayerNN::test(vector<vector<float>> testSet) { //ofstream dataWriter; //ofstream dataWriter2; //dataWriter.open("nnOutput.txt", ofstream::out | ofstream::trunc); //dataWriter2.open("weights.txt", ofstream::out | ofstream::trunc); float mse = 0; for (int i = 0; i < testSet.size(); i++) { mse += testOne(testSet.at(i)); } mse /= testSet.size(); return mse; }
static void PathOpsSkpClipTest(skiatest::Reporter* reporter) { SkOSFile::Iter iter(pictDir, "skp"); SkString filename; int testCount = 0; while (iter.next(&filename)) { if (strcmp(filename.c_str(), skipBefore) < 0) { continue; } testOne(filename); if (reporter->verbose()) { SkDebugf("."); if (++testCount % 100 == 0) { SkDebugf("\n"); } } reporter->bumpTestCount(); } }
static void PathOpsLineIntersectionTest(skiatest::Reporter* reporter) { size_t index; for (index = 0; index < coincidentTests_count; ++index) { const SkDLine& line1 = coincidentTests[index][0]; const SkDLine& line2 = coincidentTests[index][1]; testOneCoincident(reporter, line1, line2); reporter->bumpTestCount(); } for (index = 0; index < tests_count; ++index) { const SkDLine& line1 = tests[index][0]; const SkDLine& line2 = tests[index][1]; testOne(reporter, line1, line2); reporter->bumpTestCount(); } for (index = 0; index < noIntersect_count; ++index) { const SkDLine& line1 = noIntersect[index][0]; const SkDLine& line2 = noIntersect[index][1]; SkIntersections ts; int pts = ts.intersect(line1, line2); REPORTER_ASSERT(reporter, !pts); REPORTER_ASSERT(reporter, pts == ts.used()); reporter->bumpTestCount(); } }
int main(void) { uint32_t test; unsigned int sign; unsigned int random1; unsigned int random2; unsigned int i; unsigned int j; for( i = 0x00; i < 0xFF; i++ ) { printf("%02" PRIx32 "\n", i); for( j = 0; j < 100000; j++ ) { sign = 0; test = 0; random1 = 0; sign = j%2; test = sign; random1 = rand(); test <<= 11; test |= i; test <<= 23; test |= (random1>>9); testOne(test); } } printf( "I think you can accurately say your program succeeded!\n" ); return 0; }
void test(int dirNo, const SkString& filename) { init(dirNo); strcpy(fFilename, filename.c_str()); testOne(); }
static void PathOpsSkpClipOneOffTest(skiatest::Reporter* reporter) { SkString filename(skipBefore); testOne(filename); }
DEF_TEST(PathOpsAngleTestOne, reporter) { size_t index = 0; const SortSetTests& test = tests[index]; testOne(reporter, test); }