I'm learning about testing and having some doubts regarding test cases. For example, I was trying to create a test suite, a set of test cases for a calculator program.
The program is basically like below, are presented a set of operations and then we can choose an operation to sum two values or subtract or whatever.
Enter + for Sum
Enter - for Subtraction
Enter * for Multiplication
and so on..
So I was trying to write a test case for this program. What I read about test cases is that we have all the input options the program have and then the outputs, so it should be something like below?
Inputs Outcome
10 + 10 20
20-10 10
30-50 -20
50*50 2500
50 * -1 -50
40/4 10
40/0 program stops
100 Mod 50 0
200 Mod 30 20
5! 120
-5! only positives
Do you know if this is the correct way to write test cases? There are other options in test suites, but in this case, I'm just interested in the input and output parts but I don't know if it is like this that we write test cases in terms of input and output.