Exemplo n.º 1
0
 def test_SDL_WINDOWPOS_CENTERED_DISPLAY(self):
     for x in range(0xFFFF):
         self.assertEqual(video.SDL_WINDOWPOS_CENTERED_MASK | x,
                          video.SDL_WINDOWPOS_CENTERED_DISPLAY(x))
         self.assertEqual((video.SDL_WINDOWPOS_CENTERED_DISPLAY(x)
                           & video.SDL_WINDOWPOS_CENTERED_MASK),
                          video.SDL_WINDOWPOS_CENTERED_MASK)
         self.assertTrue(
             video.SDL_WINDOWPOS_CENTERED_DISPLAY(x) !=
             video.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x))
Exemplo n.º 2
0
 def test_SDL_WINDOWPOS_ISCENTERED(self):
     assert video.SDL_WINDOWPOS_ISCENTERED(video.SDL_WINDOWPOS_CENTERED)
     assert not video.SDL_WINDOWPOS_ISCENTERED(
         video.SDL_WINDOWPOS_UNDEFINED)
     for x in range(0xFFFF):
         centered = video.SDL_WINDOWPOS_CENTERED_DISPLAY(x)
         assert video.SDL_WINDOWPOS_ISCENTERED(centered)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 def test_SDL_WINDOWPOS_ISCENTERED(self):
     self.assertTrue(
         video.SDL_WINDOWPOS_ISCENTERED(video.SDL_WINDOWPOS_CENTERED))
     self.assertFalse(
         video.SDL_WINDOWPOS_ISCENTERED(video.SDL_WINDOWPOS_UNDEFINED))
     for x in range(0xFFFF):
         self.assertTrue(
             video.SDL_WINDOWPOS_ISCENTERED(
                 video.SDL_WINDOWPOS_CENTERED_DISPLAY(x)))