File: core_version.t

package info (click to toggle)
libsdl-perl 2.548-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,972 kB
  • sloc: perl: 13,985; ansic: 583; makefile: 35
file content (27 lines) | stat: -rw-r--r-- 740 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl -w
use strict;
use warnings;
use SDL;
use SDL::Version;
use Test::More tests => 8;

my $version = SDL::version();
isa_ok( $version, 'SDL::Version' );
like( $version->major, qr/^\d+$/, 'Compile-time version major is a number' );
like( $version->minor, qr/^\d+$/, 'Compile-time version minor is a number' );
like( $version->patch, qr/^\d+$/, 'Compile-time version patch is a number' );

my $linked_version = SDL::linked_version();
isa_ok( $linked_version, 'SDL::Version' );
like(
	$linked_version->major, qr/^\d+$/,
	'Link-time version major is a number'
);
like(
	$linked_version->minor, qr/^\d+$/,
	'Link-time version minor is a number'
);
like(
	$linked_version->patch, qr/^\d+$/,
	'Link-time version patch is a number'
);