aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data/arraybuffer_method_return.qml
blob: 5a4f9fec0bbad902cfd20cd6ed1868c367918869 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import QtQuick 2.7
import Test 1.0

MyArrayBufferTestClass {
    property bool ok: false
    Component.onCompleted: {
        var buf = byteArrayMethod_CountUp(1, 3);
        var view = new DataView(buf);
        ok = buf instanceof ArrayBuffer
           && buf.byteLength == 3
           && view.getUint8(0) == 1
           && view.getUint8(1) == 2
           && view.getUint8(2) == 3;
    }
}