Arithmetic 2 unit Test

Source: Internet
Author: User

Arithmetic 2 unit Test

Through the study of the class, we understand the function and importance of unit test, and try to test the program of Arithmetic 2, and analyze the combination procedure of test cases in many groups.

Test Case 1:

The quantity and the number of printing methods are correct, the requirements for multipliers, negative numbers, remainder, brackets are also in line with expectations, and the initial results are correct.

Test Case 2:

The boundary conditions meet the requirements, the sub-values are within the required range and are not duplicated, and the multiplication negative remainder requirements are also expected.

Test Case 3:

Forcing an error condition that requires too many outputs and cannot be duplicated, all random numbers in the range of values are not met, but for multiplication, the remainder condition is different, resulting in different running results, exceeding the expected result (⊙o⊙).

Test Case 4:

The number of input requirements is empty, the input condition is wrong, some errors can be error, some programs error, need to improve, different from the expected.

Test Case 5:

The proof symbol arithmetic is random and does not repeat as expected.

Test Case 6:

The parentheses section is wrong, the program does not set the parentheses in the judgment, just a simple output does not work, the randomly generated operation does not include the parentheses operation, the same as expected, the parentheses to try multiple unsuccessful also affect other conditions, there is insufficient, the next correction.

Arithmetic 2 unit Test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.