//_Header //******************************************************************* // NOVA CONTROL SYSTEM --- Lawrence Livermore Laboratory // // Copyright 1984 by The Regents of the University of California //******************************************************************* // //_Module_Name: MTHCMPTST _File: [VCLIB.TEST.LSI]MTHCMPTST.PRX // //_Description: // Arithmatic comparison test //_Call: //_Remarks: // Test #1 : A = B // Test #2 : A <> B // Test #3 : A < B // Test #4 : A <= B // Test #5 : A > B // Test #6 : A >= B // Condition #1 : A and B zero // Condition #2 : A zero, B min positive // Condition #3 : A zero, B min negitive // Condition #4 : A and B small positive // Condition #5 : A and B large positive // Condition #6 : A and B small negitive // Condition #7 : A and B large negitive // Condition #8 : A min positive, B max positive // Condition #9 : A min negitive, B max negitive // Condition #10 : A max positive, B max negitive // Condition #11 : A and B min positive // Condition #12 : A and B min negitive // Condition #13 : A and B max positive // Condition #14 : A and B max negitive //_Identifier: { none } //******************************************************************* //_Author: T. A. SHERMAN _Creation_Date: 7-OCT-1984 //_Revisions: // 1.000 7-OCT-1984 TAS Initial Key-in. //******************************************************************* //_End Main Module MTHCMPTST Use TEXTIO Declare //Boundary values Zero = 0 Min_pos_integer = 1 Min_neg_integer = -1 Max_pos_4_bit_integer = 7 Max_neg_4_bit_integer = -8 Max_pos_8_bit_integer = 127 Max_neg_8_bit_integer = -128 Max_pos_12_bit_integer = 2047 Max_neg_12_bit_integer = -2048 Max_pos_16_bit_integer = 32767 Max_neg_16_bit_integer = -32768 Max_pos_20_bit_integer = 524287 Max_neg_20_bit_integer = -524288 Max_pos_24_bit_integer = 8388607 Max_neg_24_bit_integer = -8388608 Max_pos_28_bit_integer = 134217727 Max_neg_28_bit_integer = -134217728 Max_pos_32_bit_integer = 16!7FFFFFFF Max_neg_32_bit_integer = 16!80000000 // Max_pos_32_bit_integer = 2147483647 // Max_neg_32_bit_integer = -2147483648 //Objects A_4 : static 4 bit integer // Half byte object B_4 : static 4 bit integer A_8 : static 8 bit integer // One byte object B_8 : static 8 bit integer A_12 : static 12 bit integer // One and a half byte object B_12 : static 12 bit integer A_16 : static 16 bit integer // One word object ( two bytes ) B_16 : static 16 bit integer A_20 : static 20 bit integer // Two and a half byte object B_20 : static 20 bit integer A_24 : static 24 bit integer // Three byte object B_24 : static 24 bit integer A_28 : static 28 bit integer // Three and a half byte object B_28 : static 28 bit integer A_32 : static 32 bit integer // Two word object ( four bytes ) B_32 : static 32 bit integer Error_count : static integer initially 0 EndDeclare Procedure Pass () EndProcedure Procedure Failure ( size: integer, test: integer, cond: integer ) Out_string ( TTY, "Failure -- " ) Out_integer ( TTY, size ) Out_string ( TTY, " Bit Arithmatic comparison test #" ) Out_integer ( TTY, test ) Out_string ( TTY, ", condition #" ) Out_integer ( TTY, cond ) Out_record ( TTY ) Error_count *= +1 EndProcedure TTY_line ( "4 Bit Arithmatic Comparison Tests" ) // 4 bit tests // Condition #1 : A and B zero A_4 := zero B_4 := zero // Test #1 : A = B If A_4 = B_4 do Pass () Otherwise Failure ( 4,1,1 ) EndIf // Test #2 : A <> B If A_4 <> B_4 do Failure ( 4,2,1 ) Otherwise Pass () EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,1 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,1 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,1 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,1 ) EndIf // Condition #2 : A zero, B min positive A_4 := zero B_4 := min_pos_integer // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,2 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,2 ) EndIf // Test #3 : A < B If A_4 < B_4 do Pass () Otherwise Failure ( 4,3,2 ) EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,2 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,2 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Failure ( 4,6,2 ) Otherwise Pass () EndIf // Condition #3 : A zero, B min negitive A_4 := zero B_4 := min_neg_integer // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,3 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,3 ) EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,3 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Failure ( 4,4,3 ) Otherwise Pass () EndIf // Test #5 : A > B If A_4 > B_4 do Pass () Otherwise Failure ( 4,5,3 ) EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,3 ) EndIf // Condition #4 : A and B small positive A_4 := min_pos_integer B_4 := min_pos_integer + 1 // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,4 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,4 ) EndIf // Test #3 : A < B If A_4 < B_4 do Pass () Otherwise Failure ( 4,3,4 ) EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,4 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,4 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Failure ( 4,6,4 ) Otherwise Pass () EndIf // Condition #5 : A and B large positive A_4 := max_pos_4_bit_integer B_4 := max_pos_4_bit_integer - 1 // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,5 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,5 ) EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,5 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Failure ( 4,4,5 ) Otherwise Pass () EndIf // Test #5 : A > B If A_4 > B_4 do Pass () Otherwise Failure ( 4,5,5 ) EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,5 ) EndIf // Condition #6 : A and B small negitive A_4 := min_neg_integer B_4 := min_neg_integer - 1 // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,6 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,6 ) EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,6 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Failure ( 4,4,6 ) Otherwise Pass () EndIf // Test #5 : A > B If A_4 > B_4 do Pass () Otherwise Failure ( 4,5,6 ) EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,6 ) EndIf // Condition #7 : A and B large negitive A_4 := max_neg_4_bit_integer B_4 := max_neg_4_bit_integer + 1 // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,7 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,7 ) EndIf // Test #3 : A < B If A_4 < B_4 do Pass () Otherwise Failure ( 4,3,7 ) EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,7 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,7 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Failure ( 4,6,7 ) Otherwise Pass () EndIf // Condition #8 : A min positive, B max positive A_4 := min_pos_integer B_4 := max_pos_4_bit_integer // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,8 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,8 ) EndIf // Test #3 : A < B If A_4 < B_4 do Pass () Otherwise Failure ( 4,3,8 ) EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,8 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,8 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Failure ( 4,6,8 ) Otherwise Pass () EndIf // Condition #9 : A min negitive, B max negitive A_4 := min_neg_integer B_4 := max_neg_4_bit_integer // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,9 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,9 ) EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,9 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Failure ( 4,4,9 ) Otherwise Pass () EndIf // Test #5 : A > B If A_4 > B_4 do Pass () Otherwise Failure ( 4,5,9 ) EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,9 ) EndIf // Condition #10 : A max positive, B max negitive A_4 := max_pos_4_bit_integer B_4 := max_neg_4_bit_integer // Test #1 : A = B If A_4 = B_4 do Failure ( 4,1,10 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_4 <> B_4 do Pass () Otherwise Failure ( 4,2,10 ) EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,10 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Failure ( 4,4,10 ) Otherwise Pass () EndIf // Test #5 : A > B If A_4 > B_4 do Pass () Otherwise Failure ( 4,5,10 ) EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,10 ) EndIf // Condition #11 : A and B min positive A_4 := min_pos_integer B_4 := min_pos_integer // Test #1 : A = B If A_4 = B_4 do Pass () Otherwise Failure ( 4,1,11 ) EndIf // Test #2 : A <> B If A_4 <> B_4 do Failure ( 4,2,11 ) Otherwise Pass () EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,11 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,11 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,11 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,11 ) EndIf // Condition #12 : A and B min negitive A_4 := min_neg_integer B_4 := min_neg_integer // Test #1 : A = B If A_4 = B_4 do Pass () Otherwise Failure ( 4,1,12 ) EndIf // Test #2 : A <> B If A_4 <> B_4 do Failure ( 4,2,12 ) Otherwise Pass () EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,12 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,12 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,12 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,12 ) EndIf // Condition #13 : A and B max positive A_4 := max_pos_4_bit_integer B_4 := max_pos_4_bit_integer // Test #1 : A = B If A_4 = B_4 do Pass () Otherwise Failure ( 4,1,13 ) EndIf // Test #2 : A <> B If A_4 <> B_4 do Failure ( 4,2,13 ) Otherwise Pass () EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,13 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,13 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,13 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,13 ) EndIf // Condition #14 : A and B max negitive A_4 := max_neg_4_bit_integer B_4 := max_neg_4_bit_integer // Test #1 : A = B If A_4 = B_4 do Pass () Otherwise Failure ( 4,1,14 ) EndIf // Test #2 : A <> B If A_4 <> B_4 do Failure ( 4,2,14 ) Otherwise Pass () EndIf // Test #3 : A < B If A_4 < B_4 do Failure ( 4,3,14 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_4 <= B_4 do Pass () Otherwise Failure ( 4,4,14 ) EndIf // Test #5 : A > B If A_4 > B_4 do Failure ( 4,5,14 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_4 >= B_4 do Pass () Otherwise Failure ( 4,6,14 ) EndIf TTY_line ( "8 Bit Arithmatic Comparison Tests" ) // 8 bit tests // Condition #1 : A and B zero A_8 := zero B_8 := zero // Test #1 : A = B If A_8 = B_8 do Pass () Otherwise Failure ( 8,1,1 ) EndIf // Test #2 : A <> B If A_8 <> B_8 do Failure ( 8,2,1 ) Otherwise Pass () EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,1 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,1 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,1 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,1 ) EndIf // Condition #2 : A zero, B min positive A_8 := zero B_8 := min_pos_integer // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,2 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,2 ) EndIf // Test #3 : A < B If A_8 < B_8 do Pass () Otherwise Failure ( 8,3,2 ) EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,2 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,2 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Failure ( 8,6,2 ) Otherwise Pass () EndIf // Condition #3 : A zero, B min negitive A_8 := zero B_8 := min_neg_integer // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,3 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,3 ) EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,3 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Failure ( 8,4,3 ) Otherwise Pass () EndIf // Test #5 : A > B If A_8 > B_8 do Pass () Otherwise Failure ( 8,5,3 ) EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,3 ) EndIf // Condition #4 : A and B small positive A_8 := min_pos_integer B_8 := min_pos_integer + 1 // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,4 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,4 ) EndIf // Test #3 : A < B If A_8 < B_8 do Pass () Otherwise Failure ( 8,3,4 ) EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,4 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,4 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Failure ( 8,6,4 ) Otherwise Pass () EndIf // Condition #5 : A and B large positive A_8 := max_pos_8_bit_integer B_8 := max_pos_8_bit_integer - 1 // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,5 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,5 ) EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,5 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Failure ( 8,4,5 ) Otherwise Pass () EndIf // Test #5 : A > B If A_8 > B_8 do Pass () Otherwise Failure ( 8,5,5 ) EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,5 ) EndIf // Condition #6 : A and B small negitive A_8 := min_neg_integer B_8 := min_neg_integer - 1 // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,6 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,6 ) EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,6 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Failure ( 8,4,6 ) Otherwise Pass () EndIf // Test #5 : A > B If A_8 > B_8 do Pass () Otherwise Failure ( 8,5,6 ) EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,6 ) EndIf // Condition #7 : A and B large negitive A_8 := max_neg_8_bit_integer B_8 := max_neg_8_bit_integer + 1 // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,7 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,7 ) EndIf // Test #3 : A < B If A_8 < B_8 do Pass () Otherwise Failure ( 8,3,7 ) EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,7 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,7 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Failure ( 8,6,7 ) Otherwise Pass () EndIf // Condition #8 : A min positive, B max positive A_8 := min_pos_integer B_8 := max_pos_8_bit_integer // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,8 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,8 ) EndIf // Test #3 : A < B If A_8 < B_8 do Pass () Otherwise Failure ( 8,3,8 ) EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,8 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,8 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Failure ( 8,6,8 ) Otherwise Pass () EndIf // Condition #9 : A min negitive, B max negitive A_8 := min_neg_integer B_8 := max_neg_8_bit_integer // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,9 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,9 ) EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,9 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Failure ( 8,4,9 ) Otherwise Pass () EndIf // Test #5 : A > B If A_8 > B_8 do Pass () Otherwise Failure ( 8,5,9 ) EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,9 ) EndIf // Condition #10 : A max positive, B max negitive A_8 := max_pos_8_bit_integer B_8 := max_neg_8_bit_integer // Test #1 : A = B If A_8 = B_8 do Failure ( 8,1,10 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_8 <> B_8 do Pass () Otherwise Failure ( 8,2,10 ) EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,10 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Failure ( 8,4,10 ) Otherwise Pass () EndIf // Test #5 : A > B If A_8 > B_8 do Pass () Otherwise Failure ( 8,5,10 ) EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,10 ) EndIf // Condition #11 : A and B min positive A_8 := min_pos_integer B_8 := min_pos_integer // Test #1 : A = B If A_8 = B_8 do Pass () Otherwise Failure ( 8,1,11 ) EndIf // Test #2 : A <> B If A_8 <> B_8 do Failure ( 8,2,11 ) Otherwise Pass () EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,11 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,11 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,11 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,11 ) EndIf // Condition #12 : A and B min negitive A_8 := min_neg_integer B_8 := min_neg_integer // Test #1 : A = B If A_8 = B_8 do Pass () Otherwise Failure ( 8,1,12 ) EndIf // Test #2 : A <> B If A_8 <> B_8 do Failure ( 8,2,12 ) Otherwise Pass () EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,12 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,12 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,12 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,12 ) EndIf // Condition #13 : A and B max positive A_8 := max_pos_8_bit_integer B_8 := max_pos_8_bit_integer // Test #1 : A = B If A_8 = B_8 do Pass () Otherwise Failure ( 8,1,13 ) EndIf // Test #2 : A <> B If A_8 <> B_8 do Failure ( 8,2,13 ) Otherwise Pass () EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,13 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,13 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,13 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,13 ) EndIf // Condition #14 : A and B max negitive A_8 := max_neg_8_bit_integer B_8 := max_neg_8_bit_integer // Test #1 : A = B If A_8 = B_8 do Pass () Otherwise Failure ( 8,1,14 ) EndIf // Test #2 : A <> B If A_8 <> B_8 do Failure ( 8,2,14 ) Otherwise Pass () EndIf // Test #3 : A < B If A_8 < B_8 do Failure ( 8,3,14 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_8 <= B_8 do Pass () Otherwise Failure ( 8,4,14 ) EndIf // Test #5 : A > B If A_8 > B_8 do Failure ( 8,5,14 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_8 >= B_8 do Pass () Otherwise Failure ( 8,6,14 ) EndIf TTY_line ( "12 Bit Arithmatic Comparison Tests" ) // 12 bit tests // Condition #1 : A and B zero A_12 := zero B_12 := zero // Test #1 : A = B If A_12 = B_12 do Pass () Otherwise Failure ( 12,1,1 ) EndIf // Test #2 : A <> B If A_12 <> B_12 do Failure ( 12,2,1 ) Otherwise Pass () EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,1 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,1 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,1 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,1 ) EndIf // Condition #2 : A zero, B min positive A_12 := zero B_12 := min_pos_integer // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,2 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,2 ) EndIf // Test #3 : A < B If A_12 < B_12 do Pass () Otherwise Failure ( 12,3,2 ) EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,2 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,2 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Failure ( 12,6,2 ) Otherwise Pass () EndIf // Condition #3 : A zero, B min negitive A_12 := zero B_12 := min_neg_integer // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,3 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,3 ) EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,3 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Failure ( 12,4,3 ) Otherwise Pass () EndIf // Test #5 : A > B If A_12 > B_12 do Pass () Otherwise Failure ( 12,5,3 ) EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,3 ) EndIf // Condition #4 : A and B small positive A_12 := min_pos_integer B_12 := min_pos_integer + 1 // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,4 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,4 ) EndIf // Test #3 : A < B If A_12 < B_12 do Pass () Otherwise Failure ( 12,3,4 ) EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,4 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,4 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Failure ( 12,6,4 ) Otherwise Pass () EndIf // Condition #5 : A and B large positive A_12 := max_pos_12_bit_integer B_12 := max_pos_12_bit_integer - 1 // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,5 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,5 ) EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,5 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Failure ( 12,4,5 ) Otherwise Pass () EndIf // Test #5 : A > B If A_12 > B_12 do Pass () Otherwise Failure ( 12,5,5 ) EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,5 ) EndIf // Condition #6 : A and B small negitive A_12 := min_neg_integer B_12 := min_neg_integer - 1 // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,6 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,6 ) EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,6 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Failure ( 12,4,6 ) Otherwise Pass () EndIf // Test #5 : A > B If A_12 > B_12 do Pass () Otherwise Failure ( 12,5,6 ) EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,6 ) EndIf // Condition #7 : A and B large negitive A_12 := max_neg_12_bit_integer B_12 := max_neg_12_bit_integer + 1 // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,7 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,7 ) EndIf // Test #3 : A < B If A_12 < B_12 do Pass () Otherwise Failure ( 12,3,7 ) EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,7 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,7 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Failure ( 12,6,7 ) Otherwise Pass () EndIf // Condition #8 : A min positive, B max positive A_12 := min_pos_integer B_12 := max_pos_12_bit_integer // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,8 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,8 ) EndIf // Test #3 : A < B If A_12 < B_12 do Pass () Otherwise Failure ( 12,3,8 ) EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,8 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,8 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Failure ( 12,6,8 ) Otherwise Pass () EndIf // Condition #9 : A min negitive, B max negitive A_12 := min_neg_integer B_12 := max_neg_12_bit_integer // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,9 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,9 ) EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,9 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Failure ( 12,4,9 ) Otherwise Pass () EndIf // Test #5 : A > B If A_12 > B_12 do Pass () Otherwise Failure ( 12,5,9 ) EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,9 ) EndIf // Condition #10 : A max positive, B max negitive A_12 := max_pos_12_bit_integer B_12 := max_neg_12_bit_integer // Test #1 : A = B If A_12 = B_12 do Failure ( 12,1,10 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_12 <> B_12 do Pass () Otherwise Failure ( 12,2,10 ) EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,10 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Failure ( 12,4,10 ) Otherwise Pass () EndIf // Test #5 : A > B If A_12 > B_12 do Pass () Otherwise Failure ( 12,5,10 ) EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,10 ) EndIf // Condition #11 : A and B min positive A_12 := min_pos_integer B_12 := min_pos_integer // Test #1 : A = B If A_12 = B_12 do Pass () Otherwise Failure ( 12,1,11 ) EndIf // Test #2 : A <> B If A_12 <> B_12 do Failure ( 12,2,11 ) Otherwise Pass () EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,11 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,11 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,11 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,11 ) EndIf // Condition #12 : A and B min negitive A_12 := min_neg_integer B_12 := min_neg_integer // Test #1 : A = B If A_12 = B_12 do Pass () Otherwise Failure ( 12,1,12 ) EndIf // Test #2 : A <> B If A_12 <> B_12 do Failure ( 12,2,12 ) Otherwise Pass () EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,12 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,12 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,12 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,12 ) EndIf // Condition #13 : A and B max positive A_12 := max_pos_12_bit_integer B_12 := max_pos_12_bit_integer // Test #1 : A = B If A_12 = B_12 do Pass () Otherwise Failure ( 12,1,13 ) EndIf // Test #2 : A <> B If A_12 <> B_12 do Failure ( 12,2,13 ) Otherwise Pass () EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,13 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,13 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,13 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,13 ) EndIf // Condition #14 : A and B max negitive A_12 := max_neg_12_bit_integer B_12 := max_neg_12_bit_integer // Test #1 : A = B If A_12 = B_12 do Pass () Otherwise Failure ( 12,1,14 ) EndIf // Test #2 : A <> B If A_12 <> B_12 do Failure ( 12,2,14 ) Otherwise Pass () EndIf // Test #3 : A < B If A_12 < B_12 do Failure ( 12,3,14 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_12 <= B_12 do Pass () Otherwise Failure ( 12,4,14 ) EndIf // Test #5 : A > B If A_12 > B_12 do Failure ( 12,5,14 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_12 >= B_12 do Pass () Otherwise Failure ( 12,6,14 ) EndIf TTY_line ( "16 Bit Arithmatic Comparison Tests" ) // 16 bit tests // Condition #1 : A and B zero A_16 := zero B_16 := zero // Test #1 : A = B If A_16 = B_16 do Pass () Otherwise Failure ( 16,1,1 ) EndIf // Test #2 : A <> B If A_16 <> B_16 do Failure ( 16,2,1 ) Otherwise Pass () EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,1 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,1 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,1 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,1 ) EndIf // Condition #2 : A zero, B min positive A_16 := zero B_16 := min_pos_integer // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,2 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,2 ) EndIf // Test #3 : A < B If A_16 < B_16 do Pass () Otherwise Failure ( 16,3,2 ) EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,2 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,2 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Failure ( 16,6,2 ) Otherwise Pass () EndIf // Condition #3 : A zero, B min negitive A_16 := zero B_16 := min_neg_integer // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,3 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,3 ) EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,3 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Failure ( 16,4,3 ) Otherwise Pass () EndIf // Test #5 : A > B If A_16 > B_16 do Pass () Otherwise Failure ( 16,5,3 ) EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,3 ) EndIf // Condition #4 : A and B small positive A_16 := min_pos_integer B_16 := min_pos_integer + 1 // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,4 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,4 ) EndIf // Test #3 : A < B If A_16 < B_16 do Pass () Otherwise Failure ( 16,3,4 ) EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,4 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,4 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Failure ( 16,6,4 ) Otherwise Pass () EndIf // Condition #5 : A and B large positive A_16 := max_pos_16_bit_integer B_16 := max_pos_16_bit_integer - 1 // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,5 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,5 ) EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,5 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Failure ( 16,4,5 ) Otherwise Pass () EndIf // Test #5 : A > B If A_16 > B_16 do Pass () Otherwise Failure ( 16,5,5 ) EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,5 ) EndIf // Condition #6 : A and B small negitive A_16 := min_neg_integer B_16 := min_neg_integer - 1 // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,6 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,6 ) EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,6 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Failure ( 16,4,6 ) Otherwise Pass () EndIf // Test #5 : A > B If A_16 > B_16 do Pass () Otherwise Failure ( 16,5,6 ) EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,6 ) EndIf // Condition #7 : A and B large negitive A_16 := max_neg_16_bit_integer B_16 := max_neg_16_bit_integer + 1 // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,7 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,7 ) EndIf // Test #3 : A < B If A_16 < B_16 do Pass () Otherwise Failure ( 16,3,7 ) EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,7 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,7 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Failure ( 16,6,7 ) Otherwise Pass () EndIf // Condition #8 : A min positive, B max positive A_16 := min_pos_integer B_16 := max_pos_16_bit_integer // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,8 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,8 ) EndIf // Test #3 : A < B If A_16 < B_16 do Pass () Otherwise Failure ( 16,3,8 ) EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,8 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,8 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Failure ( 16,6,8 ) Otherwise Pass () EndIf // Condition #9 : A min negitive, B max negitive A_16 := min_neg_integer B_16 := max_neg_16_bit_integer // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,9 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,9 ) EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,9 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Failure ( 16,4,9 ) Otherwise Pass () EndIf // Test #5 : A > B If A_16 > B_16 do Pass () Otherwise Failure ( 16,5,9 ) EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,9 ) EndIf // Condition #10 : A max positive, B max negitive A_16 := max_pos_16_bit_integer B_16 := max_neg_16_bit_integer // Test #1 : A = B If A_16 = B_16 do Failure ( 16,1,10 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_16 <> B_16 do Pass () Otherwise Failure ( 16,2,10 ) EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,10 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Failure ( 16,4,10 ) Otherwise Pass () EndIf // Test #5 : A > B If A_16 > B_16 do Pass () Otherwise Failure ( 16,5,10 ) EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,10 ) EndIf // Condition #11 : A and B min positive A_16 := min_pos_integer B_16 := min_pos_integer // Test #1 : A = B If A_16 = B_16 do Pass () Otherwise Failure ( 16,1,11 ) EndIf // Test #2 : A <> B If A_16 <> B_16 do Failure ( 16,2,11 ) Otherwise Pass () EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,11 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,11 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,11 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,11 ) EndIf // Condition #12 : A and B min negitive A_16 := min_neg_integer B_16 := min_neg_integer // Test #1 : A = B If A_16 = B_16 do Pass () Otherwise Failure ( 16,1,12 ) EndIf // Test #2 : A <> B If A_16 <> B_16 do Failure ( 16,2,12 ) Otherwise Pass () EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,12 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,12 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,12 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,12 ) EndIf // Condition #13 : A and B max positive A_16 := max_pos_16_bit_integer B_16 := max_pos_16_bit_integer // Test #1 : A = B If A_16 = B_16 do Pass () Otherwise Failure ( 16,1,13 ) EndIf // Test #2 : A <> B If A_16 <> B_16 do Failure ( 16,2,13 ) Otherwise Pass () EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,13 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,13 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,13 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,13 ) EndIf // Condition #14 : A and B max negitive A_16 := max_neg_16_bit_integer B_16 := max_neg_16_bit_integer // Test #1 : A = B If A_16 = B_16 do Pass () Otherwise Failure ( 16,1,14 ) EndIf // Test #2 : A <> B If A_16 <> B_16 do Failure ( 16,2,14 ) Otherwise Pass () EndIf // Test #3 : A < B If A_16 < B_16 do Failure ( 16,3,14 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_16 <= B_16 do Pass () Otherwise Failure ( 16,4,14 ) EndIf // Test #5 : A > B If A_16 > B_16 do Failure ( 16,5,14 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_16 >= B_16 do Pass () Otherwise Failure ( 16,6,14 ) EndIf TTY_line ( "32 Bit Arithmatic Comparison Tests" ) // 32 bit tests // Condition #1 : A and B zero A_32 := zero B_32 := zero // Test #1 : A = B If A_32 = B_32 do Pass () Otherwise Failure ( 32,1,1 ) EndIf // Test #2 : A <> B If A_32 <> B_32 do Failure ( 32,2,1 ) Otherwise Pass () EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,1 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,1 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,1 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,1 ) EndIf // Condition #2 : A zero, B min positive A_32 := zero B_32 := min_pos_integer // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,2 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,2 ) EndIf // Test #3 : A < B If A_32 < B_32 do Pass () Otherwise Failure ( 32,3,2 ) EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,2 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,2 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Failure ( 32,6,2 ) Otherwise Pass () EndIf // Condition #3 : A zero, B min negitive A_32 := zero B_32 := min_neg_integer // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,3 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,3 ) EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,3 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Failure ( 32,4,3 ) Otherwise Pass () EndIf // Test #5 : A > B If A_32 > B_32 do Pass () Otherwise Failure ( 32,5,3 ) EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,3 ) EndIf // Condition #4 : A and B small positive A_32 := min_pos_integer B_32 := min_pos_integer + 1 // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,4 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,4 ) EndIf // Test #3 : A < B If A_32 < B_32 do Pass () Otherwise Failure ( 32,3,4 ) EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,4 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,4 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Failure ( 32,6,4 ) Otherwise Pass () EndIf // Condition #5 : A and B large positive A_32 := max_pos_32_bit_integer B_32 := max_pos_32_bit_integer - 1 // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,5 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,5 ) EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,5 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Failure ( 32,4,5 ) Otherwise Pass () EndIf // Test #5 : A > B If A_32 > B_32 do Pass () Otherwise Failure ( 32,5,5 ) EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,5 ) EndIf // Condition #6 : A and B small negitive A_32 := min_neg_integer B_32 := min_neg_integer - 1 // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,6 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,6 ) EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,6 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Failure ( 32,4,6 ) Otherwise Pass () EndIf // Test #5 : A > B If A_32 > B_32 do Pass () Otherwise Failure ( 32,5,6 ) EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,6 ) EndIf // Condition #7 : A and B large negitive A_32 := max_neg_32_bit_integer B_32 := max_neg_32_bit_integer + 1 // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,7 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,7 ) EndIf // Test #3 : A < B If A_32 < B_32 do Pass () Otherwise Failure ( 32,3,7 ) EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,7 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,7 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Failure ( 32,6,7 ) Otherwise Pass () EndIf // Condition #8 : A min positive, B max positive A_32 := min_pos_integer B_32 := max_pos_32_bit_integer // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,8 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,8 ) EndIf // Test #3 : A < B If A_32 < B_32 do Pass () Otherwise Failure ( 32,3,8 ) EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,8 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,8 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Failure ( 32,6,8 ) Otherwise Pass () EndIf // Condition #9 : A min negitive, B max negitive A_32 := min_neg_integer B_32 := max_neg_32_bit_integer // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,9 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,9 ) EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,9 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Failure ( 32,4,9 ) Otherwise Pass () EndIf // Test #5 : A > B If A_32 > B_32 do Pass () Otherwise Failure ( 32,5,9 ) EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,9 ) EndIf // Condition #10 : A max positive, B max negitive A_32 := max_pos_32_bit_integer B_32 := max_neg_32_bit_integer // Test #1 : A = B If A_32 = B_32 do Failure ( 32,1,10 ) Otherwise Pass () EndIf // Test #2 : A <> B If A_32 <> B_32 do Pass () Otherwise Failure ( 32,2,10 ) EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,10 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Failure ( 32,4,10 ) Otherwise Pass () EndIf // Test #5 : A > B If A_32 > B_32 do Pass () Otherwise Failure ( 32,5,10 ) EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,10 ) EndIf // Condition #11 : A and B min positive A_32 := min_pos_integer B_32 := min_pos_integer // Test #1 : A = B If A_32 = B_32 do Pass () Otherwise Failure ( 32,1,11 ) EndIf // Test #2 : A <> B If A_32 <> B_32 do Failure ( 32,2,11 ) Otherwise Pass () EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,11 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,11 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,11 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,11 ) EndIf // Condition #12 : A and B min negitive A_32 := min_neg_integer B_32 := min_neg_integer // Test #1 : A = B If A_32 = B_32 do Pass () Otherwise Failure ( 32,1,12 ) EndIf // Test #2 : A <> B If A_32 <> B_32 do Failure ( 32,2,12 ) Otherwise Pass () EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,12 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,12 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,12 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,12 ) EndIf // Condition #13 : A and B max positive A_32 := max_pos_32_bit_integer B_32 := max_pos_32_bit_integer // Test #1 : A = B If A_32 = B_32 do Pass () Otherwise Failure ( 32,1,13 ) EndIf // Test #2 : A <> B If A_32 <> B_32 do Failure ( 32,2,13 ) Otherwise Pass () EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,13 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,13 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,13 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,13 ) EndIf // Condition #14 : A and B max negitive A_32 := max_neg_32_bit_integer B_32 := max_neg_32_bit_integer // Test #1 : A = B If A_32 = B_32 do Pass () Otherwise Failure ( 32,1,14 ) EndIf // Test #2 : A <> B If A_32 <> B_32 do Failure ( 32,2,14 ) Otherwise Pass () EndIf // Test #3 : A < B If A_32 < B_32 do Failure ( 32,3,14 ) Otherwise Pass () EndIf // Test #4 : A <= B If A_32 <= B_32 do Pass () Otherwise Failure ( 32,4,14 ) EndIf // Test #5 : A > B If A_32 > B_32 do Failure ( 32,5,14 ) Otherwise Pass () EndIf // Test #6 : A >= B If A_32 >= B_32 do Pass () Otherwise Failure ( 32,6,14 ) EndIf Out_string ( TTY, "Errors detected: " ) Out_integer ( TTY, error_count ) Out_record ( TTY ) EndModule