diff options
Diffstat (limited to 'tests/auto/qml/qmlformat/data/nestedIf.qml')
-rw-r--r-- | tests/auto/qml/qmlformat/data/nestedIf.qml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/data/nestedIf.qml b/tests/auto/qml/qmlformat/data/nestedIf.qml new file mode 100644 index 0000000000..9388dd42f6 --- /dev/null +++ b/tests/auto/qml/qmlformat/data/nestedIf.qml @@ -0,0 +1,30 @@ +Item { +Component.onCompleted: { + // Make sure that nested if statements get properly braced + if (a) { + if (b) + foo(); + else + bar(); + } else if (x == 3) + stuff(); + else + foo_bar(); + + // Same for "for" + if (a) { + for (x in y) { + bar(); + y(); + } + } + + // ...and while + if (b) { + while (y in x) { + foo(); + x(); + } + } +} +}
\ No newline at end of file |