[pypy-svn] r62713 - in pypy/trunk/pypy/rlib/rsdl: . test

santagada at codespeak.net santagada at codespeak.net
Sat Mar 7 16:10:16 CET 2009


Author: santagada
Date: Sat Mar  7 16:10:14 2009
New Revision: 62713

Modified:
   pypy/trunk/pypy/rlib/rsdl/RSDL.py
   pypy/trunk/pypy/rlib/rsdl/test/test_basic.py
Log:
new GetTicks.

Modified: pypy/trunk/pypy/rlib/rsdl/RSDL.py
==============================================================================
--- pypy/trunk/pypy/rlib/rsdl/RSDL.py	(original)
+++ pypy/trunk/pypy/rlib/rsdl/RSDL.py	Sat Mar  7 16:10:14 2009
@@ -204,6 +204,10 @@
                             [rffi.INT],
                             rffi.INT)
 
+GetTicks         = external('SDL_GetTicks',
+                            [],
+                            Uint32)
+
 Delay            = external('SDL_Delay',
                             [Uint32],
                             lltype.Void)

Modified: pypy/trunk/pypy/rlib/rsdl/test/test_basic.py
==============================================================================
--- pypy/trunk/pypy/rlib/rsdl/test/test_basic.py	(original)
+++ pypy/trunk/pypy/rlib/rsdl/test/test_basic.py	Sat Mar  7 16:10:14 2009
@@ -28,3 +28,10 @@
     assert RSDL.GetKeyName(RSDL.K_RIGHTPAREN)[0] == ')'
     assert RSDL.GetKeyName(RSDL.K_z)[0] == 'z'
     
+def test_delay_getticks():
+    assert RSDL.Init(RSDL.INIT_VIDEO) >= 0
+    RSDL.Delay(10)
+    i = RSDL.GetTicks()
+    assert i >= 10
+    RSDL.Quit()
+    
\ No newline at end of file



More information about the Pypy-commit mailing list