about summary refs log tree commit diff
path: root/tests/ui/custom_test_frameworks
AgeCommit message (Collapse)AuthorLines
2025-04-01Address review comments.Nicholas Nethercote-3/+4
2025-04-01Ignore `#[test_case]` on anything other than `fn`/`const`/`static`.Nicholas Nethercote-1/+13
`expand_test_case` looks for any item with a `#[test_case]` attribute and adds a `test_path_symbol` attribute to it while also fiddling with the item's ident's span. This is pretty weird, because `#[test_case]` is only valid on `fn`/`const`/`static` items, as far as I can tell. But you don't currently get an error or warning if you use it on other kinds of items. This commit changes things so that a `#[test_case]` item is modified only if it is `fn`/`const`/`static`. This is relevant for moving idents from `Item` to `ItemKind`, because some item kinds don't have an ident, e.g. `impl` blocks. The commit also does the following. - Renames a local variable `test_id` as `test_ident`. - Changes a `const` to `static` in `tests/ui/custom_test_frameworks/full.rs` to give the `static` case some test coverage. - Adds a `struct` and `impl` to the same test to give some test coverage to the non-affected item kinds. These have a `FIXME` comment identifying the weirdness here. Hopefully this will be useful breadcrumbs for somebody else in the future.
2025-03-14Do not suggest using `-Zmacro-backtrace` for builtin macrosEsteban Küber-1/+0
For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-8/+8
2023-11-24Show number in error message even for one errorNilstrieb-1/+1
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-05-12Note base types of coercionMichael Goulet-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+132