Skip to content

Conversation

@rroelke
Copy link
Member

@rroelke rroelke commented Jan 23, 2026

This is a follow-up to #5725 which added the INTERCEPT capability to inject essentially arbitrary code into pre-defined points in the execution of the core library (when enabled by the feature, of course).

This pull request uses this new capability to replace an older class whose goal was quite similar: the UnitTestConfig. This class was a singleton with some predefined parameters which could be set by unit tests and then checked in-line by the library code in order to simulate specific behaviors. Based on its broad inclusion in test sources, this class probably used to do more than it does now; as of this writing it has just one parameter which is used in one place.

This is an excellent use case for interception since we can move the test parameter exclusively into the test code, with the library code just intercepting relevant variables from its stack frame. So, this pull request replaces the old with the new.


TYPE: NO_HISTORY
DESC: replace UnitTestConfig with INTERCEPT

@rroelke rroelke merged commit dc0f944 into main Jan 23, 2026
59 checks passed
@rroelke rroelke deleted the rr/unit-test-intercepts-replace-UnitTestConfig branch January 23, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants