diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-09-04 18:59:13 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-09-04 18:59:13 +0000 |
commit | 6eef8e01c7654acf417d3ad81fb6cb5cfc6edc2f (patch) | |
tree | afb7bcf88b0d95bf242e5d3a9ebf7299df1b7da4 /lldb/packages/Python/lldbsuite/test/python_api | |
parent | 24223eb24c74a116e1a3eb704d28e61454719a74 (diff) | |
download | bcm5719-llvm-6eef8e01c7654acf417d3ad81fb6cb5cfc6edc2f.tar.gz bcm5719-llvm-6eef8e01c7654acf417d3ad81fb6cb5cfc6edc2f.zip |
[Python] Implement __next__ for value_iter
Python 3 iteration calls the next() method instead of next() and
value_iter only implemented the Python 2 version.
Differential revision: https://reviews.llvm.org/D67184
llvm-svn: 370954
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py b/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py index d67905a50d0..bf8cbe34320 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py @@ -169,6 +169,13 @@ class ValueAPITestCase(TestBase): self.assertTrue(int(lldb.value(frame0.FindVariable('sinthex'))) == -526164208, 'sinthex == -526164208') + # Check value_iter works correctly. + for v in [ + lldb.value(frame0.FindVariable('uinthex')), + lldb.value(frame0.FindVariable('sinthex')) + ]: + self.assertTrue(v) + self.assertTrue( frame0.FindVariable('uinthex').GetValueAsUnsigned() == 3768803088, 'unsigned uinthex == 3768803088') |