~ci-train-bot/unity8/unity8-ubuntu-zesty-2404

« back to all changes in this revision

Viewing changes to tests/utils/modules/Unity/Test/UnityTestCase.qml

  • Committer: Nick Dedekind
  • Date: 2016-11-28 13:46:55 UTC
  • mfrom: (2704 unity8)
  • mto: This revision was merged to the branch mainline in revision 2752.
  • Revision ID: nick.dedekind@canonical.com-20161128134655-vd70a64pbci1b4oc
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
    // Keeps executing a given parameter-less function until it returns the given
259
259
    // expected result or the timemout is reached (in which case a test failure
260
260
    // is generated)
261
 
    function tryCompareFunction(func, expectedResult, timeout) {
 
261
    function tryCompareFunction(func, expectedResult, timeout, message) {
262
262
        var timeSpent = 0
263
263
        if (timeout === undefined)
264
264
            timeout = 5000;
276
276
        var act = qtest_results.stringify(actualResult)
277
277
        var exp = qtest_results.stringify(expectedResult)
278
278
        if (!qtest_results.compare(success,
279
 
                                   "function returned unexpected result",
 
279
                                   message || "function returned unexpected result",
280
280
                                   act, exp,
281
281
                                   util.callerFile(), util.callerLine())) {
282
282
            throw new Error("QtQuickTest::fail")