Skip to content

Commit

Permalink
Map construction, minor edits. qt4cg/qtspecs#1740
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianGruen committed Jan 30, 2025
1 parent 806b260 commit 073f614
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions map/put.xml
Original file line number Diff line number Diff line change
Expand Up @@ -290,28 +290,38 @@
</test-case>

<test-case name="map-put-026">
<description>The new entry has the type annotation of the new key</description>
<description>The new entry may change the type annotation of the new key</description>
<created by="Michael Kay, Saxonica" on="2025-01-29"/>
<modified by="Christian Gruen" on="2025-01-30" change="Implementation-dependent key handling"/>
<environment ref="map"/>
<test>
{"x":5, "y":6}
=> map:put(xs:NCName("x"), 50)
=> map:put(xs:NCName("y"), 60)
=> map:keys()</test>
<result>
<assert-type>xs:NCName+</assert-type>
<any-of>
<assert-type>xs:string+</assert-type>
<assert-type>xs:NCName+</assert-type>
</any-of>
</result>
</test-case>

<test-case name="map-put-027">
<description>The new entry has the type annotation of the new key</description>
<description>The new entry may change the type annotation of the new key</description>
<created by="Michael Kay, Saxonica" on="2025-01-29"/>
<modified by="Christian Gruen" on="2025-01-30" change="Implementation-dependent key handling"/>
<environment ref="map"/>
<test>
( {"x":5, "y":6}
=> map:put(xs:NCName("x"), true())
=> map:put(xs:NCName("y"), (false(), false()))
) instance of map(xs:NCName, xs:boolean+)
let $map := (
{"x":5, "y":6}
=> map:put(xs:NCName("x"), true())
=> map:put(xs:NCName("y"), (false(), false()))
)
return (
$map instance of map(xs:NCName, xs:boolean+) or
$map instance of map(xs:string, xs:boolean+)
)
</test>
<result>
<assert-true/>
Expand Down

0 comments on commit 073f614

Please # to comment.