Go Testing and Benchmarking

Check your understanding of Go’s testing framework and benchmarking tools.

1. What is the required file name suffix for Go test files?
2. Which of the following types are used in Go testing and benchmarking?
3. Benchmark functions in Go must start with the prefix 'Benchmark'.
4. What is the base command to run tests in a Go package?
5. What is the required prefix for a test function in Go?
6. Which of the following methods can be used to indicate a test failure in Go?
7. The *testing.B type is used for writing unit tests.
8. What flag is passed to 'go test' to execute benchmark functions?
9. Which flag is used with 'go test' to run a specific test by name?
10. Which methods of *testing.B are used to control benchmark timing?
Answered 0 of 0 — 0 correct