Skip to content

Commit

Permalink
arithmetic negation of durations (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrayAlien authored Sep 19, 2024
1 parent e1942d2 commit cd30f2e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,45 +24,41 @@
</resultNode>
</testCase>

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <testCase id="decision_003">-->
<!-- <description>negate days and time duration</description>-->
<!-- <resultNode name="decision_003" type="decision">-->
<!-- <expected>-->
<!-- <value xsi:type="xsd:duration">-P1D</value>-->
<!-- </expected>-->
<!-- </resultNode>-->
<!-- </testCase>-->
<testCase id="decision_003">
<description>negate days and time duration</description>
<resultNode name="decision_003" type="decision">
<expected>
<value xsi:type="xsd:duration">-P1D</value>
</expected>
</resultNode>
</testCase>

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <testCase id="decision_003_a">-->
<!-- <description>negate a negative days and time duration</description>-->
<!-- <resultNode name="decision_003_a" type="decision">-->
<!-- <expected>-->
<!-- <value xsi:type="xsd:duration">P1D</value>-->
<!-- </expected>-->
<!-- </resultNode>-->
<!-- </testCase>-->
<testCase id="decision_003_a">
<description>negate a negative days and time duration</description>
<resultNode name="decision_003_a" type="decision">
<expected>
<value xsi:type="xsd:duration">P1D</value>
</expected>
</resultNode>
</testCase>

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <testCase id="decision_004">-->
<!-- <description>negate years and months duration</description>-->
<!-- <resultNode name="decision_004" type="decision">-->
<!-- <expected>-->
<!-- <value xsi:type="xsd:duration">-P1Y</value>-->
<!-- </expected>-->
<!-- </resultNode>-->
<!-- </testCase>-->
<testCase id="decision_004">
<description>negate years and months duration</description>
<resultNode name="decision_004" type="decision">
<expected>
<value xsi:type="xsd:duration">-P1Y</value>
</expected>
</resultNode>
</testCase>

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <testCase id="decision_004_a">-->
<!-- <description>negate a negative years and months duration</description>-->
<!-- <resultNode name="decision_004_a" type="decision">-->
<!-- <expected>-->
<!-- <value xsi:type="xsd:duration">P1Y</value>-->
<!-- </expected>-->
<!-- </resultNode>-->
<!-- </testCase>-->
<testCase id="decision_004_a">
<description>negate a negative years and months duration</description>
<resultNode name="decision_004_a" type="decision">
<expected>
<value xsi:type="xsd:duration">P1Y</value>
</expected>
</resultNode>
</testCase>

<testCase id="decision_005">
<description>negate date gives null</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
name="0099-arithmetic-negation"
id="_i9fboPUUEeesLuP4RHs4vA"
xmlns="https://www.omg.org/spec/DMN/20230324/MODEL/"
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
xmlns:dmndi="https://www.omg.org/spec/DMN/20230324/DMNDI/"
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
<description>arithmetic negation</description>

<decision name="decision_001" id="_decision_001">
Expand All @@ -23,37 +20,33 @@
</literalExpression>
</decision>

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <decision name="decision_003" id="_decision_003">-->
<!-- <variable name="decision_003"/>-->
<!-- <literalExpression>-->
<!-- <text>-@"P1D"</text>-->
<!-- </literalExpression>-->
<!-- </decision>-->

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <decision name="decision_003_a" id="_decision_003_a">-->
<!-- <variable name="decision_003_a"/>-->
<!-- <literalExpression>-->
<!-- <text>-@"-P1D"</text>-->
<!-- </literalExpression>-->
<!-- </decision>-->

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <decision name="decision_004" id="_decision_004">-->
<!-- <variable name="decision_004"/>-->
<!-- <literalExpression>-->
<!-- <text>-@"P1Y"</text>-->
<!-- </literalExpression>-->
<!-- </decision>-->

<!-- commented as per https://github.com/dmn-tck/tck/pull/401#issuecomment-962982239 -->
<!-- <decision name="decision_004_a" id="_decision_004_a">-->
<!-- <variable name="decision_004_a"/>-->
<!-- <literalExpression>-->
<!-- <text>-@"-P1Y"</text>-->
<!-- </literalExpression>-->
<!-- </decision>-->
<decision name="decision_003" id="_decision_003">
<variable name="decision_003"/>
<literalExpression>
<text>-@"P1D"</text>
</literalExpression>
</decision>

<decision name="decision_003_a" id="_decision_003_a">
<variable name="decision_003_a"/>
<literalExpression>
<text>-@"-P1D"</text>
</literalExpression>
</decision>

<decision name="decision_004" id="_decision_004">
<variable name="decision_004"/>
<literalExpression>
<text>-@"P1Y"</text>
</literalExpression>
</decision>

<decision name="decision_004_a" id="_decision_004_a">
<variable name="decision_004_a"/>
<literalExpression>
<text>-@"-P1Y"</text>
</literalExpression>
</decision>

<decision name="decision_005" id="_decision_005">
<variable name="decision_005"/>
Expand Down

0 comments on commit cd30f2e

Please sign in to comment.