Chapter 1 Self-Test
Test A small triangle type.ProgramThe program reads three integers from the dialog box, representing the three sides of the length, output the type of the triangle, that is, not equal side, equal waist, equilateral triangle.
The book should include the following points:
- There is a test case that forms a valid Non-equi triangle.
- There is a test case that forms a valid equi triangle.
- There is a test case that forms a valid isosceles triangle.
- At least three test cases are a legal arrangement of the three sides of the isosceles triangle (such as 3, 3, 4; 3, 3; 4, 3, 4, 3, 4, 3 ).
- There is a test case with one side being 0.
- There is a negative test case.
- The three sides of a test case are positive numbers, and the sum of the two sides is equal to the third side.
- At least three test cases are in the full arrangement of 7th.
- The three sides of a test case are positive numbers, and the sum of the two sides is smaller than the third side.
- At least three test cases are in the full arrangement of 9th.
- There is a test case where all three sides are 0.
- At least one test case contains non-integer values.
- One test case provides less than or more than three numbers.
- Each test case should have an expected output relative to the input.
I did not consider 4, 8, 10, and 14, but two more than the average (7, 8) of professional programmers, but I also thought that the input is not a number, it seems that I have a little understanding about testing :)