2 Test lldb data formatter subsystem.
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class TestDataFormatterLibcxxQueue(TestBase):
15 mydir = TestBase.compute_mydir(__file__)
19 ns = 'ndk' if lldbplatformutil.target_is_android() else ''
20 self.namespace = 'std::__' + ns + '1'
22 def check_variable(self, name):
23 var = self.frame().FindVariable(name)
24 self.assertTrue(var.IsValid())
26 queue = self.namespace + '::queue'
27 self.assertTrue(queue in var.GetTypeName())
28 self.assertEqual(var.GetNumChildren(), 5)
30 ch = var.GetChildAtIndex(i)
31 self.assertTrue(ch.IsValid())
32 self.assertEqual(ch.GetValueAsSigned(), i+1)
34 @expectedFailureAll(bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android")
35 @add_test_categories(["libc++"])
37 """Test that std::queue is displayed correctly"""
39 lldbutil.run_to_source_breakpoint(self, '// break here',
40 lldb.SBFileSpec("main.cpp", False))
42 self.check_variable('q1')
43 self.check_variable('q2')