How to comprehensively test the following code.
if(date_1 <= MAX_PROC_DATE && date_2 >= MIN_PROC_DATE){
// do some stuff
}
What should my test cases be? I figure with three possibilities for each comparison, there should be 9 total unique cases.
date_1 < MAX_PROC_DATE && date_2 > MIN_PROC_DATE
date_1 = MAX_PROC_DATE && date_2 > MIN_PROC_DATE
date_1 < MAX_PROC_DATE && date_2 = MIN_PROC_DATE
date_1 = MAX_PROC_DATE && date_2 = MIN_PROC_DATE
date_1 > MAX_PROC_DATE && date_2 > MIN_PROC_DATE
date_1 < MAX_PROC_DATE && date_2 < MIN_PROC_DATE
date_1 > MAX_PROC_DATE && date_2 < MIN_PROC_DATE
date_1 = MAX_PROC_DATE && date_2 < MIN_PROC_DATE
date_1 > MAX_PROC_DATE && date_2 = MIN_PROC_DATE
Could some of these be combined? Like does Test case 4 cover test cases 2 and 3 for testing that the program recognizes when the dates are equal? Please let me know your thoughts. Thanks!