SAMPLE TEST DOCUMENTATION ========================= The program converts upper case alphabetic characters to lower case alphabetic characters and vice versa. All other input should be left untouched. USER INTERFACE TESTING There is no user interface to be tested, so the testing focuses solely on the algorithm used for the conversion. ALGORITHM TESTING TEST 1: ------- DATA DESCRIPTION The first input file used (as a re-direction of standard input), is "data1.in". The contents of the file, with each line numbered, are: 1 abcdefghijklmnopqrstuvwxyz 2 ABCDEFGHIJKLMNOPQRSTUVWXYZ 3 4% ^7890) 4 5 This is a short text piece. Line 1 is used to verify that each lower case alphabetic character is recognized and converted correctly. Line 2 verifies that each upper case alphabetic character is converted correctly. Lines 3 and 4 verify that non-alphabetic characters, including tabs, spaces, and carriage returns, are left undisturbed. Line 5 tests a mixture of upper and lower case characters, the actual choices of which are random. TESTING Here is the script-fixed log of the testing performed with line numbers attached. 1 Script started on Thu Sep 15 10:54:20 1994 2 cs343_ctkierst@cayley[1]% cat data1.in 3 abcdefghijklmnopqrstuvwxyz 4 ABCDEFGHIJKLMNOPQRSTUVWXYZ 5 4% ^7890) 6 7 This is a short text piece. 8 cs343_ctkierst@cayley[2]% ./test < data1.in 9 ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 abcdefghijklmnopqrstuvwxyz 11 4% ^7890) 12 13 tHIS IS A SHORT TEXT PIECE. 14 cs343_ctkierst@cayley[5]% exit 15 exit 16 17 script done on Thu Sep 15 10:54:46 1994 ANALYSIS The results from running the program on "data1.in" show that: 1) All lower case characters are correctly recognized and converted. This is shown by the transformation of the contents of line 3 to the results shown in line 9 as well the change in line 7 to what is shown in line 13. 2) All upper case characters are correctly recognized and converted. This is shown by the transformation of the contents of line 4 to the results shown in line 10 as well the change in line 7 to what is shown in line 13. 3) All other characters are left untouched shown by the lack of change of the contents of lines 5 and 6 in lines 11 and 12. 4) A mixture of upper and lower case alphabetic characters are correctly converted. This is shown by the transformation of line 7 to the results shown in line 13. The test for isupper(ch) has been verified by the data on lines 4 and 7. The test for islower(ch) has been verified by the data on lines 3, 7, and 9. The default case of being neither an upper nor a lower case character has been verified by the data on lines 5 and 6. From this we can say that each condition in the main loop has been exercised, and the basic conversion algorithm has been shown to be correct. TEST 2: ------- DATA DESCRIPTION "data2.in", is an empty input file. It is used to verify that the end of file is detected correctly, and no extraneous output is generated. TESTING Here is the script-fixed log of the testing performed. 1 Script started on Thu Sep 15 11:13:01 1994 2 cs343_ctkierst@cayley[3]% cat data2.in 3 cs343_ctkierst@cayley[4]% ./test < data2.in 4 cs343_ctkierst@cayley[5]% exit 5 exit 6 7 script done on Thu Sep 15 11:13:33 1994 ANALYSIS Line 3 runs the program on "data2.in" and lines 4-5 show that the end-of- file is correctly detected, and no extraneous output is generated. Thus the basic input processing algorithm is shown to be correct.