forked from dmn-tck/tck
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(feel): verify non-member filter expression handling
Related to dmn-tck#536
- Loading branch information
Showing
2 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
TestCases/compliance-level-3/0110-feel-filters/0108-feel-filters-test-01.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testCases xmlns="http://www.omg.org/spec/DMN/20160719/testcase" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<modelName>0110-feel-filters.dmn</modelName> | ||
<labels> | ||
<label>Compliance Level 3</label> | ||
<label>Literal Expression</label> | ||
<label>FEEL Filter (10.3.2.5)</label> | ||
</labels> | ||
<testCase id="001"> | ||
<description>Spec - example 1</description> | ||
<resultNode name="Decision1" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="002"> | ||
<description>Spec - example 2</description> | ||
<resultNode name="Decision2" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="003"> | ||
<description>Spec - example 3</description> | ||
<resultNode name="Decision3" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="004"> | ||
<description>Spec - example 4</description> | ||
<resultNode name="Decision4" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="005"> | ||
<description>Spec 'filtering with non-existing members'</description> | ||
<resultNode name="Decision3" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
<resultNode name="Decision4" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="006"> | ||
<description>Spec 'path extraction with non-existing members'</description> | ||
<resultNode name="Decision5" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
<resultNode name="Decision6" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
</testCases> |
80 changes: 80 additions & 0 deletions
80
TestCases/compliance-level-3/0110-feel-filters/0108-feel-filters.dmn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<definitions namespace="https://github.com/dmn-tck/tck" name="feel-filters" id="_feel-filters" xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:triso="http://www.trisotech.com/2015/triso/modeling" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<decision name="Decision1" id="d_Decision1"> | ||
<variable typeRef="boolean" name="Decision1"/> | ||
<literalExpression> | ||
<text>[ 1, 2, 3, 4 ][ item > 2 ] = [ 3, 4 ]</text> | ||
</literalExpression> | ||
</decision> | ||
<decision name="Decision2" id="d_Decision2"> | ||
<variable typeRef="boolean" name="Decision2"/> | ||
<literalExpression> | ||
<text>[ { x: 1, y: 2}, {x:2, y:3} ][ x = 1 ] = [ { x: 1, y: 2 } ]</text> | ||
</literalExpression> | ||
</decision> | ||
<decision name="Decision3" id="d_Decision3"> | ||
<variable typeRef="boolean" name="Decision3"/> | ||
<literalExpression> | ||
<text>[ { x: 1, y: 2 }, { x: null, y: 3 } ][ x < 2 ] = [ { x: 1, y: 2 } ]</text> | ||
</literalExpression> | ||
</decision> | ||
<decision name="Decision4" id="d_Decision4"> | ||
<variable typeRef="boolean" name="Decision4"/> | ||
<literalExpression> | ||
<text>[ { x: 1, y: 2 }, { x: 2, y: 3 } ].y = [ 2, 3 ]</text> | ||
</literalExpression> | ||
</decision> | ||
<decision name="Decision5" id="d_Decision5"> | ||
<variable typeRef="boolean" name="Decision5"/> | ||
<literalExpression> | ||
<text>[ { x: 1 } ][ y > 1 ] = [ ]</text> | ||
</literalExpression> | ||
</decision> | ||
<decision name="Decision6" id="d_Decision6"> | ||
<variable typeRef="boolean" name="Decision6"/> | ||
<literalExpression> | ||
<text>[ { x: 1 }, { y: 2 } ][ y > 1 ] = [ { y: 2 } ]</text> | ||
</literalExpression> | ||
</decision> | ||
<decision name="Decision7" id="d_Decision7"> | ||
<variable typeRef="boolean" name="Decision7"/> | ||
<literalExpression> | ||
<text>[ { x: 1 }, { y: 2 } ].y = [ 2 ]</text> | ||
</literalExpression> | ||
</decision> | ||
<decision name="Decision8" id="d_Decision8"> | ||
<variable typeRef="boolean" name="Decision8"/> | ||
<literalExpression> | ||
<text>[ { x: 1 } ].y = [ ]</text> | ||
</literalExpression> | ||
</decision> | ||
<dmndi:DMNDI> | ||
<dmndi:DMNDiagram name="Page 1" id="_feel-filters_D2"> | ||
<dmndi:DMNShape dmnElementRef="d_Decision1" id="_feel-filters_s1"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="106.0"/> | ||
</dmndi:DMNShape> | ||
<dmndi:DMNShape dmnElementRef="d_Decision2" id="_feel-filters_s2"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="206.0"/> | ||
</dmndi:DMNShape> | ||
<dmndi:DMNShape dmnElementRef="d_Decision3" id="_feel-filters_s3"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="306.0"/> | ||
</dmndi:DMNShape> | ||
<dmndi:DMNShape dmnElementRef="d_Decision4" id="_feel-filters_s4"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="406.0"/> | ||
</dmndi:DMNShape> | ||
<dmndi:DMNShape dmnElementRef="d_Decision5" id="_feel-filters_s5"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="506.0"/> | ||
</dmndi:DMNShape> | ||
<dmndi:DMNShape dmnElementRef="d_Decision6" id="_feel-filters_s6"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="606.0"/> | ||
</dmndi:DMNShape> | ||
<dmndi:DMNShape dmnElementRef="d_Decision7" id="_feel-filters_s7"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="606.0"/> | ||
</dmndi:DMNShape> | ||
<dmndi:DMNShape dmnElementRef="d_Decision8" id="_feel-filters_s8"> | ||
<dc:Bounds height="61.0" width="154.0" x="106.0" y="606.0"/> | ||
</dmndi:DMNShape> | ||
</dmndi:DMNDiagram> | ||
</dmndi:DMNDI> | ||
</definitions> | ||
|