Chapter 12: Testing
Writing tests is an essential part of developing maintainable software applications. Tests ensure that a certain function that is implemented as part of the software works as expected in various scenarios. Proofing the software applications with tests ensures that the application works as expected. So, if there are any changes made to the core logic in the future or if you are extending the functionality, the existing tests scenarios will help you identify how the new changes affect the existing behavior.
In this chapter, we will cover the following topics:
- Introduction to tests in V
- Understanding
testsuite
functions - AAA pattern of writing tests
- Writing tests for functions with optional return types
- Approaches to writing and running tests
By the end of this chapter, you will know how to write tests for simple programs written in V and for programs that have modules. You will know different approaches to running tests and the benefit...