kevmoo / source_gen_test

Test APIs to make it easier to create robust test for package:source_gen Generators
https://pub.dev/packages/source_gen_test
MIT License
19 stars 10 forks source link

Add `node` field to `@ShouldThrow` #55

Open CodingSoot opened 1 year ago

CodingSoot commented 1 year ago

The latest source_gen version (1.4.0) added a node argument to InvalidGenerationSourceError to allow finding the source location from an AstNode over an Element.

Currently, the @ShouldThrow annotation doesn't have such field, so we can't test if a node was passed to InvalidGenerationSourceError.