KeyValueExps allow map literals

This commit is contained in:
2020-12-07 18:28:12 -07:00
parent c0c5e3a4df
commit 0b8d1a00e1
4 changed files with 32 additions and 3 deletions

View File

@@ -242,6 +242,10 @@ class BasicTestCase extends Test {
function testCase() {
_testCase();
}
function testMaps() {
_testMaps();
}
}
class BasicObject {

View File

@@ -339,4 +339,11 @@
((Some "hey") (Assert.pass))
(otherwise (Assert.fail)))
(Assert.equals 5 (case (toOption 0)
(otherwise 5))))
(otherwise 5))))
(defun _testMaps []
(deflocal :Map<String,String> myMap [=>"hey" "you"
=>"found" "me"])
(Assert.equals "you" (dict-get myMap "hey"))
(Assert.equals "me" (dict-get myMap "found"))
)