You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted here, it would be nice to add tests for checking error messages got from procedural macros during compilation time. Since they are visible to users, it's important to keep them readable, predictable and stable between versions.
An example of an error message from a macro in compile time:
There is no easy way to run tests in compile time using conventional [test] attributes. However, I've found a nice package called trybuild from @dtolnay, author of syn and quote. The package tries to compile test programs and matches the output against predefined .stderr files, which looks like exactly what is needed here.
I can take a closer look on that package and then incorporate it in structopt testing infrastructure.
The text was updated successfully, but these errors were encountered:
As noted here, it would be nice to add tests for checking error messages got from procedural macros during compilation time. Since they are visible to users, it's important to keep them readable, predictable and stable between versions.
An example of an error message from a macro in compile time:
There is no easy way to run tests in compile time using conventional
[test]
attributes. However, I've found a nice package called trybuild from @dtolnay, author ofsyn
andquote
. The package tries to compile test programs and matches the output against predefined.stderr
files, which looks like exactly what is needed here.I can take a closer look on that package and then incorporate it in
structopt
testing infrastructure.The text was updated successfully, but these errors were encountered: