本文整理汇总了C++中TestResult::testOne方法的典型用法代码示例。如果您正苦于以下问题:C++ TestResult::testOne方法的具体用法?C++ TestResult::testOne怎么用?C++ TestResult::testOne使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestResult
的用法示例。
在下文中一共展示了TestResult::testOne方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Test
static void Test(int dirNo, const char* filename, TestStep testStep) {
TestResult test;
test.init(dirNo);
test.fTestStep = testStep;
strcpy(test.fFilename, filename);
test.testOne();
}
示例2: Test
static void Test(int dirNo, const char* filename, TestStep testStep, bool verbose) {
TestResult test;
test.init(dirNo);
test.fTestStep = testStep;
strcpy(test.fFilename, filename);
test.testOne();
if (verbose) {
SkDebugf("%s", test.status().c_str());
}
}
示例3: testRunner
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("+");
}
}