Skip to content

[lldb][test] Move std::initializer_list from libcxx to generic directory #147702

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 all commits
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,6 +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,7 +2,6 @@
Test lldb data formatter subsystem.
"""


import re
import lldb
from lldbsuite.test.decorators import *
Expand All @@ -11,10 +10,7 @@


class InitializerListTestCase(TestBase):
@add_test_categories(["libc++"])
def test(self):
"""Test that that file and class static variables display correctly."""
self.build()
def do_test(self):
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)

bkpt = self.target().FindBreakpointByID(
Expand All @@ -25,8 +21,6 @@ def test(self):

self.runCmd("run", RUN_SUCCEEDED)

lldbutil.skip_if_library_missing(self, self.target(), re.compile(r"libc\+\+"))

# The stop reason of the thread should be breakpoint.
self.expect(
"thread list",
Expand All @@ -39,3 +33,8 @@ def test(self):
"frame variable ils",
substrs=['[4] = "surprise it is a long string!! yay!!"'],
)

@add_test_categories(["libc++"])
def test_libcxx(self):
self.build(dictionary={"USE_LIBCPP": 1})
self.do_test()
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <initializer_list>
#include <string>
#include <vector>

int main() {
std::initializer_list<int> ili{1, 2, 3, 4, 5};
std::initializer_list<std::string> ils{
"1", "2", "3", "4", "surprise it is a long string!! yay!!"};

return 0; // Set break point at this line.
}

This file was deleted.

Loading