diff options
Diffstat (limited to 'packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py')
-rw-r--r-- | packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py b/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py index 77ff07ea64884..2a53177d28aff 100644 --- a/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py +++ b/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py @@ -4,13 +4,14 @@ Test some SBValue APIs. from __future__ import print_function - - -import os, time +import os import re +import time + import lldb -import lldbsuite.test.lldbutil as lldbutil +from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil class ValueAPITestCase(TestBase): @@ -24,7 +25,7 @@ class ValueAPITestCase(TestBase): # Find the line number to of function 'c'. self.line = line_number('main.c', '// Break at this line') - @expectedFailureWindows("llvm.org/pr24772") + @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24772") @add_test_categories(['pyapi']) def test(self): """Exercise some SBValue APIs.""" @@ -133,3 +134,12 @@ class ValueAPITestCase(TestBase): val_a = target.EvaluateExpression('a') self.assertTrue(val_s.GetChildMemberWithName('a').AddressOf(), VALID_VARIABLE) self.assertTrue(val_a.Cast(val_i.GetType()).AddressOf(), VALID_VARIABLE) + + self.assertTrue(int(lldb.value(frame0.FindVariable('uinthex'))) == 3768803088, 'uinthex == 3768803088') + self.assertTrue(int(lldb.value(frame0.FindVariable('sinthex'))) == -526164208, 'sinthex == -526164208') + + self.assertTrue(frame0.FindVariable('uinthex').GetValueAsUnsigned() == 3768803088, 'unsigned uinthex == 3768803088') + self.assertTrue(frame0.FindVariable('sinthex').GetValueAsUnsigned() == 3768803088, 'unsigned sinthex == 3768803088') + + self.assertTrue(frame0.FindVariable('uinthex').GetValueAsSigned() == -526164208, 'signed uinthex == -526164208') + self.assertTrue(frame0.FindVariable('sinthex').GetValueAsSigned() == -526164208, 'signed sinthex == -526164208') |