summaryrefslogtreecommitdiff
path: root/tests/manual/cplusplus
diff options
context:
space:
mode:
authorRoberto Raggi <qtc-committer@nokia.com>2009-01-07 10:33:19 +0100
committerRoberto Raggi <qtc-committer@nokia.com>2009-01-07 10:33:19 +0100
commit0030f87e9c8e2a2cf529ffebac94ebb2fc72bf44 (patch)
tree035d0d88dfc5c3fa9195d2cce3fe278fedda3cda /tests/manual/cplusplus
parentfb0d60ae66c0ae5b97536e2f4ce258e304553fee (diff)
downloadqt-creator-0030f87e9c8e2a2cf529ffebac94ebb2fc72bf44.tar.gz
Improved the pretty printing of enum specifiers and if-else statements.
Diffstat (limited to 'tests/manual/cplusplus')
-rw-r--r--tests/manual/cplusplus/tests/t1.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/manual/cplusplus/tests/t1.cpp b/tests/manual/cplusplus/tests/t1.cpp
index 362146fc19..75c4666d55 100644
--- a/tests/manual/cplusplus/tests/t1.cpp
+++ b/tests/manual/cplusplus/tests/t1.cpp
@@ -2,7 +2,9 @@
class Class {
int a, b;
- enum zoo { a, b };
+ enum zoo { a = 1, b = a + 2 + x::y<10>::value };
+
+ enum {};
typedef enum { k };
@@ -12,5 +14,11 @@ class Class {
void another_foo() {
int a = static_cast<int>(1+2/3*4-5%6+(7&8));
}
+
+ void test_if() {
+ if (a == 10) return 1;
+ else if (b == 20) return 2;
+ else if (c == 30) { x = 1; }
+ }
};