Practical Testing

Practical Testing: 1 - Introduction

I’m writing some blog entries that show how to write tests for non trivial pieces of code. This is part 1. The code that we’re going to test is CCallbackTimer. This is a class that lives in our Win32Tools library. It’s used by users of our SocketTools library. The class provides a very light-weight timer manager that gets around the various issues we had with using standard Win32 timers. The timer is designed to be used in vast quantities.

Practical Testing

One of the common complaints about TDD and unit testing that I see is that the examples used aren’t real. People often say that the examples used are toys and that writing such tests adds little or no value. To be honest, I often find myself agreeing with them. Last updated 25th April 2023 41 - GoogleTest - Moving to GoogleTest. One of the problems of adding unit tests to an existing code-base or driving a new project with TDD is deciding exactly where to spend your testing efforts.