This is the third part of the series. In this video I explore unit testing in Go by testing the linked list implementation from the previous video. I also build and unit test my queue and stack implementations by heavily leveraging the linked list implementation from the previous video.
First, I test our linked list implementation from last video using the driver application from the first video. Then I write exhaustive unit testing till there is 100% test coverage. In the process we learn how to run unit tests using the command line as well as VS Code. We also explore how to measure and visualize code coverage achieved by our unit testing.
Next, I go ahead and create my queue and stack implementations by heavily leveraging the linked list implementation from previous video. This allows us to see how composition, good encapsulation, and unit testing of multiple packages work in Go.
In the next video, I will dig deeper into inheritance and polymorphism in Go by building an implementation of the linked list that keeps elements sorted in their natural order.
Check out the code from this video series on Github here.