Over the past few years, I’ve had the chance to work on a number of features in .NET that take a dependency on source generators. In that time, I’ve had the chance to refine the strategy that I use to verify the validity of those source generators at both compile-time and run-time. In this blog post, I’ll walk through the gist of the test setup that I use and how it has evolved over time.