Testing colStats
Learn how to write the test cases for the colStats tool.
We'll cover the following...
We'll cover the following...
Updating the main_test.go file
In the main_test.go file, we add the package definition and the import section.
For these tests, we’ll use:
- The bytespackage to create buffers to capture the output.
- The errorspackage to verify errors.
- The ospackage to validate operating system errors.
- The testingpackage, which is required to execute tests.
package mainimport ("bytes""errors""os""testing")
Adding the package and import section
For the integration tests, we test the function ...