Skip to content

Commit 19ca79f

Browse files
committed
Update changelog, try fixing timer tests
1 parent c962099 commit 19ca79f

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Thanks to everyone else for their assistance, support, fixes and improvements:
1414
* Andreas Schiefer
1515
* Bao "Mantle" Rong
1616
* Ben Greiner
17+
* benrg
1718
* Bil Bas
1819
* Dan McCombs
1920
* David Farler

doc/news.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Fixed Bugs:
5151
* Updated ``sdl2.dll.version`` to better handle SDL2's new versioning format
5252
and fixed unit tests accordingly (issue #228).
5353
* Fixed various unit tests on big-endian platforms (PR #232).
54+
* Fixed 32-bit wraparound behaviour for ``SDL_TICKS_PASSED`` (PR #235).
5455

5556

5657
0.9.11

sdl2/test/timer_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
long = int
88

99

10+
def test_SDL_TICKS_PASSED(with_sdl):
11+
for A in (0, 9999, 0xFFFF0000, 0xFFFFFFFF):
12+
assert sdl2.SDL_TICKS_PASSED(A, A)
13+
for delta in (1, 100, 1000000, 0x7FFFFFFF):
14+
assert sdl2.SDL_TICKS_PASSED(A, (A - delta) & 0xFFFFFFFF)
15+
assert not sdl2.SDL_TICKS_PASSED(A, (A + delta) & 0xFFFFFFFF)
16+
1017
def test_SDL_GetTicks(with_sdl):
1118
ticks = sdl2.SDL_GetTicks()
1219
time.sleep(0.05)
@@ -71,10 +78,3 @@ def timerfunc(interval, param):
7178
assert len(calls) == orig_calls
7279
# Wait a bit, so the last executing handlers can finish
7380
sdl2.SDL_Delay(10)
74-
75-
def test_SDL_TICKS_PASSED(with_sdl):
76-
for A in (0, 9999, 0xFFFF0000, 0xFFFFFFFF):
77-
assert sdl2.SDL_TICKS_PASSED(A, A)
78-
for delta in (1, 100, 1000000, 0x7FFFFFFF):
79-
assert sdl2.SDL_TICKS_PASSED(A, (A - delta) & 0xFFFFFFFF)
80-
assert not sdl2.SDL_TICKS_PASSED(A, (A + delta) & 0xFFFFFFFF)

0 commit comments

Comments
 (0)