Corso di Raku / Avanzato / Test e documentazione 🆕 / Test / Exercises / Un primo test

Soluzione: Un primo test

Ecco una possibile soluzione del compito.

Codice

use Test;

ok 'Raku'.chars == 4, 'Raku has four letters';

done-testing;

🦋 Puoi trovare il codice sorgente nel file a-first-test.raku.

Output

ok 1 - Raku has four letters
1..1

Commenti

  1. ok ha successo perché la condizione 'Raku'.chars == 4 è vera.

  2. done-testing emette la riga del piano 1..1, indicando che è stato eseguito un test.

Un primo test   |   Confrontare valori