Skip to content

[lldb][test] Move std::function from libcxx to generic directory #147701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CXX_SOURCES := main.cpp
CXXFLAGS_EXTRAS := -std=c++11
USE_LIBCPP := 1

include Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
Test lldb data formatter subsystem.
"""


import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil


class LibCxxFunctionTestCase(TestBase):
class StdFunctionTestCase(TestBase):
# Run frame var for a variable twice. Verify we do not hit the cache
# the first time but do the second time.
def run_frame_var_check_cache_use(
Expand All @@ -34,10 +33,8 @@ def run_frame_var_check_cache_use(
substrs=["lldb_private::CompileUnit::FindFunction"],
)

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

bkpt = self.target().FindBreakpointByID(
Expand Down Expand Up @@ -82,3 +79,8 @@ def test(self):
self.expect(
"frame variable f5", substrs=["f5 = Function = Bar::add_num(int) const"]
)

@add_test_categories(["libc++"])
def test_libcxx(self):
self.build(dictionary={"USE_LIBCPP": 1})
self.do_test()
Loading