As a new year starts I generally have some long awaited cleanup to do on my C/C++ single header libraries. Maybe I need to update the CI scripts because they are out of date, maybe I have some features I want to add, or maybe I want to test more things.

For those that do not know I have six main libraries that I maintain that are single header and work across C/C++:

  • ๐Ÿงช utest.h - a single header unit testing framework that supports C and C++.
  • โฑ๏ธ ubench.h - a single header unit benchmarking framework that supports C and C++.
  • ๐Ÿ“š utf8.h - a single header UTF-8 string implementation supporting header for C and C++.
  • ๐Ÿ—„๏ธ json.h - a single header JSON parsing and writing header that supports JSON5 and simplified-JSON, and works with C and C++.
  • ๐Ÿœ subprocess.h - a single header process spawning, joining, and interacting with library for C and C++.
  • #๏ธโƒฃ hashmap.h - a single header hashmap implementation for C and C++.

So what have I done in this new year cleanup?

utest.h

In my unit testing framework utest.h I’ve:

ubench.h

In my benchmarking framework ubench.h I’ve added sanitizers. No bugs in the code were found, but its nice to have extra checks for future changes.

utf8.h

In my UTF-8 string header utf8.h I’ve added sanitizers. I found one wee bug in my unit tests where a constexpr test was going out of bounds.

hashmap.h

In my single header hashmap library hashmap.h I’ve also added sanitizers. No bugs in the code were found.