FB in ladder

This test case it part of the test suite proposed for new devices.

Test case ID: R0225
Language: ST,LD

Code:
tests2/t0225fb1.fbd
    <vars name="IN1" datatype="INT" type="INPUT"/>
    <vars name="IN2" datatype="INT" type="INPUT"/>
    <vars name="S" datatype="INT" type="OUTPUT"/>
    <vars name="X" datatype="INT" init="5"/>
 (* graphical code omitted in this listing *)

tests2/t0225fb2.st

(* created by  GEB Automation IDE v3.2.3.391, 2017-12-01 *)
FUNCTION_BLOCK fb2 
    VAR_INPUT
        IN1,IN2:INT;
    END_VAR
    VAR_OUTPUT
        S:INT;
    END_VAR
    VAR
        X : INT := 5;
    END_VAR
        X := X +1;
        S := X + IN1 + IN2;
     
    
END_FUNCTION_BLOCK
tests2/t0225.st
PROGRAM R0225 
    VAR
        f1 : fb1;  // FB in LAdder
        f2 : fb2;  // same FB in ST
        Z : INT;
    END_VAR
    
     f2(IN1:=2);
     Z := f2.S;
         _GEB_ASSERT_(Z = 8);
     f2(IN1:=20,IN2:=200);    
         _GEB_ASSERT_(f2.S = 227);

     f1(IN1:=2);
     Z := f1.S;
         _GEB_ASSERT_(Z = 8);
     f1(IN1:=20,IN2:=200);    
         _GEB_ASSERT_(f1.S = 227);



END_PROGRAM