...

/

Testing the Basic Word Counter

Testing the Basic Word Counter

Learn how to write test cases for the basic word counter app.

We'll cover the following...

Using Go lets us test our code automatically, without requiring external tools or frameworks. We’ll learn more about how to test our command-line applications throughout the course. Right now, let’s write a basic test for the word counter to ensure that it correctly counts the words in the given input.

Creating a test file

Let’s create a file called main_test.go ...