diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-10 15:48:50 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-13 09:55:25 +0200 |
commit | 540134d66dd0a235ace91ddc28940d2d88c24ac3 (patch) | |
tree | fa5499e63a0a84f3c5dda91e463eb8db47d88ea0 /tests | |
parent | e9852df2d7c1064c95ff4c4463587ad713e68334 (diff) | |
download | qtdeclarative-540134d66dd0a235ace91ddc28940d2d88c24ac3.tar.gz |
Move valueAsNumber into ExecutableCompilationUnit
This reduces our dependence on QV4::Value in the devtools.
Change-Id: I4b3f937bc08c16f7e2543fdc5cc34c0cfb121f8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp index 2987e420fe..c215e9620d 100644 --- a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp +++ b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp @@ -328,7 +328,10 @@ void tst_qmldiskcache::regenerateAfterChange() const QV4::CompiledData::Object *obj = qmlUnit->objectAt(0); QCOMPARE(quint32(obj->nBindings), quint32(2)); QCOMPARE(quint32(obj->bindingTable()->type), quint32(QV4::CompiledData::Binding::Type_Number)); - QCOMPARE(obj->bindingTable()->valueAsNumber(reinterpret_cast<const QV4::Value *>(testUnit->constants())), double(42)); + + QCOMPARE(reinterpret_cast<const QV4::Value *>(testUnit->constants()) + [obj->bindingTable()->value.constantValueIndex].doubleValue(), + double(42)); QCOMPARE(quint32(testUnit->functionTableSize), quint32(1)); |