bool ModelCheckerTest::RunModelCheckingTest() { Initialize(); RunTest(); ValidateTestResults(); return evaluationResult; }
bool MinEnclosingTriangleFinderTest::TestThreePoints() { points = std::vector<cv::Point2f>({cv::Point2f(1, 1), cv::Point2f(2, 2), cv::Point2f(4, 1)}); RunTest(); ValidateTestResults(); return validationFlag; }
bool MinEnclosingTriangleFinderTest::TestPointsWithNegativeCoordinates() { points = std::vector<cv::Point2f>({cv::Point2f(-2, -1), cv::Point2f(2, 2), cv::Point2f(4, 4)}); RunTest(); ValidateTestResults(); return validationFlag; }
bool MinEnclosingTriangleFinderTest::TestMorePointsAndNonEmptyTriangle() { points = std::vector<cv::Point2f>({cv::Point2f(1, 1), cv::Point2f(2, 2), cv::Point2f(4, 1), cv::Point2f(5, 5), cv::Point2f(6, 4)}); triangle.push_back(cv::Point2f(1, 1)); RunTest(); ValidateTestResults(); return ((validationFlag) && (triangle.size() == 3)); }
bool MinEnclosingTriangleFinderTest::TestRandomPoints() { srand(time(NULL)); int nrOfRandomTrials = GetRandomNrOfExecutions(); for (int i = 0; i < nrOfRandomTrials; i++) { points.clear(); int nrOfPoints = GetRandomNrOfPoints(); for (int j = 0; j < nrOfPoints; j++) { points.push_back(cv::Point2f(rand(), rand())); } RunTest(); ValidateTestResults(); if (!validationFlag) { return false; } } return true; }
bool MinEnclosingTriangleFinderTest::TestNoPoints() { RunTest(); ValidateTestResults(); return validationFlag; }