Home
last modified time | relevance | path

Searched refs:SomeInts (Results 1 – 2 of 2) sorted by relevance

/external/python/cpython2/Lib/ctypes/test/
Dtest_structures.py262 class SomeInts(Structure): class
266 self.assertEqual(SomeInts((1, 2)).a[:], [1, 2, 0, 0])
267 self.assertEqual(SomeInts((1, 2)).a[::], [1, 2, 0, 0])
268 self.assertEqual(SomeInts((1, 2)).a[::-1], [0, 0, 2, 1])
269 self.assertEqual(SomeInts((1, 2)).a[::2], [1, 0])
270 self.assertEqual(SomeInts((1, 2)).a[1:5:6], [2])
271 self.assertEqual(SomeInts((1, 2)).a[6:4:-1], [])
272 self.assertEqual(SomeInts((1, 2, 3, 4)).a[:], [1, 2, 3, 4])
273 self.assertEqual(SomeInts((1, 2, 3, 4)).a[::], [1, 2, 3, 4])
276 self.assertRaises(RuntimeError, SomeInts, (1, 2, 3, 4, 5))
/external/python/cpython3/Lib/ctypes/test/
Dtest_structures.py272 class SomeInts(Structure): class
276 self.assertEqual(SomeInts((1, 2)).a[:], [1, 2, 0, 0])
277 self.assertEqual(SomeInts((1, 2)).a[::], [1, 2, 0, 0])
278 self.assertEqual(SomeInts((1, 2)).a[::-1], [0, 0, 2, 1])
279 self.assertEqual(SomeInts((1, 2)).a[::2], [1, 0])
280 self.assertEqual(SomeInts((1, 2)).a[1:5:6], [2])
281 self.assertEqual(SomeInts((1, 2)).a[6:4:-1], [])
282 self.assertEqual(SomeInts((1, 2, 3, 4)).a[:], [1, 2, 3, 4])
283 self.assertEqual(SomeInts((1, 2, 3, 4)).a[::], [1, 2, 3, 4])
286 self.assertRaises(RuntimeError, SomeInts, (1, 2, 3, 4, 5))