-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Copied from BerkeleyLab/caffeine#251 :
diag = .expect. (any(image_status == [0, PRIF_STAT_FAILED_IMAGE, PRIF_STAT_STOPPED_IMAGE])) & ! TODO: replace with .any. once Juliennes supports it
// "permitted image status"
IIUC, a failure of this test would not print out the failing image_status value, only a false .expect., which is not very useful.
I'm not very worried about this particular case, but I could imagine other situations arising where a result value is permitted to have one of several distinct expected values, and it would be nice for the diagnostic to include the actual value when that comparison fails to match any of the expected values.
Proposed syntax:
diag = .any. (image_status .equalsExpected. [0, PRIF_STAT_FAILED_IMAGE, PRIF_STAT_STOPPED_IMAGE]) // "permitted image status"
where the diagnosis succeeds iff at least one of elements of .any. succeeds.
Otherwise, the diagnostic output should include the diagnostic strings generated from all of the failing conditions.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request