Skip to content

Commit 719826d

Browse files
authored
[LLDB] Run MSVC STL optional test with PDB (#171486)
Similar to the other PRs, this runs the `std::optional` test with PDB. Since we don't know that variables use typedefs, we check for the full name when testing PDB.
1 parent cc25ac4 commit 719826d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/optional/TestDataFormatterGenericOptional.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66

77
class GenericOptionalDataFormatterTestCase(TestBase):
8+
TEST_WITH_PDB_DEBUG_INFO = True
9+
810
def do_test_with_run_command(self):
911
"""Test that that file and class static variables display correctly."""
1012

@@ -55,7 +57,11 @@ def cleanup():
5557
self.expect(
5658
"frame var numbers",
5759
substrs=[
58-
"(optional_int_vect) numbers = Has Value=true {",
60+
(
61+
"(std::optional<std::vector<int, std::allocator<int>>>) numbers = Has Value=true {"
62+
if self.getDebugInfo() == "pdb"
63+
else "(optional_int_vect) numbers = Has Value=true {"
64+
),
5965
"Value = size=4 {",
6066
"[0] = 1",
6167
"[1] = 2",
@@ -69,7 +75,11 @@ def cleanup():
6975
self.expect(
7076
"frame var ostring",
7177
substrs=[
72-
"(optional_string) ostring = Has Value=true {",
78+
(
79+
"(std::optional<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>) ostring = Has Value=true {"
80+
if self.getDebugInfo() == "pdb"
81+
else "(optional_string) ostring = Has Value=true {"
82+
),
7383
'Value = "hello"',
7484
"}",
7585
],

0 commit comments

Comments
 (0)