u/Weary-Inspector-4297

▲ 11 r/CSEducation+1 crossposts

Part 2: Modernizing a tiny C++ unit-testing framework after 25 years

Recently I shared Part 1 describing a tiny unit-testing framework I originally wrote around 2000 for teaching C++.

Part 2 finishes the series by modernizing the implementation using facilities that didn’t exist back then, including std::source_location and inline variables, while keeping the framework intentionally small.

This isn’t intended as a replacement for Catch2, GoogleTest, or doctest. Those solve much bigger problems. The point here is to explore how far modern C++ lets you go with very little code.

I’d be interested in comments from anyone who’s built testing infrastructure or has opinions about minimalist testing frameworks.

Part 2:
https://freshsources.com/code-capsules/test-part2/

Part 1:
https://freshsources.com/code-capsules/test-part1/

reddit.com
u/Weary-Inspector-4297 — 4 days ago
▲ 7 r/cpp

Automated Unit Testing On-The-Cheap

I recently revisited a tiny unit-testing framework I originally developed for teaching C++ students.

The goal was to strip testing down to the essentials: a single header file with macros for expression testing, exception verification, and source-location reporting.

Looking back at the design today is interesting because it predates features such as inline variables, modules, and std::source_location. In the article I walk through the implementation and discuss the limitations that Part 2 will address.

Feedback from people who have built or maintained test frameworks would be especially welcome.

freshsources.com
u/Weary-Inspector-4297 — 12 days ago
▲ 19 r/CSEducation+1 crossposts

When The C/C++ Users Journal Disappeared

I wrote a short historical look at the decline of the C/C++ Users Journal and how it fit into the broader evolution of developer culture in the 1990s and early 2000s. For many programmers of that era, it was one of the few consistent sources of deep systems‑level content.

If anyone here remembers the magazine, used it in school, or followed its transition into Dr. Dobb’s, I’d be interested in hearing your perspective. It was a surprisingly influential publication for a long time.

Link: https://freshsources.com/blog/files/cpp-source.html

reddit.com
u/Weary-Inspector-4297 — 24 days ago
▲ 90 r/cpp

How an MS-DOS picklist problem in 1991 became std::bitset -- by the author who proposed it

I served on the original ISO C++ Standards Committee (J16) and proposed std::bitset. I recently wrote up the story of how it came to be -- starting from a memory-constrained MS-DOS application, through the early days of templates, and into C++98.

I also touch on the parallel story of bitstring, which became vector<bool> and eventually boost::dynamic_bitset.

https://freshsources.com/blog/files/0efc66caabe2cb443a6acae6aca0f707-0.html

reddit.com
u/Weary-Inspector-4297 — 1 month ago

Free teaching resources for automata / formal languages (sample chapter + exercises)

I’ve published an undergraduate textbook, Foundations of Computing, covering automata, regular languages, context‑free grammars, pushdown automata, Turing machines, decidability, and computability.

I’ve posted a sample chapter, exercises, errata, and syllabi on GitHub:

https://github.com/chuckallison/foundations-of-computing

If any instructors would like a free instructor PDF, slides, or solutions, feel free to contact me.

u/Weary-Inspector-4297 — 2 months ago