dmn-tck / tck

Decision Model and Notation Technology Compatibility Kit
https://dmn-tck.github.io/tck
51 stars 35 forks source link

Question to test case `decision_015` in `0084-feel-for-loops.dmn` #645

Closed dsntk closed 9 months ago

dsntk commented 9 months ago

Hi all,

I just wanted to ask/clarify if the test case with decision_015 in compliance-level-3/0084-feel-for-loops.dmn is correct.

The decision_015 looks like this:

<decision name="decision_015" id="_decision_015">
    <variable name="decision_015"/>
    <literalExpression>
        <text>for x in [ [1,2], [3,4] ], y in x return y</text>
    </literalExpression>
</decision>

and the expected result looks like this:

<testCase id="decision_015">
    <description>for loop with second iterator depending on first iterator</description>
    <resultNode name="decision_015" type="decision">
        <expected>
            <list>
                <item><value xsi:type="xsd:decimal">1</value></item>
                <item><value xsi:type="xsd:decimal">2</value></item>
                <item><value xsi:type="xsd:decimal">3</value></item>
                <item><value xsi:type="xsd:decimal">4</value></item>
            </list>
        </expected>
    </resultNode>
</testCase>

So it is expected that the evaluation of the for loop for x in [[1,2],[3,4]], y in x return y should give [1,2,3,4] as a result.

Do I interpret this correctly saying that the expected result should be [[1,2],[3,4]]?

Thanks in advance for any help clarifying this case.

SimonRinguette commented 9 months ago

Decision 015 result is [1,2,3,4]

Decision 016 result in [[1,2],[3,4]]