diff options
author | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2010-02-24 14:35:38 (GMT) |
---|---|---|
committer | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2010-02-24 14:35:38 (GMT) |
commit | 508d0d0f7089c6b737ee10b1245ef9e1fc4240a6 (patch) | |
tree | d4b61ee42d774af7ee0385c26db2e10ac00a4523 /tests | |
parent | 94ba971e824d697277b11c5c766325bce9980bbe (diff) | |
download | Qt-508d0d0f7089c6b737ee10b1245ef9e1fc4240a6.zip Qt-508d0d0f7089c6b737ee10b1245ef9e1fc4240a6.tar.gz Qt-508d0d0f7089c6b737ee10b1245ef9e1fc4240a6.tar.bz2 |
New autotests cases for QScriptValue autotests generator.
Few test cases were added. They test values returned from
QScriptEngine functions; evaluate(), newDate(), newObject() and
newArray().
Reviewed-by: Kent Hansen
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qscriptvalue/testgen/data.txt | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/tests/auto/qscriptvalue/testgen/data.txt b/tests/auto/qscriptvalue/testgen/data.txt index a041c9b..2ab2fc9 100644 --- a/tests/auto/qscriptvalue/testgen/data.txt +++ b/tests/auto/qscriptvalue/testgen/data.txt @@ -34,6 +34,7 @@ QScriptValue(QString()) QScriptValue(QString("0")) QScriptValue(QString("123")) QScriptValue(QString("12.4")) +#QScriptValue(QString::fromUtf8("ąśćżźółńę")) #Unbound values (bound to a null engine) QScriptValue(0, QScriptValue::UndefinedValue) @@ -64,6 +65,7 @@ QScriptValue(0, QString()) QScriptValue(0, QString("0")) QScriptValue(0, QString("123")) QScriptValue(0, QString("12.3")) +#QScriptValue(0, QString::fromUtf8("ąśćżźółńę")) #Bound values QScriptValue(engine, QScriptValue::UndefinedValue) @@ -114,7 +116,40 @@ engine->evaluate("/foo/") engine->evaluate("new Object()") engine->evaluate("new Array()") engine->evaluate("new Error()") +engine->evaluate("a = new Object(); a.foo = 22; a.foo") +engine->evaluate("Undefined") +engine->evaluate("Null") +engine->evaluate("True") +engine->evaluate("False") + +engine->evaluate("undefined") +engine->evaluate("null") +engine->evaluate("true") +engine->evaluate("false") +engine->evaluate("122") +engine->evaluate("124") +engine->evaluate("0") +engine->evaluate("0.0") +engine->evaluate("123.0") +engine->evaluate("6.37e-8") +engine->evaluate("-6.37e-8") +engine->evaluate("0x43211234") +engine->evaluate("0x10000") +engine->evaluate("0x10001") +engine->evaluate("NaN") +engine->evaluate("Infinity") +engine->evaluate("-Infinity") +engine->evaluate("'ciao'") +engine->evaluate("''") +engine->evaluate("'0'") +engine->evaluate("'123'") +engine->evaluate("'12.4'") +#engine->evaluate(QString::fromUtf8("'ąśćżźółńę'")) #other engine->nullValue() -engine->undefinedValue()
\ No newline at end of file +engine->undefinedValue() +engine->newObject() +engine->newArray() +engine->newArray(10) +engine->newDate(QDateTime()) |