February 2018
Intermediate to advanced
340 pages
9h 43m
English
The T struct of the testing package also provides the Run method that could be used to run the nested tests. The Run method requires the name of the subtest and the test function that will be executed. This approach could be beneficial while using, for example, the table driven tests. The code sample just uses a simple slice of int values as an input.
Read now
Unlock full access