Course of Raku / Advanced / Testing and documentation 🆕 / Testing 🆕 / Exercises
Plan two checks
Problem
Write a test file that uses plan (not
done-testing) to state up front that it contains exactly
two checks. Make those checks:
- With
is-deeply, that sorting the list3, 1, 2gives[1, 2, 3]. - With
is, that10 % 3equals1.
Give each check a short description of your own.
Example
With the descriptions sorted and remainder,
the program prints:
1..2
ok 1 - sorted
ok 2 - remainder