Code covered by the BSD License  

Highlights from
Test Tools - Utilities for unit tests

Test Tools - Utilities for unit tests

by

 

06 Dec 2000 (Updated )

Tools that facilitate debugging or writing unit test for MATLAB functions.

disp_num_failures(test_object, num_failures)
function disp_num_failures(test_object, num_failures)
%DISP_NUM_FAILURES displays the number of failures.
%     Usage: DISP_NUM_FAILURES(test_object, num_failures), where
%     test_object is the name of the function/object being tested, and
%     num_failures is the number of failures counted.

% $Source: /home/stpierre/cvsroot/matlab/tools/test_tools/disp_num_failures.m,v $
% $Revision: 1.4 $
% $Date: 2009-07-26 21:33:13 $

% Copyright (c) 2000-2009, Jay A. St. Pierre.  All rights reserved.

if ~ischar(test_object)
  error('test_object must be a string')
elseif ischar(num_failures) || max(size(num_failures) ~= 1)
  error('num_failures has to be a scalar number')
end

disp(' ')
disp('================================================================')
disp(['Number of Failures for ', test_object, ': ', num2str(num_failures)]); 
disp('================================================================')
disp(' ')
disp(' ')

Contact us