Patch for XTargets MUnit
XTargets' MUnit does not work in recent versions of MATLAB.
I contacted XTargets, but I've not received any answer.
So I handmade a patch.
I hope XTargets release a newer version soon.
=====
installation:
0. Backup XTargets' MUnit folder.
1. Overwrite three included files into Xtargets' MUnit folder.
2. Edit your old test files as shown below:
From
===================
function test = your_test_file
% Subclass the testcase object
test = munit_testcase;
% Create a structure of constraint objects for assertions
c = munit_constraint;
function setup
blahblahblah
===========================
To:
===========================
function test = your_test_file
%%%%%%%%%%%%%%%
% Do not modify the following 20 lines of codes.
%%%%%%%%%%%%%%%
% Create a structure of constraint objects for assertions
c = munit_constraint;
% Subclass the testcase object
stk = dbstack('-completenames');
mname = stk(1).file;
fcn_names = scan(mname, {'setup' ,'teardown', 'test_[A-Za-z0-9_]*'});
for ffi=1:length(fcn_names)
fcn_handles{ffi}=eval(['@',fcn_names{ffi}]);
end
test_file_info.fcn_names = fcn_names;
test_file_info.fcn_handles = fcn_handles;
test = munit_testcase(test_file_info);
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
% Your codes below
%%%%%%%%%%%%%%%
x = [];
y = [];
function setup
blah blah blah
=================================
Now, you're good to go.
Citar como
Sung Soo Kim (2024). Patch for XTargets MUnit (https://www.mathworks.com/matlabcentral/fileexchange/23166-patch-for-xtargets-munit), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 | license
|