<s> import py <EOL> from pypy . rlib . rsdl import RSDL <EOL> from pypy . rlib . rarithmetic import r_uint <EOL> from pypy . rpython . lltypesystem import rffi <EOL> def test_sdl_init ( ) : <EOL> assert RSDL . Init ( RSDL . INIT_VIDEO ) >= <NUM_LIT:0> <EOL> RSDL . Quit ( ) <EOL> def test_surface_basic ( ) : <EOL> assert RSDL . Init ( RSDL . INIT_VIDEO ) >= <NUM_LIT:0> <EOL> surface = RSDL . CreateRGBSurface ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:50> , <NUM_LIT:32> , <EOL> r_uint ( <NUM_LIT> ) , <EOL> r_uint ( <NUM_LIT> ) , <EOL> r_uint ( <NUM_LIT> ) , <EOL> r_uint ( <NUM_LIT> ) ) <EOL> assert surface <EOL> assert rffi . getintfield ( surface , '<STR_LIT>' ) == <NUM_LIT> <EOL> assert rffi . getintfield ( surface , '<STR_LIT>' ) == <NUM_LIT:50> <EOL> RSDL . FreeSurface ( surface ) <EOL> RSDL . Quit ( ) <EOL> def test_get_keyname ( ) : <EOL> assert RSDL . Init ( RSDL . INIT_VIDEO ) >= <NUM_LIT:0> <EOL> assert RSDL . GetKeyName ( RSDL . K_PLUS ) [ <NUM_LIT:0> ] == '<STR_LIT:+>' <EOL> assert RSDL . GetKeyName ( RSDL . K_RIGHTPAREN ) [ <NUM_LIT:0> ] == '<STR_LIT:)>' <EOL> assert RSDL . GetKeyName ( RSDL . K_z ) [ <NUM_LIT:0> ] == '<STR_LIT:z>' <EOL> def test_delay_getticks ( ) : <EOL> assert RSDL . Init ( RSDL . INIT_VIDEO ) >= <NUM_LIT:0> <EOL> RSDL . Delay ( <NUM_LIT:10> ) <EOL> i = RSDL . GetTicks ( ) <EOL> assert i >= <NUM_LIT:10> <EOL> RSDL . Quit ( ) </s>
