|
2 | 2 | Test lldb data formatter subsystem. |
3 | 3 | """ |
4 | 4 |
|
5 | | - |
6 | 5 | import lldb |
7 | 6 | from lldbsuite.test.decorators import * |
8 | 7 | from lldbsuite.test.lldbtest import * |
9 | 8 | from lldbsuite.test import lldbutil |
10 | 9 |
|
11 | 10 |
|
12 | | -class LibcxxIteratorDataFormatterTestCase(TestBase): |
| 11 | +class StdIteratorDataFormatterTestCase(TestBase): |
13 | 12 | def setUp(self): |
14 | 13 | # Call super's setUp(). |
15 | 14 | TestBase.setUp(self) |
16 | 15 | # Find the line number to break at. |
17 | 16 | self.line = line_number("main.cpp", "// Set break point at this line.") |
18 | 17 | self.namespace = "std" |
19 | 18 |
|
20 | | - @add_test_categories(["libc++"]) |
21 | | - def test_with_run_command(self): |
22 | | - """Test that libc++ iterators format properly.""" |
23 | | - self.build() |
| 19 | + def do_test(self): |
| 20 | + """Test that iterators format properly.""" |
24 | 21 | self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) |
25 | 22 |
|
26 | 23 | lldbutil.run_break_set_by_file_and_line( |
@@ -69,18 +66,12 @@ def cleanup(): |
69 | 66 | self.expect("frame variable svI", substrs=['item = "hello"']) |
70 | 67 | self.expect("expr svI", substrs=['item = "hello"']) |
71 | 68 |
|
72 | | - self.expect("frame variable iiumI", substrs=["first = 61453", "second = 51966"]) |
73 | | - self.expect("expr iiumI", substrs=["first = 61453", "second = 51966"]) |
74 | | - |
75 | | - self.expect("frame variable siumI", substrs=['first = "hello"', "second = 137"]) |
76 | | - self.expect("expr siumI", substrs=['first = "hello"', "second = 137"]) |
77 | | - |
78 | | - self.expect("frame variable iiumI.first", substrs=["first = 61453"]) |
79 | | - self.expect("frame variable iiumI.first", substrs=["second"], matching=False) |
80 | | - self.expect("frame variable iiumI.second", substrs=["second = 51966"]) |
81 | | - self.expect("frame variable iiumI.second", substrs=["first"], matching=False) |
82 | | - |
83 | | - self.expect("frame variable siumI.first", substrs=['first = "hello"']) |
84 | | - self.expect("frame variable siumI.first", substrs=["second"], matching=False) |
85 | | - self.expect("frame variable siumI.second", substrs=["second = 137"]) |
86 | | - self.expect("frame variable siumI.second", substrs=["first"], matching=False) |
| 69 | + @add_test_categories(["libc++"]) |
| 70 | + def test_libcxx(self): |
| 71 | + self.build(dictionary={"USE_LIBCPP": 1}) |
| 72 | + self.do_test() |
| 73 | + |
| 74 | + @add_test_categories(["libstdcxx"]) |
| 75 | + def test_libstdcxx(self): |
| 76 | + self.build(dictionary={"USE_LIBSTDCPP": 1}) |
| 77 | + self.do_test() |
0 commit comments