Skip to content

Instantly share code, notes, and snippets.

@toritori0318
Created May 16, 2010 16:00
Show Gist options
  • Save toritori0318/402957 to your computer and use it in GitHub Desktop.
Save toritori0318/402957 to your computer and use it in GitHub Desktop.
use Test::More ;
use FizzBuzz;
my $c = FizzBuzz->new;
is($c->say(1),1,"与えられた数字が1の時、1を返すこと");
is($c->say(2),2,"与えられた数字が2の時、2を返すこと");
# Fizz
is($c->say(3),"Fizz","与えられた数字が3の時、Fizzを返すこと");
is($c->say(9),"Fizz","与えられた数字が9の時、Fizzを返すこと");
# Buzz
is($c->say(5),"Buzz","与えられた数字が5の時、Buzzを返すこと");
# FizzBuzz
is($c->say(15),"FizzBuzz","与えられた数字が15の時、FizzBuzzを返すこと");
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment