mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-05 21:32:12 +02:00
Fix test verification
This commit is contained in:
parent
91f59a96ab
commit
0c5726ce07
1 changed files with 5 additions and 9 deletions
|
@ -161,16 +161,16 @@ void ScriptEngineNetworkedTests::testRequireInfinite() {
|
|||
"Script.require('./tests/require_inf_a.js');"
|
||||
"print(\"Done\");"
|
||||
"Script.stop(true);", "testRequireInf.js");
|
||||
QStringList printed;
|
||||
QStringList expected {"Starting", "Value from A: 6", "Value from B: 6", "Done"};
|
||||
QString errors;
|
||||
|
||||
|
||||
|
||||
QVERIFY(!sm->isRunning());
|
||||
QVERIFY(!sm->isStopped());
|
||||
QVERIFY(!sm->isFinished());
|
||||
|
||||
connect(sm.get(), &ScriptManager::printedMessage, [&printed](const QString& message, const QString& engineName){
|
||||
printed.append(message);
|
||||
connect(sm.get(), &ScriptManager::errorMessage, [&errors](const QString& message, const QString& engineName){
|
||||
errors.append(message);
|
||||
});
|
||||
|
||||
|
||||
|
@ -181,9 +181,5 @@ void ScriptEngineNetworkedTests::testRequireInfinite() {
|
|||
QVERIFY(!sm->isStopped());
|
||||
QVERIFY(sm->isFinished());
|
||||
|
||||
QVERIFY(printed.length() == expected.length());
|
||||
for(int i=0;i<printed.length();i++) {
|
||||
QString nomatch = QString("Result '%1' didn't match expected '%2'").arg(printed[i]).arg(expected[i]);
|
||||
QVERIFY2(printed[i] == expected[i], qPrintable(nomatch));
|
||||
}
|
||||
QVERIFY(errors.contains("Maximum call stack size exceeded"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue