Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(158561)

Delta Between Two Patch Sets: Lib/ctypes/test/test_returnfuncptrs.py

Issue 23670: Modifications to support iOS as a development platform
Left Patch Set: Created 3 years, 9 months ago
Right Patch Set: Created 3 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/ctypes/test/test_refcounts.py ('k') | Lib/ctypes/test/test_slicing.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(Both sides are equal)
1 import unittest 1 import unittest
2 from ctypes import * 2 from ctypes import *
3 import os 3 import os
4 4
5 import _ctypes_test 5 import _ctypes_test
6 6
7 class ReturnFuncPtrTestCase(unittest.TestCase): 7 class ReturnFuncPtrTestCase(unittest.TestCase):
8 8
9 def test_with_prototype(self): 9 def test_with_prototype(self):
10 # The _ctypes_test shared lib/dll exports quite some functions for testi ng. 10 # The _ctypes_test shared lib/dll exports quite some functions for testi ng.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 # which denotes a function name and a dll: 58 # which denotes a function name and a dll:
59 strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)( 59 strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(
60 BadSequence(("my_strchr", CDLL(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE']))))) 60 BadSequence(("my_strchr", CDLL(getattr(_ctypes_test, '__file__', os.environ['TEST_EXECUTABLE'])))))
61 self.assertTrue(strchr(b"abcdef", b"b"), "bcdef") 61 self.assertTrue(strchr(b"abcdef", b"b"), "bcdef")
62 self.assertEqual(strchr(b"abcdef", b"x"), None) 62 self.assertEqual(strchr(b"abcdef", b"x"), None)
63 self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0) 63 self.assertRaises(ArgumentError, strchr, b"abcdef", 3.0)
64 self.assertRaises(TypeError, strchr, b"abcdef") 64 self.assertRaises(TypeError, strchr, b"abcdef")
65 65
66 if __name__ == "__main__": 66 if __name__ == "__main__":
67 unittest.main() 67 unittest.main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+