Add `use test_case::test_case;` to CONTRIBUTING.md

I previously tried adding the #[test_case()] attribute macro and got
confused because the Rust compilation suddenly failed with:

    error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature

which is a quite confusing error message.  The solution is to just add
`use test_case::test_case;`, so this commit adds that line to the
example in CONTRIBUTING.md to spare others this source of confusion.
This commit is contained in:
Martin Fischer 2022-12-30 07:55:18 +01:00 committed by Charlie Marsh
parent b0bb75dc1c
commit e9ec2a7b36
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,8 @@ output, codify the behavior as a snapshot test by adding a new `testcase` macro
section of `src/linter.rs`, like so:
```rust
use test_case::test_case;
#[test_case(CheckCode::A001, Path::new("A001.py"); "A001")]
...
```