%testConvertMorseAthruF.m  P.Conrad for CISC106 sect 99, 11/15/06
% regression/acceptance testing for convertMorseAthruF.m
%


fprintf('Test 1: ');
try
  actualResult = convertMorseAthruF('error');
  fprintf(' failed\n'); % if you didn't get an error, you failed
catch
  fprintf(' passed\n');
end

fprintf('Test 2: ');
actualResult = convertMorseAthruF('FEED');
expectedResult = '. . --- .   .   .   --- . .';
if (strcmp(actualResult,expectedResult))  
  fprintf(' passed\n');
else
  fprintf(' failed\n');
end

fprintf('Test 3: ');
actualResult = convertMorseAthruF('FEED ABBA BEEF');
expectedResult =  ['. . --- .   .   .   --- . .       '           ...
		   '. ---   --- . . .   --- . . .   . ---       ' ...
		   '--- . . .   .   .   . . --- .'];

if (strcmp(actualResult,expectedResult))  
  fprintf(' passed\n');
else
  fprintf(' failed\n');
end

