Skip to content

Commit

Permalink
Update MOxUnit tests to follow the scheme required by MOxUnit 2021
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Sep 15, 2021
1 parent d6c4d78 commit fa2cbc6
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/matlab/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (IDYNTREE_USES_MATLAB AND NOT IDYNTREE_DISABLE_MATLAB_TESTS)
find_package(Matlab REQUIRED
COMPONENTS MAIN_PROGRAM)
add_test(NAME matlab_idyntree_tests
COMMAND ${Matlab_MAIN_PROGRAM} -nodisplay -nodesktop -nojvm -r "addpath('$<TARGET_FILE_DIR:${mexname}>');addpath('${MEX_BINDINGS_SOURCE_DIR}');addpath('${MATLAB_WRAPPERS_BINDINGS_SOURCE_DIR}');addpath('${CMAKE_CURRENT_SOURCE_DIR}/');addpath(genpath('${IDYNTREE_INTERNAL_MOXUNIT_PATH}'));success=moxunit_runtests('${CMAKE_CURRENT_SOURCE_DIR}','-verbose');exit(~success);")
COMMAND ${Matlab_MAIN_PROGRAM} -nodisplay -nodesktop -nojvm -batch "addpath('$<TARGET_FILE_DIR:${mexname}>');addpath('${MEX_BINDINGS_SOURCE_DIR}');addpath('${MATLAB_WRAPPERS_BINDINGS_SOURCE_DIR}');addpath('${CMAKE_CURRENT_SOURCE_DIR}/');addpath(genpath('${IDYNTREE_INTERNAL_MOXUNIT_PATH}'));success=moxunit_runtests('${CMAKE_CURRENT_SOURCE_DIR}','-verbose');exit(~success);")
endif()

if (IDYNTREE_USES_OCTAVE)
Expand Down
4 changes: 4 additions & 0 deletions bindings/matlab/tests/EKFTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function test_suite=EKFTest
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite

function test_span
Expand Down
4 changes: 4 additions & 0 deletions bindings/matlab/tests/InertiaUnitTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function test_suite=InertiaUnitTest
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite

function test_momentum_invariance
Expand Down
4 changes: 4 additions & 0 deletions bindings/matlab/tests/JointUnitTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function test_suite=JointUnitTest
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite

function test_joint_constructor
Expand Down
4 changes: 4 additions & 0 deletions bindings/matlab/tests/MatrixUnitTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function test_suite=MatrixUnitTest
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite

function test_sparse_matrices
Expand Down
4 changes: 4 additions & 0 deletions bindings/matlab/tests/PositionUnitTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function test_suite=PositionUnitTest
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite
test_sum_of_positions

Expand Down
4 changes: 4 additions & 0 deletions bindings/matlab/tests/TransformUnitTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function test_suite=TransformUnitTest
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite

function test_pos_twist_wrench_invariance
Expand Down
4 changes: 4 additions & 0 deletions bindings/matlab/tests/highLevelWrappersSmokeTest.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
function test_suite = highLevelWrappersSmokeTest
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite

function test__high_level_wrappers
Expand Down

0 comments on commit fa2cbc6

Please sign in to comment.