예제 #1
0
    bool ModelCheckerTest::RunModelCheckingTest() {
        Initialize();

        RunTest();
        ValidateTestResults();

        return evaluationResult;
    }
예제 #2
0
    bool MinEnclosingTriangleFinderTest::TestThreePoints() {
        points = std::vector<cv::Point2f>({cv::Point2f(1, 1), cv::Point2f(2, 2), cv::Point2f(4, 1)});

        RunTest();
        ValidateTestResults();

        return validationFlag;
    }
예제 #3
0
    bool MinEnclosingTriangleFinderTest::TestPointsWithNegativeCoordinates() {
        points = std::vector<cv::Point2f>({cv::Point2f(-2, -1), cv::Point2f(2, 2), cv::Point2f(4, 4)});

        RunTest();
        ValidateTestResults();

        return validationFlag;
    }
예제 #4
0
    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));
    }
예제 #5
0
    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;
    }
예제 #6
0
    bool MinEnclosingTriangleFinderTest::TestNoPoints() {
        RunTest();
        ValidateTestResults();

        return validationFlag;
    }