Skip to content

Instantly share code, notes, and snippets.

@tomcha
Created August 1, 2013 12:31
Show Gist options
  • Save tomcha/6130910 to your computer and use it in GitHub Desktop.
Save tomcha/6130910 to your computer and use it in GitHub Desktop.
# fizzbuzz.t
use strict;
use warnings;
use Test::More;
require_ok( 'fizzbuzz.pl' );
ok( &fizzbuzz(1) == 1,'1を与えたとき1を返す' );
is( &fizzbuzz(3) , 'Fizz' , '3を与えたときFizzを返す' );
is( &fizzbuzz(6) , 'Fizz' , '3の倍数を与えたときFizzを返す' );
is( &fizzbuzz(5) , 'Buzz' , '5を与えたときBuzzを返す' );
is( &fizzbuzz(10) , 'Buzz' , '5の倍数を与えたときをBuzzを返す' );
is( &fizzbuzz(15) , 'FizzBuzz' , '15の倍数を与えたときFizzBuzzを返す' );
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment