def test_SDL_WINDOWPOS_UNDEFINED_DISPLAY(self): for x in range(0xFFFF): self.assertEqual(video.SDL_WINDOWPOS_UNDEFINED_MASK | x, video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x)) self.assertEqual((video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x) & video.SDL_WINDOWPOS_UNDEFINED_MASK), video.SDL_WINDOWPOS_UNDEFINED_MASK) self.assertTrue( video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x) != video.SDL_WINDOWPOS_CENTERED_DISPLAY(x))
def test_SDL_WINDOWPOS_CENTERED_DISPLAY(self): centered_mask = video.SDL_WINDOWPOS_CENTERED_MASK for x in range(0xFFFF): centered = video.SDL_WINDOWPOS_CENTERED_DISPLAY(x) assert centered_mask | x == centered assert (centered & centered_mask) == centered_mask assert centered != video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x)
def test_SDL_WINDOWPOS_ISUNDEFINED(self): assert video.SDL_WINDOWPOS_ISUNDEFINED(video.SDL_WINDOWPOS_UNDEFINED) assert not video.SDL_WINDOWPOS_ISUNDEFINED( video.SDL_WINDOWPOS_CENTERED) for x in range(0xFFFF): undef = video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x) assert video.SDL_WINDOWPOS_ISUNDEFINED(undef)
def test_SDL_WINDOWPOS_UNDEFINED_DISPLAY(self): undef_mask = video.SDL_WINDOWPOS_UNDEFINED_MASK for x in range(0xFFFF): undef = video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x) assert undef_mask | x == undef assert (undef & undef_mask) == undef_mask assert undef != video.SDL_WINDOWPOS_CENTERED_DISPLAY(x)
def test_SDL_WINDOWPOS_ISUNDEFINED(self): self.assertTrue( video.SDL_WINDOWPOS_ISUNDEFINED(video.SDL_WINDOWPOS_UNDEFINED)) self.assertFalse( video.SDL_WINDOWPOS_ISUNDEFINED(video.SDL_WINDOWPOS_CENTERED)) for x in range(0xFFFF): self.assertTrue( video.SDL_WINDOWPOS_ISUNDEFINED( video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x)))