diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-21 14:40:42 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-04-21 14:40:42 (GMT) |
commit | 7807d804c85b0978cd3e1e3325abbd16dabd2ae0 (patch) | |
tree | 558c75b2b7f1f101a0e472b6ad6f808b3d2c06aa /tests/auto/qscriptvalue/tst_qscriptvalue.cpp | |
parent | c74dac2a0ef5d1b428c4da4e48fab05f9886233a (diff) | |
parent | c24bff633684b99d05e28bd4926e557fb553cf75 (diff) | |
download | Qt-7807d804c85b0978cd3e1e3325abbd16dabd2ae0.zip Qt-7807d804c85b0978cd3e1e3325abbd16dabd2ae0.tar.gz Qt-7807d804c85b0978cd3e1e3325abbd16dabd2ae0.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
src/openvg/qpaintengine_vg.cpp
src/script/bridge/qscriptqobject_p.h
tests/auto/bic/tst_bic.cpp
Diffstat (limited to 'tests/auto/qscriptvalue/tst_qscriptvalue.cpp')
-rw-r--r-- | tests/auto/qscriptvalue/tst_qscriptvalue.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp index dc369aa..aa9fa15 100644 --- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp +++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp @@ -1446,9 +1446,11 @@ void tst_QScriptValue::toObject() QScriptValue undefined = eng.undefinedValue(); QCOMPARE(undefined.toObject().isValid(), false); + QVERIFY(undefined.isUndefined()); QScriptValue null = eng.nullValue(); QCOMPARE(null.toObject().isValid(), false); + QVERIFY(null.isNull()); { QScriptValue falskt = QScriptValue(&eng, false); @@ -1457,6 +1459,7 @@ void tst_QScriptValue::toObject() QCOMPARE(tmp.isObject(), true); QCOMPARE(tmp.toNumber(), falskt.toNumber()); } + QVERIFY(falskt.isBool()); QScriptValue sant = QScriptValue(&eng, true); { @@ -1464,6 +1467,7 @@ void tst_QScriptValue::toObject() QCOMPARE(tmp.isObject(), true); QCOMPARE(tmp.toNumber(), sant.toNumber()); } + QVERIFY(sant.isBool()); QScriptValue number = QScriptValue(&eng, 123.0); { @@ -1471,6 +1475,7 @@ void tst_QScriptValue::toObject() QCOMPARE(tmp.isObject(), true); QCOMPARE(tmp.toNumber(), number.toNumber()); } + QVERIFY(number.isNumber()); QScriptValue str = QScriptValue(&eng, QString("ciao")); { @@ -1478,6 +1483,7 @@ void tst_QScriptValue::toObject() QCOMPARE(tmp.isObject(), true); QCOMPARE(tmp.toString(), str.toString()); } + QVERIFY(str.isString()); } QScriptValue object = eng.newObject(); @@ -1497,10 +1503,12 @@ void tst_QScriptValue::toObject() QScriptValue undefined = QScriptValue(QScriptValue::UndefinedValue); QVERIFY(!undefined.toObject().isValid()); QVERIFY(!eng.toObject(undefined).isValid()); + QVERIFY(undefined.isUndefined()); QScriptValue null = QScriptValue(QScriptValue::NullValue); QVERIFY(!null.toObject().isValid()); QVERIFY(!eng.toObject(null).isValid()); + QVERIFY(null.isNull()); QScriptValue falskt = QScriptValue(false); QVERIFY(!falskt.toObject().isValid()); @@ -1509,6 +1517,7 @@ void tst_QScriptValue::toObject() QVERIFY(tmp.isObject()); QVERIFY(tmp.toBool()); } + QVERIFY(falskt.isBool()); QScriptValue sant = QScriptValue(true); QVERIFY(!sant.toObject().isValid()); @@ -1517,6 +1526,7 @@ void tst_QScriptValue::toObject() QVERIFY(tmp.isObject()); QVERIFY(tmp.toBool()); } + QVERIFY(sant.isBool()); QScriptValue number = QScriptValue(123.0); QVERIFY(!number.toObject().isValid()); @@ -1525,6 +1535,7 @@ void tst_QScriptValue::toObject() QVERIFY(tmp.isObject()); QCOMPARE(tmp.toInt32(), number.toInt32()); } + QVERIFY(number.isNumber()); QScriptValue str = QScriptValue(QString::fromLatin1("ciao")); QVERIFY(!str.toObject().isValid()); @@ -1533,6 +1544,7 @@ void tst_QScriptValue::toObject() QVERIFY(tmp.isObject()); QCOMPARE(tmp.toString(), QString::fromLatin1("ciao")); } + QVERIFY(str.isString()); } } |