Unitary

A unit test is a function that tests a specific piece of code in a program or package. The job of unit tests is to verify the accuracy of an application.

Usually tests are written in separate files from the main program. However, in these tutorials, we're going to put everything in the same file for easy viewing.

To run the test file on the side, type:


> go test -v

// Output:
=== RUN   TestAdd
--- PASS: TestAdd (0.00s)
PASS
ok      ./math 1.410s
                        
unit.go