openmainframeproject/cobol-check

Version 0.1.0 No two TestCase in the same TestSuite

Closed this issue · 3 comments

In a trial, Cobol Check processes correctly the first TestCase then gives to the second TestCase the results of the first one.

Cobol program:
IDENTIFICATION DIVISION.
PROGRAM-ID. ABC.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 FILLER.
05 ws-display-numeric pic 999 value 123.
05 ws-packed-numeric comp-3 pic 999 value 123.
PROCEDURE DIVISION.
AA001.
ADD 1 TO ws-display-numeric.
ADD 1 TO ws-packed-numeric.
AA002.
ADD 2 TO ws-display-numeric.
GOBACK.

Test file:
TestSuite "ABC using test file ABCTest_1"
TestCase "AA001"
move 10 to ws-display-numeric
move 11 to ws-packed-numeric
PERFORM AA001
expect ws-display-numeric to be 11
expect ws-packed-numeric to be 12
TestCase "AA002"
move 20 to ws-display-numeric
PERFORM AA002
expect ws-display-numeric to be 19

       The two TestCases are "passed".      

Thanks! I'm labeling this as a "bug" and we'll prioritize it along with other items.

Hi @bpxwunix
We are unable to reproduce/understand the error, could you elaborate?

I notice in your code, that you have a goback in paragraph AA002.
This will cause the test to end, when the testprogram calls that paragraph, and therefore not perform the last expect statement.
Is this intended?

Regards,
Rune

Closed as unable to reproduce.