This patch implements a test mechanism for the PPCallbacks mechanism that I've added to the existing tests. It's based on creating a derivation of PPCallbacks that records information passed to each callback in a high-level string format, for later comparison against an array of expected patterns. It allows testing of both the callback order as well as the callback argument content.
This patch provides the basic mechanism, but only implements two new test functions using it, for just the macro-based and conditional-based callbacks, as a proof of concept. If you approve this basic mechanism, I will add additional tests covering other callbacks and situations in subsequent patches.