| 1 | // Test that the lldb command `statistics` works. |
| 2 | #include <string> |
| 3 | #include <vector> |
| 4 | |
| 5 | template <typename T> class Box { |
| 6 | T m_value; |
| 7 | |
| 8 | public: |
| 9 | Box(T value) : m_value(value) {} |
| 10 | }; |
| 11 | |
| 12 | void foo() { |
| 13 | std::string str = "hello world" ; |
| 14 | str += "\n" ; // stop here |
| 15 | } |
| 16 | |
| 17 | void bar(int x) { |
| 18 | auto box = Box<int>(x); |
| 19 | // stop here |
| 20 | } |
| 21 | |
| 22 | void vec() { |
| 23 | std::vector<int> int_vec = {1, 2, 3, 4, 5, 6, 7, 8}; |
| 24 | std::vector<double> double_vec = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}; |
| 25 | // stop vector |
| 26 | int x = int_vec.size(); |
| 27 | } |
| 28 | |
| 29 | int main(void) { |
| 30 | int patatino = 27; |
| 31 | foo(); |
| 32 | bar(x: patatino); |
| 33 | vec(); |
| 34 | return 0; // break here |
| 35 | } |
| 36 | |