QCOMPARE(object->rectFProperty(), QRectF(1000.1, -10.9, 400, 90.99));
QCOMPARE(object->boolProperty(), true);
QCOMPARE(object->variantProperty(), QVariant("Hello World!"));
- QCOMPARE(object->vectorProperty(), QVector3D(10, 1, 2.2));
+ QCOMPARE(object->vectorProperty(), QVector3D(10, 1, 2.2f));
QCOMPARE(object->urlProperty(), component.url().resolved(QUrl("main.qml")));
delete object;
}
QCOMPARE(object->rectFProperty(), QRectF(1000.1, -10.9, 400, 90.99));
QCOMPARE(object->boolProperty(), true);
QCOMPARE(object->variantProperty(), QVariant("Hello World!"));
- QCOMPARE(object->vectorProperty(), QVector3D(10, 1, 2.2));
+ QCOMPARE(object->vectorProperty(), QVector3D(10, 1, 2.2f));
QCOMPARE(object->urlProperty(), component.url().resolved(QUrl("main.qml")));
delete object;
}
m_rect(2, 3, 109, 102),
m_rectf(103.8, 99.2, 88.1, 77.6),
m_rectfrect(2.0, 3.0, 109.0, 102.0),
- m_vector2(32.88, 1.3),
- m_vector(23.88, 3.1, 4.3),
- m_vector4(54.2, 23.88, 3.1, 4.3),
- m_quaternion(4.3, 54.2, 23.88, 3.1),
+ m_vector2(32.88f, 1.3f),
+ m_vector(23.88f, 3.1f, 4.3f),
+ m_vector4(54.2f, 23.88f, 3.1f, 4.3f),
+ m_quaternion(4.3f, 54.2f, 23.88f, 3.1f),
m_matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
{
m_font.setFamily("Arial");
m_rect(2, 3, 109, 102),
m_rectf(103.8, 99.2, 88.1, 77.6),
m_rectfrect(2.0, 3.0, 109.0, 102.0),
- m_vector2(32.88, 1.3),
- m_vector(23.88, 3.1, 4.3),
- m_vector4(54.2, 23.88, 3.1, 4.3),
- m_quaternion(4.3, 54.2, 23.88, 3.1),
+ m_vector2(32.88f, 1.3f),
+ m_vector(23.88f, 3.1f, 4.3f),
+ m_vector4(54.2f, 23.88f, 3.1f, 4.3f),
+ m_quaternion(4.3f, 54.2f, 23.88f, 3.1f),
m_matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
{
m_font.setFamily("Arial");
QCOMPARE((float)object->property("v_x").toDouble(), (float)32.88);
QCOMPARE((float)object->property("v_y").toDouble(), (float)1.3);
- QCOMPARE(object->property("copy"), QVariant(QVector2D(32.88, 1.3)));
+ QCOMPARE(object->property("copy"), QVariant(QVector2D(32.88f, 1.3f)));
delete object;
}
MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
QVERIFY(object != 0);
- QCOMPARE(object->vector2(), QVector2D(-0.3, -12.9));
+ QCOMPARE(object->vector2(), QVector2D(-0.3f, -12.9f));
delete object;
}
QCOMPARE((float)object->property("v_x").toDouble(), (float)23.88);
QCOMPARE((float)object->property("v_y").toDouble(), (float)3.1);
QCOMPARE((float)object->property("v_z").toDouble(), (float)4.3);
- QCOMPARE(object->property("copy"), QVariant(QVector3D(23.88, 3.1, 4.3)));
+ QCOMPARE(object->property("copy"), QVariant(QVector3D(23.88f, 3.1f, 4.3f)));
delete object;
}
MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
QVERIFY(object != 0);
- QCOMPARE(object->vector(), QVector3D(-0.3, -12.9, 907.4));
+ QCOMPARE(object->vector(), QVector3D(-0.3f, -12.9f, 907.4f));
delete object;
}
QCOMPARE((float)object->property("v_y").toDouble(), (float)23.88);
QCOMPARE((float)object->property("v_z").toDouble(), (float)3.1);
QCOMPARE((float)object->property("v_w").toDouble(), (float)4.3);
- QCOMPARE(object->property("copy"), QVariant(QVector4D(54.2, 23.88, 3.1, 4.3)));
+ QCOMPARE(object->property("copy"), QVariant(QVector4D(54.2f, 23.88f, 3.1f, 4.3f)));
delete object;
}
MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
QVERIFY(object != 0);
- QCOMPARE(object->vector4(), QVector4D(-0.3, -12.9, 907.4, 88.5));
+ QCOMPARE(object->vector4(), QVector4D(-0.3f, -12.9f, 907.4f, 88.5f));
delete object;
}
QCOMPARE((float)object->property("v_x").toDouble(), (float)54.2);
QCOMPARE((float)object->property("v_y").toDouble(), (float)23.88);
QCOMPARE((float)object->property("v_z").toDouble(), (float)3.1);
- QCOMPARE(object->property("copy"), QVariant(QQuaternion(4.3, 54.2, 23.88, 3.1)));
+ QCOMPARE(object->property("copy"), QVariant(QQuaternion(4.3f, 54.2f, 23.88f, 3.1f)));
delete object;
}
MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
QVERIFY(object != 0);
- QCOMPARE(object->quaternion(), QQuaternion(88.5, -0.3, -12.9, 907.4));
+ QCOMPARE(object->quaternion(), QQuaternion(88.5f, -0.3f, -12.9f, 907.4f));
delete object;
}
CPP_TEST(QQmlSizeFValueType, QSizeF(-100.7, 18.2));
CPP_TEST(QQmlRectValueType, QRect(13, 39, 10928, 88));
CPP_TEST(QQmlRectFValueType, QRectF(88.2, -90.1, 103.2, 118));
- CPP_TEST(QQuickVector2DValueType, QVector2D(19.7, 1002));
- CPP_TEST(QQuickVector3DValueType, QVector3D(18.2, 19.7, 1002));
- CPP_TEST(QQuickVector4DValueType, QVector4D(18.2, 19.7, 1002, 54));
- CPP_TEST(QQuickQuaternionValueType, QQuaternion(18.2, 19.7, 1002, 54));
+ CPP_TEST(QQuickVector2DValueType, QVector2D(19.7f, 1002));
+ CPP_TEST(QQuickVector3DValueType, QVector3D(18.2f, 19.7f, 1002));
+ CPP_TEST(QQuickVector4DValueType, QVector4D(18.2f, 19.7f, 1002, 54));
+ CPP_TEST(QQuickQuaternionValueType, QQuaternion(18.2f, 19.7f, 1002, 54));
CPP_TEST(QQuickMatrix4x4ValueType,
QMatrix4x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));
CPP_TEST(QQuickFontValueType, QFont("Helvetica"));