Closed Bug 887199 Opened 12 years ago Closed 12 years ago

throws() and doesNotThrow() methods in the assertions module do not correctly handle native errors

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

Details

(Whiteboard: [mozmill-2.0][ateamtrack: p=mozmill q=2013q2 m=4])

Attachments

(1 file)

We currently fail in throws and doesNotThrow when we want to compare a native error thrown by our testing code. Reason is that none of the checks in _expectedException will catch that. To allow a check for native errors we will also have to compare the name of the exception.
Summary: assert/expect throws/doesNotThrow methods do not correctly handle native errors → throws() and doesNotThrow() methods in the assertions module do not correctly handle native errors
Whiteboard: [mozmill-2.0?] → [mozmill-2.0]
Attached patch Patch v1Splinter Review
Simple patch to allow us to check for native errors thrown in a test without having to do a string comparison.
Attachment #767687 - Flags: review?(dave.hunt)
Comment on attachment 767687 [details] [diff] [review] Patch v1 Review of attachment 767687 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks Henrik!
Attachment #767687 - Flags: review?(dave.hunt) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-2.0] → [mozmill-2.0][ateamtrack: p=mozmill q=2013q2 m=4]
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: