neopragma/cobol-unit-test

PASS notifications for VERIFYs are incomplete and inaccurate

Opened this issue · 1 comments

In FILEDEMT (failing VERIFYs are commented out):

TESTCASE 'IT MOCKS ERROR ON FILE OPEN INPUT'
MOCK
FILE INPUT-FILE
ON OPEN STATUS '87'
END-MOCK
PERFORM 0100-OPEN-INPUT
EXPECT WS-INPUT-FILE-STATUS TO BE '87'
* VERIFY FILE INPUT-FILE READ HAPPENED ONCE
VERIFY FILE INPUT-FILE READ NEVER HAPPENED
* VERIFY FILE INPUT-FILE OPEN HAPPENED 3 TIMES
VERIFY FILE INPUT-FILE OPEN HAPPENED AT LEAST ONCE
* VERIFY FILE INPUT-FILE OPEN HAPPENED AT LEAST 2 TIMES
VERIFY FILE INPUT-FILE OPEN HAPPENED NO MORE THAN ONCE
VERIFY FILE INPUT-FILE READ HAPPENED NO MORE THAN 4 TIMES

Output:
PASS: 4. IT MOCKS ERROR ON FILE OPEN INPUT
PASS: 5. VERIFY 0 ACCESSES
PASS: 6. VERIFY 1 ACCESS
PASS: 7. VERIFY 1 ACCESS
PASS: 8. VERIFY 4 ACCESSES

Should be:
PASS: 4. IT MOCKS ERROR ON FILE OPEN INPUT
PASS: 5. VERIFY 0 ACCESSES
PASS: 6. VERIFY AT LEAST 1 ACCESS
PASS: 7. VERIFY NO MORE THAN 1 ACCESS
PASS: 8. VERIFY NO MORE THAN 4 ACCESSES

DN. Labeled as 'enhancement' to improve the messages displayed with output from 'verify'.