### ----------------------------------------------------
### -- Math::Roman
### -- Licenses: Artistic-2.0
### -- Authors: Itsuki Toyota
### -- File: t/01-basic.rakutest
### ----------------------------------------------------
use Test;
use Math::Roman;

is 1996R, "MCMXCVI";
is 10R, "X";
is 5R, "V";
is 1R, "I";
is 0R, "";

is 1000R + 996R, 1996;
is (1000R + 996R)R, "MCMXCVI";
is (1000R + 996R)R.as-arabic, 1996;

is 1996R.as-arabic, 1996;
is 10R.as-arabic, 10;
is 5R.as-arabic, 5;
is 1R.as-arabic, 1;
is 0R.as-arabic, 0;

is (Math::Roman.new: "MCMXCVI").as-arabic, 1996;

dies-ok { to-arabic("XXAA") }
dies-ok { to-roman(-1) }

done-testing;


