From cbd0fc4c65a1ac0bbd01c81e6dec97aec785cfb4 Mon Sep 17 00:00:00 2001 From: David Declerck Date: Mon, 28 Oct 2024 18:03:01 +0100 Subject: [PATCH] Add COMP-5 binary size test --- tests/testsuite.src/data_binary.at | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/testsuite.src/data_binary.at b/tests/testsuite.src/data_binary.at index 6dbee7a41..9a8e95012 100644 --- a/tests/testsuite.src/data_binary.at +++ b/tests/testsuite.src/data_binary.at @@ -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