Skip to content

Commit d338d19

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

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
CXX_SOURCES := main.cpp
22

3-
USE_LIBCPP := 1
43
include Makefile.rules
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
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 TestDataFormatterLibcxxQueue(TestBase):
11+
class TestDataFormatterStdQueue(TestBase):
1312
def setUp(self):
1413
TestBase.setUp(self)
1514
self.namespace = "std"
@@ -30,9 +29,9 @@ def check_variable(self, name):
3029
bugnumber="llvm.org/pr36109", debug_info="gmodules", triple=".*-android"
3130
)
3231
@add_test_categories(["libc++"])
33-
def test(self):
32+
def test_libcxx(self):
3433
"""Test that std::queue is displayed correctly"""
35-
self.build()
34+
self.build(dictionary={"USE_LIBCPP": 1})
3635
lldbutil.run_to_source_breakpoint(
3736
self, "// break here", lldb.SBFileSpec("main.cpp", False)
3837
)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/main.cpp renamed to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/queue/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include <vector>
33

44
int main() {
5-
std::queue<int> q1{{1,2,3,4,5}};
6-
std::queue<int, std::vector<int>> q2{{1,2,3,4,5}};
5+
std::queue<int> q1{{1, 2, 3, 4, 5}};
6+
std::queue<int, std::vector<int>> q2{{1, 2, 3, 4, 5}};
77
int ret = q1.size() + q2.size(); // break here
88
return ret;
99
}

0 commit comments

Comments
 (0)