diff options
author | hjk <hjk@qt.io> | 2016-12-05 16:10:03 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2016-12-06 06:16:08 +0000 |
commit | e351c693c666f7e8f245b257bad7a80562abf8bd (patch) | |
tree | eb3845eae11819f382571c2b3458705844db12f6 /tests | |
parent | b662a5943700d893c864ddf832a53869e3783ad4 (diff) | |
download | qt-creator-e351c693c666f7e8f245b257bad7a80562abf8bd.tar.gz |
Debugger: Add a test to check the automatic expansion of 'this'
Change-Id: I90fad62442d677ba441e2e61b660cae7ebea52ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 48e10ce52d..2c8359ebc8 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -5278,6 +5278,20 @@ void tst_Dumpers::dumper_data() + Check("p.a", "0", "int") + Check("p.b", "2", "int"); + QTest::newRow("This") + << Data("struct Foo {\n" + " Foo() : x(143) {}\n" + " int foo() {\n" + " BREAK;\n" + " return x;\n" + " }\n\n" + " int x;\n" + "};\n", + "Foo f;\n" + "f.foo();\n") + + + Check("this", "", "Foo") + + Check("this.x", "143", "int"); QTest::newRow("Union") << Data("union U { int a; int b; };", "U u;\n" |