% testIsLeapYear.m  P. Conrad for CISC106  10/25/2006
% regression testing for isLeapYear function


passed = 0;
failed = 0;

if (isLeapYear(2006)==false)
  passed = passed + 1;
else
  failed = failed + 1;
end;


if (isLeapYear(2004)==true)
  passed = passed + 1;
else
  failed = failed + 1;
end;

if (isLeapYear(2000)==true)
  passed = passed + 1;
else
  failed = failed + 1;
end;


if (isLeapYear(1900)==false)
  passed = passed + 1;
else
  failed = failed + 1;
end;

if (isLeapYear(2003)==false)
  passed = passed + 1;
else
  failed = failed + 1;
end;

fprintf('Results for isLeapYear:\n')
fprintf(' %d tests passed, %d tests failed\n',passed,failed);

