The literature on testing includes thousands of printed books and millions of words of blog posts.
In every mainstream programming language, there are dozens of software packages intended for test construction, some with a great deal of theory, and the field seems to attract more than a few prophets with cult-like followings.
The second, the subject of this chapter, is testing.
Testing, by which we implicitly mean automated testing, is the practice of writing small programs that check that the code under test (the production code) behaves as expected for certain inputs, which are usually either carefully chosen to exercise certain features or randomized to ensure broad coverage. The task of testing occupies all programmers some of the time and some programmers all of the time.
Preview has quite a few features often only found in commercial PDF software, like the ability to drag and drop pages between documents, page extraction, encryption, and text annotation.
Download The Go Programming Language is the authoritative resource for any programmer who wants to learn Go.
It shows how to write clear and idiomatic Go to solve real-world problems.
In practice, writing test code is not much different from writing the original program itself.
We write short functions that focus on one part of the task.Two techniques in particular stand out for their effectiveness.The first is routine peer review of programs before they are deployed.Adobe's free PDF reader has long been a standard for handling its extremely popular document format, but you aren't limited to using it to view your PDF files.