classdef TestGoodFeaturesToTrack
    %TestGoodFeaturesToTrack
    properties (Constant)
        img = im2uint8([...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 1 1 1 1 0 0 0 0 0;...
            0 0 0 0 1 1 1 1 0 0 0 0 0;...
            0 0 0 0 1 1 1 1 0 0 0 0 0;...
            0 0 0 0 1 1 1 1 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            0 0 0 0 0 0 0 0 0 0 0 0 0;...
            ]);
    end
    
    methods (Static)
        function test_1
            im = TestGoodFeaturesToTrack.img;
            result = cv.goodFeaturesToTrack(im);
        end
        
        function test_error_1
            try
                cv.goodFeaturesToTrack();
                throw('UnitTest:Fail');
            catch e
                assert(strcmp(e.identifier,'mexopencv:error'));
            end
        end
    end
    
end

