zeroclickinfo-goodies/t/Base.t

29 lines
949 B
Perl
Raw Normal View History

2012-04-15 12:05:05 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'conversion';
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::Base
)],
2014-08-15 15:06:57 -07:00
'255 in hex' => test_zci('255 in base 16 is FF'),
'255 in base 16' => test_zci('255 in base 16 is FF'),
'42 in binary' => test_zci('42 in base 2 is 101010'),
'42 in base 2' => test_zci('42 in base 2 is 101010'),
'42 to hex', => test_zci('42 in base 16 is 2A'),
2014-08-15 15:52:08 -07:00
'10 in base 3' => test_zci('10 in base 3 is 101'),
2014-08-15 16:06:22 -07:00
'18442240474082181119 to hex' => test_zci('18442240474082181119 in base 16 is FFEFFFFFFFFFFFFF'),
'999999999999999999999999 to hex' => test_zci('999999999999999999999999 in base 16 is D3C21BCECCEDA0FFFFFF')
2012-04-15 12:05:05 -07:00
);
done_testing;