mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1004 B
45 lines
1004 B
% Matlab binding test cases |
|
% Uses Matlab's builtin testing framework |
|
classdef OpenCVTest < matlab.unittest.TestCase |
|
|
|
methods(Test) |
|
|
|
% check if the autogenerated functions can be found |
|
function functionsExist(testcase) |
|
try |
|
cv.rand(); |
|
catch |
|
testcase.verifyFail(); |
|
end |
|
testcase.verifyTrue(true); |
|
end |
|
|
|
% check that std exception is thrown |
|
function stdException(testcase) |
|
try |
|
std_exception(); |
|
testcase.verifyFail(); |
|
catch |
|
% TODO: Catch more specific exception |
|
testcase.verifyTrue(true); |
|
end |
|
end |
|
|
|
% check that OpenCV exceptions are correctly caught |
|
function cvException(testcase) |
|
testcase.verifyFail(); |
|
end |
|
|
|
% check that all exceptions are caught |
|
function allException(testcase) |
|
try |
|
exception(); |
|
testcase.verifyFail(); |
|
catch |
|
% TODO: Catch more specific exception |
|
testcase.verifyTrue(true); |
|
end |
|
end |
|
|
|
end |
|
end
|
|
|