2 Test calling std::String member functions.
6 from lldbsuite
.test
.decorators
import *
7 from lldbsuite
.test
.lldbtest
import *
8 from lldbsuite
.test
import lldbutil
11 class ExprCommandCallFunctionTestCase(TestBase
):
13 compiler
="icc", bugnumber
="llvm.org/pr14437, fails with ICC 13.1"
15 @expectedFailureAll(oslist
=["windows"], bugnumber
="llvm.org/pr21765")
16 @skipIf(compiler
="clang", compiler_version
=["<", "9.0"])
18 """Test calling std::String member function."""
20 lldbutil
.run_to_source_breakpoint(
21 self
, "// break here", lldb
.SBFileSpec("main.cpp")
24 self
.expect("expression str", substrs
=["Hello world"])
26 # Calling this function now succeeds, but we follow the typedef return type through to
27 # const char *, and thus don't invoke the Summary formatter.
29 # clang's libstdc++ on ios arm64 inlines std::string::c_str() always;
30 # skip this part of the test.
31 triple
= self
.dbg
.GetSelectedPlatform().GetTriple()
37 "armv7k-apple-watchos",
38 "arm64-apple-bridgeos",
39 "arm64_32-apple-watchos",
43 self
.expect("expression str.c_str()", substrs
=["Hello world"])