function result = performEqualTest(actual,expected,testNum)
%performEqualTest  perform one test to see if actual==expected
%
% consumes: actual--the actual result of the function
%           expected--what we expected the function to return
%           testNum--which test number to report in the message
% produces: result--boolean, true if test passed, false if failed
% prints:   message indicating status of test
%           and value of actual and expected if test fails
%
% Examples: (typically used with ; to supress return value)
%
%  performEqualTest(isOdd(2),false,'1');
%  performEqualTest(isOdd(7),true,'2');
%  performEqualTest(isOdd(-7),true,'3');
%  performEqualTest(isOdd(-2),false,'4');
%  performEqualTest(isOdd(0),false,'5');
%
% P. Conrad for CISC106, sect 99, 10/07/2007

% perform a test to see if actual equals expected
% and print appropriate message

  if (actual == expected)
    disp(['test ' testNum ' passed']);
    result = true;
  else
    disp(['test ' testNum ' failed']);
    expected
    actual
    result = false;
  end
  
  return;
end
