Course of Raku / Advanced / Testing and documentation 🆕 / Testing 🆕 / Exercises / Compare values

Solution: Compare values

Here is a possible solution to the task.

Code

use Test;

is 'a'.uc, 'A', 'uppercase';

done-testing;

🦋 You can find the source code in the file compare-values.raku.

Output

ok 1 - uppercase
1..1

Comments

  1. is compares the actual value 'a'.uc with the expected 'A'.

  2. They match, so the test passes; on failure, is would print both values.

Course navigation

Compare values   |   Plan two checks