Category Archives: C/C++

Refactor legacy C++ code for testing / working with private and protected methods

C++ has acquired capabilities related to inheritance throughout its rich history that are not available in high-level languages like C# or Java (although simplified design avoids issues like the diamond problem; however, the diamond problem can still occur with interfaces in Java. But our topic today is testing, not language design). These capabilities include multiple inheritance, public/protected/private inheritance… Read More »

Use C++ unit tests on MacOS

I’ve never written C/C++ code for macOS before, despite using macOS as my primary notebook for daily tasks. It was fascinating to explore how configuration options for header files and libraries work in this environment. As you may recall, in Visual Studio on Windows, you can use various tools to build projects, including the very powerful vcpkg. On… Read More »

C++ vcppkg: A First Look

When you create your application using C/C++, there are several options for working with external dependencies, such as libraries like: and so on. Some of the libraries, along with header files, are available for installation using a Linux package manager thus we typically do the following: In Linux package managers, development-related libraries often have -dev or -devel as… Read More »