X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcore_ttf.t;h=b59926ddd743e6422c6740dcacc2673fa448d7a0;hb=HEAD;hp=9b8a22f38ce853c18b135750ca2502e6c906ef6e;hpb=b41abbd6015ec5d9bba526df08193b1deb14c2ec;p=sdlgit%2FSDL_perl.git diff --git a/t/core_ttf.t b/t/core_ttf.t index 9b8a22f..b59926d 100644 --- a/t/core_ttf.t +++ b/t/core_ttf.t @@ -20,13 +20,14 @@ SDL::TTF_Init(); my $ttf_font = SDL::TTF_OpenFont( 'test/data/aircut3.ttf', 12 ); isa_ok( $ttf_font, 'SDL::TTF_Font' ); my ( $w, $h ) = @{ SDL::TTF_SizeText( $ttf_font, 'Hello!' ) }; -is( $w, 27, '"Hello!" has width 27' ); -is( $h, 14, '"Hello!" has width 14' ); +is( ($w == 27) || ($w == 28), 1, '"Hello!" has width 27' ); +is( ($h == 14) || ($h == 15), 1, '"Hello!" has width 14' ); my $surface = SDL::TTF_RenderText_Blended( $ttf_font, 'Hello!', SDL::Color->new( 255, 0, 0 ) ); isa_ok( $surface, 'SDL::Surface' ); -is( $surface->w, 27, 'Surface has width 27' ); -is( $surface->h, 14, 'Surface has width 14' ); +($w,$h) = ( $surface->w, $surface->h) ; +is( ($w == 27) || ($w == 28), 1 ,'Surface has width 27' ); +is( ($h == 14) || ($h == 15), 1, 'Surface has width 14' ); SDL::TTF_Quit();