Bug 503363 - include filename+linenumber for exceptions thrown during mochitest. r=sdwilsh
This commit is contained in:
Родитель
256d1b5cc1
Коммит
fe3dd7f102
|
@ -152,8 +152,13 @@ function testResult(aCondition, aName, aDiag, aIsTodo) {
|
|||
else
|
||||
this.result = "TEST-PASS";
|
||||
} else {
|
||||
if (aDiag)
|
||||
if (aDiag) {
|
||||
if (typeof aDiag == "object" && "fileName" in aDiag) {
|
||||
// we have an exception - print filename and linenumber information
|
||||
this.msg += " at " + aDiag.fileName + ":" + aDiag.lineNumber;
|
||||
}
|
||||
this.msg += " - " + aDiag;
|
||||
}
|
||||
if (aIsTodo)
|
||||
this.result = "TEST-UNEXPECTED-PASS";
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче