Open nikomatsakis opened 2 years ago
@XFFXFF added the lru
option to tracked functions in https://github.com/salsa-rs/salsa/pull/352, but we should test that it cannot be used with specify
somehow.
https://github.com/dtolnay/trybuild.git
I found this crate useful and easy to use to test for compiling failures. I added a pr as an example to show how it works so you can see if this is the right way to go @nikomatsakis
We need to test all the various illegal macro options. As recommended by @XFFXFF, and demonstrated in #361, we are using the trybuild tool To add a new test, we simply add a file that contains an error, like this
https://github.com/salsa-rs/salsa/blob/8dfc578edc2c62cef84c49da247dc199b50740ae/salsa-2022-tests/tests/compile-fail/lru_can_not_be_used_with_specify.rs#L11-L14
You will also have to create a "stderr" file with the expected output. You don't have to do this by hand -- the workflow docs for trybuild explain how it works.