Skip to content

Commit 2228405

Browse files
committed
[lldb][test] Consolidate libstdc++ and libc++ vector formatter tests into generic test
The libstdc++ test was a subset of the tests in libc++. This test moves the libc++ test into `generic` and removes the `libstdc++` tests. I retained the `-D_GLIBCXX_DEBUG` test cases though. Split out from llvm#146740
1 parent 6eff73a commit 2228405

File tree

4 files changed

+32
-258
lines changed

4 files changed

+32
-258
lines changed

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector-libstdcxx/Makefile

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

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector-libstdcxx/TestDataFormatterStdVector.py

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

lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector-libstdcxx/main.cpp

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,24 @@ def cleanup():
168168

169169
self.expect("frame variable strings", substrs=["vector has 0 items"])
170170

171+
@add_test_categories(["libstdcxx"])
172+
def test_libstdcxx(self):
173+
self.build(dictionary={"USE_LIBSTDCPP" : 1})
174+
self.do_test()
175+
176+
@add_test_categories(["libstdcxx"])
177+
def test_libstdcxx_debug(self):
178+
self.build(dictionary={"USE_LIBSTDCPP" : 1,
179+
"CXXFLAGS_EXTRAS": "-D_GLIBCXX_DEBUG"})
180+
self.do_test()
181+
182+
@add_test_categories(["libc++"])
183+
def test_libcxx(self):
184+
self.build(dictionary={"USE_LIBCPP" : 1})
185+
self.do_test()
186+
171187
def do_test_ref_and_ptr(self):
172188
"""Test that that file and class static variables display correctly."""
173-
self.build()
174189
(self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
175190
self, "Stop here to check by ref", lldb.SBFileSpec("main.cpp", False)
176191
)
@@ -183,3 +198,19 @@ def do_test_ref_and_ptr(self):
183198
self.expect("frame variable ptr", substrs=["ptr =", " size=7"])
184199

185200
self.expect("expression ptr", substrs=["$", "size=7"])
201+
202+
@add_test_categories(["libstdcxx"])
203+
def test_ref_and_ptr_libstdcxx(self):
204+
self.build(dictionary={"USE_LIBSTDCPP" : 1})
205+
self.do_test_ref_and_ptr()
206+
207+
@add_test_categories(["libstdcxx"])
208+
def test_ref_and_ptr_libstdcxx_debug(self):
209+
self.build(dictionary={"USE_LIBSTDCPP" : 1,
210+
"CXXFLAGS_EXTRAS": "-D_GLIBCXX_DEBUG"})
211+
self.do_test_ref_and_ptr()
212+
213+
@add_test_categories(["libc++"])
214+
def test_ref_and_ptr_libcxx(self):
215+
self.build(dictionary={"USE_LIBCPP" : 1})
216+
self.do_test_ref_and_ptr()

0 commit comments

Comments
 (0)