Skip to content

Instantly share code, notes, and snippets.

@wesjdj
Created May 1, 2013 17:19

Revisions

  1. wesjdj created this gist May 1, 2013.
    21 changes: 21 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    1 use 5.16.2;
    2 use warnings;
    3
    4 use Test::More tests => 10;
    5
    6 is to_roman(1), "I", "1 gets converted to I";
    7 is to_roman(2), "II", "2 gets converted to II";
    8 is to_roman(3), "III", "3 gets converted to III";
    9 is to_roman(4), "IV", "4 gets converted to IV";
    10 is to_roman(5), "V", "5 gets converted to V";
    11 is to_roman(6), "VI", "6 gets converted to VI";
    12 is to_roman(7), "VII", "7 gets converted to VII";
    13 is to_roman(8), "VIII", "8 gets converted to VIII";
    14 is to_roman(9), "IX", "9 gets converted to IX";
    15 is to_roman(10), "X", "10 gets converted to X";
    16
    17 sub to_roman {
    18 my ($number) = @_;
    19 return "III";
    20 }