% testOrdinalDay.m  P. Conrad for CISC106  10/25/2006
% regression testing for ordinalDay function


passed = 0;
failed = 0;

if (ordinalDay(1,1,2006) == 1)
  passed = passed + 1;
else
  failed = failed + 1;
end;

 
if (ordinalDay(2,1,2006) == 32)
  passed = passed + 1;
else
  failed = failed + 1;
end;

if (ordinalDay(3,1,2006) == 60)
  passed = passed + 1;
else
  failed = failed + 1;
end;


if (ordinalDay(12,31,2006) == 365)
  passed = passed + 1;
else
  failed = failed + 1;
end;

if (ordinalDay(12,31,2000) == 366)
  passed = passed + 1;
else
  failed = failed + 1;
end;

if (ordinalDay(12,31,1900) == 365)
  passed = passed + 1;
else
  failed = failed + 1;
end;



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

