Closed Bug 663531 Opened 13 years ago Closed 6 years ago

selftest.as does not allow %%verify in helper methods

Categories

(Tamarin Graveyard :: Tools, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: pnkfelix, Unassigned)

Details

The way selftest.as is written, it forces helper methods to be written in a %%methods section separate from the series of %%test and %%explicit sections. (I think you can put the helpers into %%prefix and perhaps %%decls too; the point is that you can't write helpers once you have started the %%test and %%explicit sections.) But you can only write %%verify clauses once you've already started writing %%test and %%explicit sections. This means you cannot write helper methods that capture common repeated %%verify patterns in the tests. From what I can determine from inspecting the generated C++ code, there is no need for this constraint; the code generated for each %%verify does not include %%test-specific code. It just includes the source file/line-number, and the source expression for the %%verify check. One can work around this by having the helper method do all the checks it wants without using %%verify and return some bit of state indicating which one if any failed. But this seems a bit baroque to me.
Flags: flashplayer-qrb+
Target Milestone: --- → Future
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.