frondeus / frondeus/test-case

Uppercase and lowercase generated test function collide

Open
#108 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
633
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Hello,

If you write tests like this, the generated function names will collide (`_a_expects`):

```rust
#[test_case('a')]
#[test_case('A')]
fn test (_: char) {
}
```
I worked around it by adding an extra argument in front:
```rust
#[test_case(1, 'a')]
#[test_case(2, 'A')]
fn test (_: u32, _: char) {
}
```

Maybe it would be easy to suffix the index of the test case to the generated name (`_a_expects_{}`).

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.