Skip to content

Commit ff05d26

Browse files
authored
[lldb][test] Move std::string_view from libcxx to generic directory (#147563)
This just moves the test from `libcxx` to `generic`. There are currently no `std::string_view` formatters for libstdc++ so I didn't add a test-case for it. Split out from #146740
1 parent 4be3e95 commit ff05d26

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CXX_SOURCES := main.cpp
2+
CXXFLAGS_EXTRAS := -std=c++17
3+
4+
include Makefile.rules
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from lldbsuite.test import lldbutil
1111

1212

13-
class LibcxxStringViewDataFormatterTestCase(TestBase):
13+
class StdStringViewDataFormatterTestCase(TestBase):
1414
def setUp(self):
1515
# Call super's setUp().
1616
TestBase.setUp(self)
@@ -20,16 +20,8 @@ def setUp(self):
2020
"main.cpp", "// Break here to look at bad string view."
2121
)
2222

23-
@add_test_categories(["libc++"])
24-
@expectedFailureAll(
25-
bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android"
26-
)
27-
# Inline namespace is randomly ignored as Clang due to broken lookup inside
28-
# the std namespace.
29-
@expectedFailureAll(debug_info="gmodules")
30-
def test_with_run_command(self):
23+
def do_test(self):
3124
"""Test that that file and class static variables display correctly."""
32-
self.build()
3325
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
3426

3527
lldbutil.run_break_set_by_file_and_line(
@@ -160,3 +152,14 @@ def cleanup():
160152

161153
broken_obj = self.frame().GetValueForVariablePath("in_str_view")
162154
self.assertEqual(broken_obj.GetSummary(), "Summary Unavailable")
155+
156+
@expectedFailureAll(
157+
bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android"
158+
)
159+
# Inline namespace is randomly ignored as Clang due to broken lookup inside
160+
# the std namespace.
161+
@expectedFailureAll(debug_info="gmodules")
162+
@add_test_categories(["libc++"])
163+
def test_libcxx(self):
164+
self.build(dictionary={"USE_LIBCPP": 1})
165+
self.do_test()

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/Makefile

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)