# HG changeset patch # User Edouard Tisserant # Date 1732799583 -3600 # Node ID b27df24a0ea8eeec5b1ea65f8ea58c877bcfa5c2 # Parent 5234d06f62eeb8fe97a0d182c3dac835b609d8da Tests: extend FOR loop tests in IEC-61131 language test diff -r 5234d06f62ee -r b27df24a0ea8 tests/projects/iec61131_lang_test/plc.xml --- a/tests/projects/iec61131_lang_test/plc.xml Wed Nov 27 16:05:26 2024 +0100 +++ b/tests/projects/iec61131_lang_test/plc.xml Thu Nov 28 14:13:03 2024 +0100 @@ -1,7 +1,7 @@ - + @@ -81,6 +81,14 @@ + + + + + + + + @@ -89,12 +97,20 @@ RESULT := 'Single iteration FOR loop'; -J := FALSE; FOR I:= 1 TO 1 DO - J := TRUE; + K := K + 1; END_FOR; -IF NOT J THEN RETURN; END_IF; +IF NOT (K = 1) THEN RETURN; END_IF; + +RESULT := 'Single iteration FOR BY loop'; + +K := 0; +FOR I:= 1 TO 2 BY 2 DO + K := K + 1; +END_FOR; + +IF NOT (K = 1) THEN RETURN; END_IF; RESULT := 'By 2 FOR loop';