Skip to content
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

subtest variants #858

Open
coke opened this issue Sep 4, 2024 · 2 comments · May be fixed by #859
Open

subtest variants #858

coke opened this issue Sep 4, 2024 · 2 comments · May be fixed by #859
Assignees

Comments

@coke
Copy link
Contributor

coke commented Sep 4, 2024

Raku/doc#4513

Subtest has several variants, not all of which are tested/used in roast.

From rakudo:

multi sub subtest(Pair $what)            is export { subtest($what.value,$what.key) }
multi sub subtest($desc, &subtests)      is export { subtest(&subtests,$desc)       }
multi sub subtest(&subtests, $desc = '') is export { ... }

@JJ noted that the Pair implementation in rakudo allows you to declare the pair in either direction, and because of the multis here, it eventually dispatches to the last variant regardless and so works either way.

Assuming this is meant to be spec, all variants should be tested (though it's fine to use one or the other stylistically in roast, need to verify that this works as intended) - Or, if this is not intended to work this way, we need to open a bug in Rakudo to enforce the ordering of the Pair

@JJ
Copy link
Contributor

JJ commented Sep 4, 2024

But Test is spec or simply a core module distributed with Rakudo?

@coke
Copy link
Contributor Author

coke commented Sep 4, 2024

My understanding is that it's part of the specification: https://github.com/Raku/roast/tree/master/S24-testing

@coke coke assigned coke and unassigned coke Sep 4, 2024
@JJ JJ self-assigned this Sep 4, 2024
JJ added a commit that referenced this issue Sep 4, 2024
@JJ JJ linked a pull request Sep 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants