diff options
author | hjk <hjk121@nokiamail.com> | 2014-11-27 15:30:13 +0100 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-11-28 12:48:28 +0100 |
commit | 315fb0372e1cddbf33eea2fa1414f1d25ec65f90 (patch) | |
tree | bcce48b367f9270fb90f2ab3e0449c0b8a9b68b3 | |
parent | f8e8d14bd4bf505bcee7415cfc991cc8d90a2671 (diff) | |
download | qt-creator-315fb0372e1cddbf33eea2fa1414f1d25ec65f90.tar.gz |
Debugger: Add more reference related autotests
Change-Id: Iae638ca1fbd84c43c7d31b65e017792d1b6a1e0b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r-- | tests/auto/debugger/tst_dumpers.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 1c56f9031e..9d55438e21 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -4845,7 +4845,8 @@ void tst_Dumpers::dumper_data() QTest::newRow("Reference") - << Data("#include <string>\n" + << Data(fooData + + "#include <string>\n" "#include <QString>\n" "using namespace std;\n" @@ -4869,7 +4870,13 @@ void tst_Dumpers::dumper_data() "const QString &b3 = a3;\n" "typedef QString &Ref3;\n" "const Ref3 d3 = const_cast<Ref3>(a3);\n" - "unused(&a3, &b3, &d3);\n") + "unused(&a3, &b3, &d3);\n\n" + + "Foo a4(12);\n" + "const Foo &b4 = a4;\n" + "typedef Foo &Ref4;\n" + "const Ref4 d4 = const_cast<Ref4>(a4);\n" + "unused(&a4, &b4, &d4);\n") + CoreProfile() @@ -4885,7 +4892,14 @@ void tst_Dumpers::dumper_data() + Check("a3", "\"hello\"", "@QString") + Check("b3", "\"hello\"", "@QString &") - + Check("d3", "\"hello\"", "Ref3"); + + Check("d3", "\"hello\"", "Ref3") + + + Check("a4", "", "Foo") + + Check("a4.a", "12", "int") + + Check("b4", "", "Foo &") + + Check("b4.a", "12", "int") + //+ Check("d4", "\"hello\"", "Ref4"); FIXME: We get "Foo &" instead + + Check("d4.a", "12", "int"); QTest::newRow("DynamicReference") @@ -4967,6 +4981,8 @@ void tst_Dumpers::dumper_data() << Data(fooData + "void testPassByReference(Foo &f) {\n" " BREAK;\n" + " int dummy = 2;\n" + " unused(&f, &dummy);\n" "}\n", "Foo f(12);\n" "testPassByReference(f);\n") |