Skip to content

Commit

Permalink
Add COMP-5 binary size test
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Oct 28, 2024
1 parent 0cc8207 commit cbd0fc4
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tests/testsuite.src/data_binary.at
Original file line number Diff line number Diff line change
Expand Up @@ -2265,3 +2265,50 @@ AT_CHECK([$COMPILE prog.cob], [0], [], [])
AT_CHECK([$COBCRUN_DIRECT ./prog], [0], [], [])

AT_CLEANUP


AT_SETUP([COMP-5 binary size])
AT_KEYWORDS([binary])

AT_DATA([prog.cob], [
IDENTIFICATION DIVISION.
PROGRAM-ID. prog.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-1A PIC SVPP9(1) COMP-5.
01 WS-1B PIC SVPP9(2) COMP-5.
01 WS-2A PIC SVPP9(3) COMP-5.
01 WS-2B PIC SVPP9(4) COMP-5.
01 WS-4A PIC SVPP9(5) COMP-5.
01 WS-4B PIC SVPP9(9) COMP-5.
01 WS-8A PIC SVPP9(10) COMP-5.
01 WS-8B PIC SVPP9(18) COMP-5.

PROCEDURE DIVISION.
MAIN.
DISPLAY "SVPP9(1): " FUNCTION BYTE-LENGTH (WS-1A).
DISPLAY "SVPP9(2): " FUNCTION BYTE-LENGTH (WS-1B).
DISPLAY "SVPP9(3): " FUNCTION BYTE-LENGTH (WS-2A).
DISPLAY "SVPP9(4): " FUNCTION BYTE-LENGTH (WS-2B).
DISPLAY "SVPP9(5): " FUNCTION BYTE-LENGTH (WS-4A).
DISPLAY "SVPP9(9): " FUNCTION BYTE-LENGTH (WS-4B).
DISPLAY "SVPP9(10): " FUNCTION BYTE-LENGTH (WS-8A).
DISPLAY "SVPP9(18): " FUNCTION BYTE-LENGTH (WS-8B).
STOP RUN.
])

AT_CHECK([$COMPILE prog.cob], [0], [], [])

AT_CHECK([$COBCRUN_DIRECT ./prog], [0],
[SVPP9(1): 1
SVPP9(2): 1
SVPP9(3): 2
SVPP9(4): 2
SVPP9(5): 4
SVPP9(9): 4
SVPP9(10): 8
SVPP9(18): 8
], [])

AT_CLEANUP

0 comments on commit cbd0fc4

Please sign in to comment.