-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uppercase and lowercase generated test function collide #108
Comments
For now in such cases we provide way to comment test cases. Comments replace usual test name generation. There's more info on wiki https://github.com/frondeus/test-case/wiki/Test-Names. |
The solution provided on #19 should resolve this problem, but I'm not sure about a scenario like:
Should it be accepted? From a library perspective, I don't see a reason for us to block it, but it would make tracing a bit more difficult. |
Hmm in that particular case:
Two tests cases with the same name would be translated to two functions
with the same name. And that would cause an error, right?
The question is - if the error message would be clear enough to the user of
test case. If not then probably we should check the uniqueness in our side
…On Wed, Jan 24, 2024, 04:36 Augusto Fotino ***@***.***> wrote:
The solution provided on #19
<#19> should resolve this
problem, but I'm not sure about a scenario like:
#[test_case('a')]
#[test_case('a')]
fn test (_: u32, _: char) {
}
Should it be accepted? From a library perspective, I don't see a reason
for us to block it, but it would make tracing a bit more difficult.
—
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI4UANBUEQA66CWEPWUV4DYQB6TTAVCNFSM6AAAAAASSVKG42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBXGI4TSMJRGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I see I am studying a way to refine the proposal I did on #19, but if we are considering that tests with the same name shouild not be accepted, then it makes things easier. |
Hello,
If you write tests like this, the generated function names will collide (
_a_expects
):I worked around it by adding an extra argument in front:
Maybe it would be easy to suffix the index of the test case to the generated name (
_a_expects_{}
).Thanks.
The text was updated successfully, but these errors were encountered: