diff options
Diffstat (limited to 'tests/auto/quick/qquickitem2/data/mapCoordinates.qml')
-rw-r--r-- | tests/auto/quick/qquickitem2/data/mapCoordinates.qml | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickitem2/data/mapCoordinates.qml b/tests/auto/quick/qquickitem2/data/mapCoordinates.qml index 0b0b15a767..a9c5030e12 100644 --- a/tests/auto/quick/qquickitem2/data/mapCoordinates.qml +++ b/tests/auto/quick/qquickitem2/data/mapCoordinates.qml @@ -65,12 +65,20 @@ Item { } function checkMapAToInvalid(x, y) { - var pos = itemA.mapToItem(1122, x, y) - return pos == undefined; + try { + itemA.mapToItem(1122, x, y) + } catch (e) { + return e instanceof TypeError + } + return false } function checkMapAFromInvalid(x, y) { - var pos = itemA.mapFromItem(1122, x, y) - return pos == undefined; + try { + itemA.mapFromItem(1122, x, y) + } catch (e) { + return e instanceof TypeError + } + return false } } |