Skip to content

Commit 4045243

Browse files
committed
[lldb][test] Move std::function from libcxx to generic directory
This just moves the test from `libcxx` to `generic`. There are currently no `std::function` formatters for libstdc++ so I didn't add a test-case for it. Split out from #146740
1 parent 1f28da6 commit 4045243

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
CXX_SOURCES := main.cpp
2-
CXXFLAGS_EXTRAS := -std=c++11
3-
USE_LIBCPP := 1
42

53
include Makefile.rules

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py renamed to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py

Lines changed: 8 additions & 6 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 LibCxxFunctionTestCase(TestBase):
11+
class StdFunctionTestCase(TestBase):
1312
# Run frame var for a variable twice. Verify we do not hit the cache
1413
# the first time but do the second time.
1514
def run_frame_var_check_cache_use(
@@ -34,10 +33,8 @@ def run_frame_var_check_cache_use(
3433
substrs=["lldb_private::CompileUnit::FindFunction"],
3534
)
3635

37-
@add_test_categories(["libc++"])
38-
def test(self):
39-
"""Test that std::function as defined by libc++ is correctly printed by LLDB"""
40-
self.build()
36+
def do_test(self):
37+
"""Test that std::function is correctly printed by LLDB"""
4138
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
4239

4340
bkpt = self.target().FindBreakpointByID(
@@ -82,3 +79,8 @@ def test(self):
8279
self.expect(
8380
"frame variable f5", substrs=["f5 = Function = Bar::add_num(int) const"]
8481
)
82+
83+
@add_test_categories(["libc++"])
84+
def test_libcxx(self):
85+
self.build(dictionary={"USE_LIBCPP": 1})
86+
self.do_test()

0 commit comments

Comments
 (0)