Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


class TestCase(TestBase):
TEST_WITH_PDB_DEBUG_INFO = True

def do_test(self):
"""Test `frame variable` output for `std::shared_ptr` types."""
(_, process, _, bkpt) = lldbutil.run_to_source_breakpoint(
Expand Down Expand Up @@ -62,7 +64,7 @@ def do_test(self):
valobj = self.expect_var_path("sp_user", type="std::shared_ptr<User>")
self.assertRegex(
valobj.summary,
"element_type @ 0x0*[1-9a-f][0-9a-f]+( strong=1)? weak=0",
f"{'User' if self.getDebugInfo() == 'pdb' else 'element_type'} @ 0x0*[1-9a-f][0-9a-f]+( strong=1)? weak=0",
)
self.assertNotEqual(valobj.child[0].unsigned, 0)

Expand All @@ -77,7 +79,15 @@ def do_test(self):
self.assertEqual(str(valobj), '(User) *pointer = (id = 30, name = "steph")')

self.expect_var_path("sp_user->id", type="int", value="30")
self.expect_var_path("sp_user->name", type="std::string", summary='"steph"')
self.expect_var_path(
"sp_user->name",
type=(
"std::basic_string<char, std::char_traits<char>, std::allocator<char>>"
if self.getDebugInfo() == "pdb"
else "std::string"
),
summary='"steph"',
)

valobj = self.expect_var_path(
"si", type="std::shared_ptr<int>", summary="47 strong=2 weak=0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@


class TestCase(TestBase):
TEST_WITH_PDB_DEBUG_INFO = True

def do_test(self):
"""Test `frame variable` output for `std::unique_ptr` types."""

Expand Down Expand Up @@ -84,7 +86,15 @@ def do_test(self):
self.assertNotEqual(valobj.child[0].unsigned, 0)

self.expect_var_path("up_user->id", type="int", value="30")
self.expect_var_path("up_user->name", type="std::string", summary='"steph"')
self.expect_var_path(
"up_user->name",
type=(
"std::basic_string<char, std::char_traits<char>, std::allocator<char>>"
if self.getDebugInfo() == "pdb"
else "std::string"
),
summary='"steph"',
)

self.runCmd("settings set target.experimental.use-DIL true")
self.expect_var_path("ptr_node->value", value="1")
Expand Down
Loading