Closed Bug 642409 Opened 14 years ago Closed 14 years ago

Improve assertions module

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [module-refactor])

Attachments

(1 file, 1 obsolete file)

Given Clint's review over on bug 637880 some improvements have to be made to our assertions module.
Attached patch Patch v1 (obsolete) — Splinter Review
Attachment #519869 - Flags: review?(gmealer)
Attachment #519869 - Flags: review?(ctalbert)
Comment on attachment 519869 [details] [diff] [review] Patch v1 r+. The code that's there looks fine, though I can't tell from your attachment comment precisely what you meant to change so can't speak to any high level.
Attachment #519869 - Flags: review?(gmealer) → review+
Comment on attachment 519869 [details] [diff] [review] Patch v1 >+ if (!!diagnosis) >+ message = !!message ? message + " - " + diagnosis : diagnosis; > As discussed in irc, if(!!diagnosis) == if(diagnosis) in all cases. Same for the ternary op. > // Build result data >- let frame = findCallerFrame(this._startFrame); >+ let frame = findCallerFrame(Components.stack); I think Clint meant to take out the findCallerFrame() function. We do some stack parsing now in bug 607450. I have some of these changes in the new patch for adding assertions in bug 637880
(In reply to comment #3) > >+ if (!!diagnosis) > >+ message = !!message ? message + " - " + diagnosis : diagnosis; > > > As discussed in irc, if(!!diagnosis) == if(diagnosis) in all cases. Same for > the ternary op. I will update this part. > > // Build result data > >- let frame = findCallerFrame(this._startFrame); > >+ let frame = findCallerFrame(Components.stack); > > I think Clint meant to take out the findCallerFrame() function. We do some > stack parsing now in bug 607450. He meant that for your work to port that over to Mozmill. We will be able to remove it once we use Mozmill 2.0.
I will wait with further work on that bug until bug 637880 has been fixed. So I can pull back all the updated code.
Comment on attachment 519869 [details] [diff] [review] Patch v1 Are you going to pull the throws/donotthrow stuff into this patch as well?
Attachment #519869 - Flags: review?(ctalbert) → review+
(In reply to comment #6) > Are you going to pull the throws/donotthrow stuff into this patch as well? No, that's part of bug 642081.
Attached patch Patch v2Splinter Review
Only small updates backported from the discussion on bug 637880.
Attachment #519869 - Attachment is obsolete: true
Attachment #521983 - Flags: review?(gmealer)
Comment on attachment 521983 [details] [diff] [review] Patch v2 Looks fine, r+
Attachment #521983 - Flags: review?(gmealer) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: