summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2010-10-29 11:32:57 (GMT)
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2010-11-01 07:57:38 (GMT)
commit1a11073cb13b655943addf0afc7fb839725d128e (patch)
treec955d1fa2b008734c5a88a58c13804b4f5a4369f /tests/auto/qscriptvalue/tst_qscriptvalue.cpp
parent3ecb6db4a3e71582e5249c3c2101f2f4ddf39510 (diff)
downloadQt-1a11073cb13b655943addf0afc7fb839725d128e.zip
Qt-1a11073cb13b655943addf0afc7fb839725d128e.tar.gz
Qt-1a11073cb13b655943addf0afc7fb839725d128e.tar.bz2
Separate generated tests from hand written ones.
QScriptValue test suit was way too big, so it was difficult to maintain. Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/qscriptvalue/tst_qscriptvalue.cpp')
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index ce9e8d1..e29b5d0 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -59,60 +59,6 @@ tst_QScriptValue::~tst_QScriptValue()
delete engine;
}
-void tst_QScriptValue::dataHelper(InitDataFunction init, DefineDataFunction define)
-{
- QTest::addColumn<QString>("__expression__");
- (this->*init)();
- QHash<QString,QScriptValue>::const_iterator it;
- for (it = m_values.constBegin(); it != m_values.constEnd(); ++it) {
- m_currentExpression = it.key();
- (this->*define)(it.key().toLatin1());
- }
- m_currentExpression = QString();
-}
-
-QTestData &tst_QScriptValue::newRow(const char *tag)
-{
- return QTest::newRow(tag) << m_currentExpression;
-}
-
-void tst_QScriptValue::testHelper(TestFunction fun)
-{
- QFETCH(QString, __expression__);
- QScriptValue value = m_values.value(__expression__);
- (this->*fun)(__expression__.toLatin1(), value);
-}
-
-void tst_QScriptValue::assignAndCopyConstruct_initData()
-{
- QTest::addColumn<int>("dummy");
- initScriptValues();
-}
-
-void tst_QScriptValue::assignAndCopyConstruct_makeData(const char *expr)
-{
- newRow(expr) << 0;
-}
-
-void tst_QScriptValue::assignAndCopyConstruct_test(const char *, const QScriptValue &value)
-{
- QScriptValue copy(value);
- QCOMPARE(copy.strictlyEquals(value), !value.isNumber() || !qIsNaN(value.toNumber()));
- QCOMPARE(copy.engine(), value.engine());
-
- QScriptValue assigned = copy;
- QCOMPARE(assigned.strictlyEquals(value), !copy.isNumber() || !qIsNaN(copy.toNumber()));
- QCOMPARE(assigned.engine(), assigned.engine());
-
- QScriptValue other(!value.toBool());
- assigned = other;
- QVERIFY(!assigned.strictlyEquals(copy));
- QVERIFY(assigned.strictlyEquals(other));
- QCOMPARE(assigned.engine(), other.engine());
-}
-
-DEFINE_TEST_FUNCTION(assignAndCopyConstruct)
-
void tst_QScriptValue::ctor_invalid()
{
QScriptEngine eng;