diff options
Diffstat (limited to 'tests/auto/qmldom/domdata/domitem/ifStatements.qml')
-rw-r--r-- | tests/auto/qmldom/domdata/domitem/ifStatements.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/qmldom/domdata/domitem/ifStatements.qml b/tests/auto/qmldom/domdata/domitem/ifStatements.qml new file mode 100644 index 0000000000..90d1bd3ac8 --- /dev/null +++ b/tests/auto/qmldom/domdata/domitem/ifStatements.qml @@ -0,0 +1,27 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQml + +QtObject { + function conditional() { + let i = 5 + if (i) + i = 42 + + if (i == 55) + i = 32 + else + i = i - 1 + + if (i == 42) { + i = 111 + } + + if (i == 746) { + i = 123 + } else { + i = 456 + } + } +} |