PageRenderTime 28ms CodeModel.GetById 12ms app.highlight 14ms RepoModel.GetById 1ms app.codeStats 0ms

/xt/constantspm.t

http://github.com/PerlGameDev/SDL
Unknown | 64 lines | 58 code | 6 blank | 0 comment | 0 complexity | 8a0ea9a0250980077e6df7927b1f3bb0 MD5 | raw file
 1use strict;
 2use warnings;
 3use SDL::Events;
 4use Test::More; # use_ok + constants
 5
 6BEGIN { use_ok('SDL::Constants') }
 7
 8# 'use' should have imported all constants
 9
10is( SDL_GL_ACCUM_ALPHA_SIZE, 11, 'SDL_GL_ACCUM_ALPHA_SIZE should be imported' );
11is( SDL_GL_ACCUM_ALPHA_SIZE(), 11,
12	'SDL_GL_ACCUM_ALPHA_SIZE() should also be available'
13);
14is( SDL_GL_ACCUM_BLUE_SIZE, 10, 'SDL_GL_ACCUM_BLUE_SIZE should be imported' );
15is( SDL_GL_ACCUM_BLUE_SIZE(), 10,
16	'SDL_GL_ACCUM_BLUE_SIZE() should also be available'
17);
18is( SDL_GL_ACCUM_GREEN_SIZE, 9, 'SDL_GL_ACCUM_GREEN_SIZE should be imported' );
19is( SDL_GL_ACCUM_GREEN_SIZE(), 9,
20	'SDL_GL_ACCUM_GREEN_SIZE() should also be available'
21);
22is( SDL_GL_ACCUM_RED_SIZE, 8, 'SDL_GL_ACCUM_RED_SIZE should be imported' );
23is( SDL_GL_ACCUM_RED_SIZE(), 8,
24	'SDL_GL_ACCUM_RED_SIZE() should also be available'
25);
26is( SDL_GL_ALPHA_SIZE,    3, 'SDL_GL_ALPHA_SIZE should be imported' );
27is( SDL_GL_ALPHA_SIZE(),  3, 'SDL_GL_ALPHA_SIZE() should also be available' );
28is( SDL_GL_BLUE_SIZE,     2, 'SDL_GL_BLUE_SIZE should be imported' );
29is( SDL_GL_BLUE_SIZE(),   2, 'SDL_GL_BLUE_SIZE() should also be available' );
30is( SDL_GL_BUFFER_SIZE,   4, 'SDL_GL_BUFFER_SIZE should be imported' );
31is( SDL_GL_BUFFER_SIZE(), 4, 'SDL_GL_BUFFER_SIZE() should also be available' );
32is( SDL_GL_DEPTH_SIZE,    6, 'SDL_GL_DEPTH_SIZE should be imported' );
33is( SDL_GL_DEPTH_SIZE(),  6, 'SDL_GL_DEPTH_SIZE() should also be available' );
34is( SDL_GL_DOUBLEBUFFER,  5, 'SDL_GL_DOUBLEBUFFER should be imported' );
35is( SDL_GL_DOUBLEBUFFER(), 5,
36	'SDL_GL_DOUBLEBUFFER() should also be available'
37);
38is( SDL_GL_GREEN_SIZE,   1, 'SDL_GL_GREEN_SIZE should be imported' );
39is( SDL_GL_GREEN_SIZE(), 1, 'SDL_GL_GREEN_SIZE() should also be available' );
40is( SDL_GL_RED_SIZE,     0, 'SDL_GL_RED_SIZE should be imported' );
41is( SDL_GL_RED_SIZE(),   0, 'SDL_GL_RED_SIZE() should also be available' );
42is( SDL_GL_STENCIL_SIZE, 7, 'SDL_GL_STENCIL_SIZE should be imported' );
43is( SDL_GL_STENCIL_SIZE(), 7,
44	'SDL_GL_STENCIL_SIZE() should also be available'
45);
46
47is( SMPEG_ERROR,     -1, 'SMPEG_ERROR should be imported' );
48is( SMPEG_ERROR(),   -1, 'SMPEG_ERROR() should also be available' );
49is( SMPEG_PLAYING,   1,  'SMPEG_PLAYING should be imported' );
50is( SMPEG_PLAYING(), 1,  'SMPEG_PLAYING() should also be available' );
51is( SMPEG_STOPPED,   0,  'SMPEG_STOPPED should be imported' );
52is( SMPEG_STOPPED(), 0,  'SMPEG_STOPPED() should also be available' );
53
54is( SDL_SVG_FLAG_DIRECT, 0, 'SDL_SVG_FLAG_DIRECT should be imported' );
55is( SDL_SVG_FLAG_DIRECT(), 0,
56	'SDL_SVG_FLAG_DIRECT() should also be available'
57);
58is( SDL_SVG_FLAG_COMPOSITE, 1, 'SDL_SVG_FLAG_COMPOSITE should be imported' );
59is( SDL_SVG_FLAG_COMPOSITE(), 1,
60	'SDL_SVG_FLAG_COMPOSITE() should also be available'
61);
62
63done_testing();
64sleep(2);