[lldb][import-std-module] Add a test for typedef'd std types

This commit is contained in:
Raphael Isemann 2020-12-08 13:33:14 +01:00
parent 776bb71d88
commit 6face9119c
2 changed files with 12 additions and 0 deletions

View File

@ -87,3 +87,13 @@ class TestBasicVector(TestBase):
ValueCheck(value="4"),
ValueCheck(value="5")
])
# Test that the typedef'd vector type can be substituted.
self.expect("expr b.emplace_back(6)")
self.expect_expr("b", result_type="vector_long",
result_children=[
ValueCheck(value="3"),
ValueCheck(value="1"),
ValueCheck(value="2"),
ValueCheck(value="6"),
])

View File

@ -1,6 +1,8 @@
#include <vector>
typedef std::vector<long> vector_long;
int main(int argc, char **argv) {
std::vector<int> a = {3, 1, 2};
vector_long b = {3, 1, 2};
return 0; // Set break point at this line.
}