PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/t/core_version.t

http://github.com/PerlGameDev/SDL
Perl | 27 lines | 24 code | 2 blank | 1 comment | 0 complexity | fb2731c776196ce9fda1a3595c86d527 MD5 | raw file
 1#!/usr/bin/perl -w
 2use strict;
 3use warnings;
 4use SDL;
 5use SDL::Version;
 6use Test::More tests => 8;
 7
 8my $version = SDL::version();
 9isa_ok( $version, 'SDL::Version' );
10like( $version->major, qr/^\d+$/, 'Compile-time version major is a number' );
11like( $version->minor, qr/^\d+$/, 'Compile-time version minor is a number' );
12like( $version->patch, qr/^\d+$/, 'Compile-time version patch is a number' );
13
14my $linked_version = SDL::linked_version();
15isa_ok( $linked_version, 'SDL::Version' );
16like(
17	$linked_version->major, qr/^\d+$/,
18	'Link-time version major is a number'
19);
20like(
21	$linked_version->minor, qr/^\d+$/,
22	'Link-time version minor is a number'
23);
24like(
25	$linked_version->patch, qr/^\d+$/,
26	'Link-time version patch is a number'
27);