}
function compare(actual, expected, msg) {
- var act = qtest_formatValue(actual)
- var exp = qtest_formatValue(expected)
+ var act = testCase.qtest_formatValue(actual)
+ var exp = testCase.qtest_formatValue(expected)
var success = qtest_compareInternal(actual, expected)
if (msg === undefined) {
i += 50
}
var actual = obj[prop]
- var act = qtest_formatValue(actual)
- var exp = qtest_formatValue(value)
+ var act = testCase.qtest_formatValue(actual)
+ var exp = testCase.qtest_formatValue(value)
var success = qtest_compareInternal(actual, value)
if (!qtest_results.compare(success, "property " + prop, act, exp, util.callerFile(), util.callerLine()))
throw new Error("QtQuickTest::fail")
function warn(msg) {
if (msg === undefined)
msg = ""
- qtest_results.warn(msg);
+ qtest_results.warn(msg, util.callerFile(), util.callerLine());
}
function ignoreWarning(msg) {
qtest_results.dataTag = ""
}
if (!haveData)
- qtest_results.warn("no data supplied for " + prop + "() by " + datafunc + "()")
+ qtest_results.warn("no data supplied for " + prop + "() by " + datafunc + "()"
+ , util.callerFile(), util.callerLine());
qtest_results.clearTestTable()
}
} else if (isBenchmark) {
QTest::Continue, qtest_fixFile(file).toLatin1().constData(), line);
}
-void QuickTestResult::warn(const QString &message)
+void QuickTestResult::warn(const QString &message, const QString &file, int line)
{
- QTestLog::warn(message.toLatin1().constData(), 0, 0);
+ QTestLog::warn(message.toLatin1().constData(), qtest_fixFile(file).toLatin1().constData(), line);
}
void QuickTestResult::ignoreWarning(const QString &message)
const QString &file, int line);
bool expectFailContinue(const QString &tag, const QString &comment,
const QString &file, int line);
- void warn(const QString &message);
+ void warn(const QString &message, const QString &file, int line);
void ignoreWarning(const QString &message);