Closed
Bug 1101039
Opened 10 years ago
Closed 10 years ago
Add line numbers to assertions
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(firefox42 fixed)
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: martijn.martijn, Assigned: hiro)
References
Details
Attachments
(2 files, 2 obsolete files)
1.09 KB,
patch
|
Details | Diff | Splinter Review | |
4.39 KB,
patch
|
hiro
:
review+
|
Details | Diff | Splinter Review |
From bug 744387, comment 5:
"
maybe we can add a line number into the output to make assertions clearer? (I've wanted that even for assertions with a message, it's not always clear which one they are.)
"
The poc patch does something like that.
Assignee | ||
Comment 2•10 years ago
|
||
This patch outputs stack traces on console if assertion fails like this:
3446 INFO TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_resource_timing.html | Performance.getEntries() returned wrong number of entries. - got 4, expected 5
SimpleTest.is@tests/SimpleTest/SimpleTest.js:286:5
is@tests/dom/tests/mochitest/general/resource_timing_main_test.html:59:3
window.onload@tests/dom/tests/mochitest/general/resource_timing_main_test.html:80:1
3447 INFO TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_resource_timing.html | Performance.getEntriesByName() should return some results
ok@tests/dom/tests/mochitest/general/resource_timing_main_test.html:55:3
window.onload@tests/dom/tests/mochitest/general/resource_timing_main_test.html:86:1
3448 INFO TEST-UNEXPECTED-FAIL | dom/tests/mochitest/general/test_resource_timing.html | An entry with the name 'http://mochi.test:8888/tests/image/test/mochitest/blue.png' should be available
ok@tests/dom/tests/mochitest/general/resource_timing_main_test.html:55:3
checkEntries@tests/dom/tests/mochitest/general/resource_timing_main_test.html:196:1
window.onload@tests/dom/tests/mochitest/general/resource_timing_main_test.html:106:1
Not prettified yet but OK in my use-case.
Attachment #8598457 -
Flags: feedback?(ted)
Assignee | ||
Updated•10 years ago
|
Attachment #8598457 -
Flags: feedback?(martijn.martijn)
Assignee | ||
Updated•10 years ago
|
Attachment #8598457 -
Flags: feedback?(jaws)
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → hiikezoe
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8598457 [details] [diff] [review]
A simple solution
Review of attachment 8598457 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great to me. Perhaps you could indent the lines that contain the stack? That makes it a little clearer.
Attachment #8598457 -
Flags: feedback?(martijn.martijn) → feedback+
Comment 4•10 years ago
|
||
Comment on attachment 8598457 [details] [diff] [review]
A simple solution
Review of attachment 8598457 [details] [diff] [review]:
-----------------------------------------------------------------
Looks fine to me, but I'm not in a position to really give an authoritative review of it.
Attachment #8598457 -
Flags: feedback?(jaws) → feedback+
Assignee | ||
Comment 5•10 years ago
|
||
:mwargers, :jaws, thank you for your feedbacks!
This patch adds 4 spaces to indent each line.
A example of the output:
Expected PASS, got FAIL
didn't expect 1, but got it
SimpleTest.isnot@SimpleTest/SimpleTest.js:299:5
isnot@dom/tests/mochitest/general/resource_timing_main_test.html:63:3
secondCheck@dom/tests/mochitest/general/resource_timing_main_test.html:222:1
https://treeherder.mozilla.org/#/jobs?repo=try&revision=fb44ad6cbe6d
Attachment #8598457 -
Attachment is obsolete: true
Attachment #8598457 -
Flags: feedback?(ted)
Attachment #8600247 -
Flags: review?(ted)
Reporter | ||
Comment 6•10 years ago
|
||
Excellent, thanks! It didn't seem to work for mochitest-chrome, it seems:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/hiikezoe@mozilla-japan.org-fb44ad6cbe6d/try-win64-debug/try_win8_64-debug_test-mochitest-other-bm109-tests1-windows-build689.txt.gz
Updated•10 years ago
|
Attachment #8600247 -
Flags: review?(ted) → review+
Comment 7•10 years ago
|
||
Sorry for the long review delay!
Assignee | ||
Comment 8•10 years ago
|
||
Unrotted.
Thanks!
Attachment #8600247 -
Attachment is obsolete: true
Attachment #8634417 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 10•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
See Also: → 1658583
You need to log in
before you can comment on or make changes to this bug.
Description
•