Commit e0b735e
Append generated test macro so next test macros are aware of it
This way test macros following `#[rstest]` can decide whether or not to
generate test macro to avoid duplicate test runs.
It is an attempt to improve capabilities among test macros. Currently,
following test from [googletest](https://github.com/google/googletest-rust/blob/21f2948684847922a416252b8118e3eada8e29d6/integration_tests/src/google_test_with_rstest.rs#L52-L57)(`main` branch at 2025-01-16) will run twice.
```rust
#[rstest]
#[case(1)]
#[gtest]
fn paramterised_test_should_work_with_rstest_first(#[case] value: u32) -> Result<()> {
verify_that!(value, eq(value))
}
```
See: tokio-rs/tokio#6497, d-e-s-o/test-log#46, frondeus/test-case#143, kezhuw/stuck#53.
Refs: rust-lang/rust#67839, rust-lang/rust#82419.1 parent 154d0b0 commit e0b735e
3 files changed
+22
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
378 | 377 | | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
651 | | - | |
| 652 | + | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
| |||
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
672 | | - | |
| 673 | + | |
| 674 | + | |
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
| |||
886 | 888 | | |
887 | 889 | | |
888 | 890 | | |
| 891 | + | |
889 | 892 | | |
890 | | - | |
891 | | - | |
| 893 | + | |
| 894 | + | |
892 | 895 | | |
893 | 896 | | |
894 | 897 | | |
| |||
1213 | 1216 | | |
1214 | 1217 | | |
1215 | 1218 | | |
1216 | | - | |
1217 | | - | |
| 1219 | + | |
| 1220 | + | |
1218 | 1221 | | |
1219 | 1222 | | |
1220 | 1223 | | |
| |||
1370 | 1373 | | |
1371 | 1374 | | |
1372 | 1375 | | |
1373 | | - | |
1374 | | - | |
| 1376 | + | |
| 1377 | + | |
1375 | 1378 | | |
1376 | 1379 | | |
1377 | 1380 | | |
| |||
1434 | 1437 | | |
1435 | 1438 | | |
1436 | 1439 | | |
1437 | | - | |
1438 | | - | |
| 1440 | + | |
| 1441 | + | |
1439 | 1442 | | |
1440 | 1443 | | |
1441 | 1444 | | |
| |||
1926 | 1929 | | |
1927 | 1930 | | |
1928 | 1931 | | |
1929 | | - | |
1930 | | - | |
| 1932 | + | |
| 1933 | + | |
1931 | 1934 | | |
1932 | 1935 | | |
1933 | | - | |
| 1936 | + | |
1934 | 1937 | | |
1935 | 1938 | | |
1936 | 1939 | | |
| |||
1939 | 1942 | | |
1940 | 1943 | | |
1941 | 1944 | | |
1942 | | - | |
| 1945 | + | |
1943 | 1946 | | |
1944 | 1947 | | |
1945 | 1948 | | |
0 commit comments