Skip to content

subtest variants #858

@coke

Description

@coke

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions