关于[Testing an incremental generator with snapshot testing: Creating a source generator - Part 2]的摘要:
In my previous post, I showed in detail how to create a source generator, but I missed out one very important step: testing. In this post I describe one of the ways I like to test my source generators, by running the source generator manually against a known string and evaluating the output. Snapshot testing provides a great way to ensure your generator keeps working, and in this post I use the excellent Verify library.