in reply to Multiple testing methods
Not clear exactly what your requirement is, but it would be something like this:
if (faillengthtest($foo)) { if (failrepeattest($foo)) { #format the page with error msg 1 } else { #format the page with error msg 2 } } else { #format the page normally }
Might be a good idea to wrap your testing in two functions to make the code clearly expressed.
Update:
Actually to exercise all 4 combinations, the code should be (obviously you could tailer some branches, if they don't appear to be a real combination under your requirement):
if (faillengthtest($foo)) { if (failrepeattest($foo)) { #format the page with error msg 1 } else { #format the page with error msg 2 } } else { if (failrepeattest($foo)) { #format the page with error msg 3 } else { #format the page with normal message } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple testing methods
by sulfericacid (Deacon) on Sep 26, 2004 at 19:04 UTC |