MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / DoErrorTest2

Function DoErrorTest2

CPP/BenchMark/PointInPolygonBenchmark.cpp:362–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362static void DoErrorTest2(int index)
363{
364 PipFunction pip_func = GetPIPFunc(index);
365
366 std::vector<size_t> errors;
367 std::cout << SetConsoleTextColor(green_bold) <<
368 "Testing PIP" << index +1 << SetConsoleTextColor(reset) <<":";
369 for (size_t i = 0; i < paths.size(); ++i)
370 if (pip_func(mp, paths[i]) != pipResults[0][i]) errors.push_back(i);
371 if (errors.size())
372 {
373 size_t high_error = errors.size() - 1;
374 std::cout << SetConsoleTextColor(red_bold) << " Error in ";
375 for (size_t i = 0; i < high_error; ++i)
376 std::cout << errors[i] << " and ";
377 std::cout << errors[high_error] << "." <<
378 SetConsoleTextColor(reset) << std::endl;
379 }
380 else
381 std::cout << " No errors found." << std::endl;
382}
383
384
385/////////////////////////////////////////////////////////

Callers 1

mainFunction · 0.85

Calls 2

GetPIPFuncFunction · 0.85
SetConsoleTextColorClass · 0.70

Tested by

no test coverage detected