mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1036639 - Report correct filename from xpcshell/head.js when using do_check_* assertion functions.;r=gps
This commit is contained in:
parent
aa6feee34d
commit
f367a664b7
@ -723,6 +723,9 @@ function todo_check_neq(left, right, stack) {
|
||||
}
|
||||
|
||||
function do_report_result(passed, text, stack, todo) {
|
||||
while (stack.filename.contains("head.js") && stack.caller) {
|
||||
stack = stack.caller;
|
||||
}
|
||||
if (passed) {
|
||||
if (todo) {
|
||||
do_throw_todo(text, stack);
|
||||
|
@ -537,6 +537,19 @@ tail =
|
||||
self.assertEquals(1, self.x.passCount)
|
||||
self.assertEquals(0, self.x.failCount)
|
||||
|
||||
def testLogCorrectFileName(self):
|
||||
"""
|
||||
Make sure a meaningful filename and line number is logged
|
||||
by a passing test.
|
||||
"""
|
||||
self.writeFile("test_add_test_simple.js", ADD_TEST_SIMPLE)
|
||||
self.writeManifest(["test_add_test_simple.js"])
|
||||
|
||||
self.assertTestResult(True, verbose=True)
|
||||
self.assertInLog("true == true")
|
||||
self.assertNotInLog("[do_check_true :")
|
||||
self.assertInLog("[test_simple : 5]")
|
||||
|
||||
def testAddTestFailing(self):
|
||||
"""
|
||||
Ensure add_test() with a failing test is reported.
|
||||
|
Loading…
Reference in New Issue
Block a user