From c83b047aa0479c809938adc784d01ffab8a07b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Thu, 4 Jul 2013 11:54:27 +0200 Subject: [PATCH] If mtest is called with one input then it must return two arguments (with detailed information about unitary tests). --- matlab/utilities/tests/mtest.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matlab/utilities/tests/mtest.m b/matlab/utilities/tests/mtest.m index 9a51c6746..f447365bb 100644 --- a/matlab/utilities/tests/mtest.m +++ b/matlab/utilities/tests/mtest.m @@ -24,7 +24,10 @@ function [check, info] = mtest(fname, fpath) check = 1; % Open the matlab file. -if isempty(fpath) +if nargin<2 || isempty(fpath) + if nargout<2 + error('mtest:: Wrong calling sequence!') + end % The full path to the matlab routine (with extension) is given. fid = fopen(fname,'r'); else