-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1152-boxed-for * commented out test 3/4 for undecided list coercion. Also changed test 7 to reflect Octavian's comment re 'two things wrong in the same test'
- Loading branch information
1 parent
028f127
commit 3b7763d
Showing
2 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
TestCases/compliance-level-3/1154-boxed-every/1154-boxed-every-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,80 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<!-- Contributed to DMN TCK by StrayAlien --> | ||
<testCases xmlns="http://www.omg.org/spec/DMN/20160719/testcase" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<modelName>1154-boxed-every.dmn</modelName> | ||
|
||
<testCase id="001"> | ||
<description>Will report true when all 'in' elements satisfy expression</description> | ||
<resultNode name="decision001" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="002"> | ||
<description>Will report false when not all 'in' elements satisfy expression</description> | ||
<resultNode name="decision002" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">false</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<!-- commented out pending RTF. https://github.com/dmn-tck/tck/pull/602#issuecomment-1770863632 --> | ||
<!-- | ||
<testCase id="003"> | ||
<description>Will return null when 'in' expression is not a list</description> | ||
<resultNode name="decision003" type="decision" errorResult="true"> | ||
<expected> | ||
<value xsi:nil="true"/> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
--> | ||
|
||
<!-- commented out pending RTF. https://github.com/dmn-tck/tck/pull/602#issuecomment-1770863632 --> | ||
<!-- | ||
<testCase id="004"> | ||
<description>Will not coerce single value 'in' expression to list - and return null</description> | ||
<resultNode name="decision004" type="decision" errorResult="true"> | ||
<expected> | ||
<value xsi:nil="true"/> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
--> | ||
|
||
<testCase id="005"> | ||
<description>Will return null when 'satisfies' does not return boolean</description> | ||
<resultNode name="decision005" type="decision" errorResult="true"> | ||
<expected> | ||
<value xsi:nil="true"/> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="006"> | ||
<description>Will return null when any 'satisfies' does not return boolean</description> | ||
<resultNode name="decision006" type="decision" errorResult="true"> | ||
<expected> | ||
<value xsi:nil="true"/> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
<testCase id="007"> | ||
<description>Will return true for empty list</description> | ||
<resultNode name="decision007" type="decision"> | ||
<expected> | ||
<value xsi:type="xsd:boolean">true</value> | ||
</expected> | ||
</resultNode> | ||
</testCase> | ||
|
||
|
||
|
||
</testCases> |
75 changes: 75 additions & 0 deletions
75
TestCases/compliance-level-3/1154-boxed-every/1154-boxed-every.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,75 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<definitions namespace="http://www.montera.com.au/spec/DMN/1154-boxed-every" | ||
name="1154-boxed-every" | ||
id="_i9fboPUUEeesLuP4RHs4vA" | ||
xmlns="https://www.omg.org/spec/DMN/20211108/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:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<description>Boxed Every Expression</description> | ||
|
||
<decision name="decision001" id="_decision001"> | ||
<variable name="decision001"/> | ||
<every iteratorVariable="element"> | ||
<in><literalExpression><text>[1,2,3,4,5]</text></literalExpression></in> | ||
<satisfies><literalExpression><text>element > 0</text></literalExpression></satisfies> | ||
</every> | ||
</decision> | ||
|
||
<decision name="decision002" id="_decision002"> | ||
<variable name="decision002"/> | ||
<every iteratorVariable="element"> | ||
<in><literalExpression><text>[1,2,3,4,5]</text></literalExpression></in> | ||
<satisfies><literalExpression><text>element > 2</text></literalExpression></satisfies> | ||
</every> | ||
</decision> | ||
|
||
<!-- commented out pending RTF. https://github.com/dmn-tck/tck/pull/602#issuecomment-1770863632 --> | ||
<!-- | ||
<decision name="decision003" id="_decision003"> | ||
<variable name="decision003"/> | ||
<every iteratorVariable="element"> | ||
<in><literalExpression><text>"not a list"</text></literalExpression></in> | ||
<satisfies><literalExpression><text>element</text></literalExpression></satisfies> | ||
</every> | ||
</decision> | ||
--> | ||
|
||
<!-- commented out pending RTF. https://github.com/dmn-tck/tck/pull/602#issuecomment-1770863632 --> | ||
<!-- | ||
<decision name="decision004" id="_decision004"> | ||
<variable name="decision004"/> | ||
<every iteratorVariable="element"> | ||
<in><literalExpression><text>1</text></literalExpression></in> | ||
<satisfies><literalExpression><text>element * 2</text></literalExpression></satisfies> | ||
</every> | ||
</decision> | ||
--> | ||
|
||
<decision name="decision005" id="_decision005"> | ||
<variable name="decision005"/> | ||
<every iteratorVariable="element"> | ||
<in><literalExpression><text>1</text></literalExpression></in> | ||
<satisfies><literalExpression><text>"not a boolean"</text></literalExpression></satisfies> | ||
</every> | ||
</decision> | ||
|
||
<decision name="decision006" id="_decision006"> | ||
<variable name="decision006"/> | ||
<every iteratorVariable="element"> | ||
<in><literalExpression><text>[1,2]</text></literalExpression></in> | ||
<satisfies><literalExpression><text>if (element = 1) then true else "not a boolean"</text></literalExpression></satisfies> | ||
</every> | ||
</decision> | ||
|
||
<decision name="decision007" id="_decision007"> | ||
<variable name="decision007"/> | ||
<every iteratorVariable="element"> | ||
<in><literalExpression><text>[]</text></literalExpression></in> | ||
<satisfies><literalExpression><text>true</text></literalExpression></satisfies> | ||
</every> | ||
</decision> | ||
|
||
</definitions> | ||
|