Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
|
|
|
zci answer_type => 'roman_numeral_conversion';
|
2014-10-15 05:10:39 -07:00
|
|
|
zci is_cached => 1;
|
Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
|
|
|
|
ddg_goodie_test(
|
2014-10-15 05:10:39 -07:00
|
|
|
[qw( DDG::Goodie::Roman )],
|
|
|
|
'roman 155' => test_zci(
|
|
|
|
'CLV (roman numeral conversion)',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['155'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => 'CLV'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
"roman xii" => test_zci(
|
|
|
|
"12 (roman numeral conversion)",
|
|
|
|
structured_answer => {
|
|
|
|
input => ['XII'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => '12'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
"roman mmcml" => test_zci(
|
|
|
|
"2950 (roman numeral conversion)",
|
|
|
|
structured_answer => {
|
|
|
|
input => ['MMCML'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => '2950'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
"roman 2344" => test_zci(
|
|
|
|
"MMCCCXLIV (roman numeral conversion)",
|
|
|
|
structured_answer => {
|
|
|
|
input => ['2344'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => 'MMCCCXLIV'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
"arabic cccxlvi" => test_zci(
|
|
|
|
"346 (roman numeral conversion)",
|
|
|
|
structured_answer => {
|
|
|
|
input => ['CCCXLVI'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => '346'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'roman numeral MCCCXXXVII' => test_zci(
|
|
|
|
'1337 (roman numeral conversion)',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['MCCCXXXVII'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => '1337'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'roman 1337' => test_zci(
|
|
|
|
'MCCCXXXVII (roman numeral conversion)',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['1337'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => 'MCCCXXXVII'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'roman IV' => test_zci(
|
|
|
|
'4 (roman numeral conversion)',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['IV'],
|
|
|
|
operation => 'Roman numeral conversion',
|
|
|
|
result => '4'
|
|
|
|
}
|
|
|
|
),
|
Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode
2012-04-15 16:17:12 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|