mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 06:20:23 +00:00
49c8dcf7bb
Implement a brand new FindMatlab module: - Add support for versions and components. - Find Matlab and its version in a more precise and multiplatform way. - Add API to create a new mex extension with documentation. - Add API to add matlab unit tests (with or without the unit test framework). - Find as much as possible based on a single Matlab_ROOT_DIR cache entry and allow the user to change it to re-find everything.
34 lines
921 B
Matlab
34 lines
921 B
Matlab
|
|
classdef cmake_matlab_unit_tests1 < matlab.unittest.TestCase
|
|
% some simple unit test for CMake Matlab wrapper
|
|
properties
|
|
end
|
|
|
|
methods (Test)
|
|
function testDummyCall(testCase)
|
|
% very simple call test
|
|
cmake_matlab_mex1(rand(3,3));
|
|
end
|
|
|
|
function testDummyCall2(testCase)
|
|
% very simple call test 2
|
|
ret = cmake_matlab_mex1(rand(3,3));
|
|
testCase.verifyEqual(size(ret), size(rand(3,3)));
|
|
|
|
testCase.verifyEqual(size(cmake_matlab_mex1(rand(4,3))), [4,3] );
|
|
end
|
|
|
|
function testFailTest(testCase)
|
|
testCase.verifyError(@() cmake_matlab_mex1(10), 'cmake_matlab:configuration');
|
|
testCase.verifyError(@() cmake_matlab_mex1([10]), 'cmake_matlab:configuration');
|
|
end
|
|
|
|
function testHelpContent(testCase)
|
|
% testing the help feature
|
|
testCase.verifySubstring(evalc('help cmake_matlab_mex1'), 'Dummy matlab extension in cmake');
|
|
end
|
|
|
|
|
|
end
|
|
end
|