aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorUladzislau Paulovich <selatnick@gmail.com>2019-06-09 01:22:17 +0300
committerselatnick <selatnick@gmail.com>2019-06-11 15:23:42 +0000
commit70fecd518eb198fa5038efa03f450bcf6ab2cba8 (patch)
treec672533fcde143c2d3e4b1ac2c7e0a9e5625c11f /tests/auto
parent8f7cbd6416debf2214977a43edeb5f90b5cee702 (diff)
qml | Fix functions and loops formatting
Bugs fixed in this change: 1. Incorrect function arguments formatting: function(a, b, c) -> function(abc) 2. Incorrect foreach loop formatting: for (var a in b) -> for (a in b) 3. Incorrect for loop formatting: for (var a = 1; a < 100; ++a) -> for(; a < 100; ++a) Change-Id: I8afef6e5f2485a2225931b7ecb7210506e06dc6c Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/reformatter/jssyntax.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qml/reformatter/jssyntax.js b/tests/auto/qml/reformatter/jssyntax.js
index 9fd8b38a56..d651cd7822 100644
--- a/tests/auto/qml/reformatter/jssyntax.js
+++ b/tests/auto/qml/reformatter/jssyntax.js
@@ -32,6 +32,12 @@ while (true) {
for (var x in a) {
print(a[x])
}
+ for (let x in a) {
+ print(a[x])
+ }
+ for (const x in a) {
+ print(a[x])
+ }
do {
a = x