Skip to content

Commit 24240c7

Browse files
committed
[lldb][test] Combine libstdc++ and libc++ iterator tests into generic test
1 parent b0473c5 commit 24240c7

File tree

6 files changed

+13
-113
lines changed

6 files changed

+13
-113
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
CXX_SOURCES := main.cpp
22

3-
USE_LIBCPP := 1
4-
5-
CXXFLAGS_EXTRAS := -O0
63
include Makefile.rules
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,22 @@
22
Test lldb data formatter subsystem.
33
"""
44

5-
65
import lldb
76
from lldbsuite.test.decorators import *
87
from lldbsuite.test.lldbtest import *
98
from lldbsuite.test import lldbutil
109

1110

12-
class LibcxxIteratorDataFormatterTestCase(TestBase):
11+
class StdIteratorDataFormatterTestCase(TestBase):
1312
def setUp(self):
1413
# Call super's setUp().
1514
TestBase.setUp(self)
1615
# Find the line number to break at.
1716
self.line = line_number("main.cpp", "// Set break point at this line.")
1817
self.namespace = "std"
1918

20-
@add_test_categories(["libc++"])
21-
def test_with_run_command(self):
22-
"""Test that libc++ iterators format properly."""
23-
self.build()
19+
def do_test(self):
20+
"""Test that iterators format properly."""
2421
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
2522

2623
lldbutil.run_break_set_by_file_and_line(
@@ -84,3 +81,13 @@ def cleanup():
8481
self.expect("frame variable siumI.first", substrs=["second"], matching=False)
8582
self.expect("frame variable siumI.second", substrs=["second = 137"])
8683
self.expect("frame variable siumI.second", substrs=["first"], matching=False)
84+
85+
@add_test_categories(["libc++"])
86+
def test_libcxx(self):
87+
self.build(dictionary={"USE_LIBCPP": 1})
88+
self.do_test()
89+
90+
@add_test_categories(["libstdcpp"])
91+
def test_libstdcxx(self):
92+
self.build(dictionary={"USE_LIBSTDCPP": 1})
93+
self.do_test()

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile

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

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py

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

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/main.cpp

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

0 commit comments

Comments
 (0)