Skip to content

Commit

Permalink
TEST: enhanced MAP tests to reflect recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jan 18, 2019
1 parent cbc67ca commit 904c078
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/tests/units/map-test.r3
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,28 @@ Rebol [
--assert 1 = m/a
--assert not empty? m
--assert empty? clear m

;@@ https://github.com/rebol/rebol-issues/issues/598
--test-- "map-issue-598"
--assert error? try [make map! [[a] 1]]

===end-group===

===start-group=== "reflection"
m: make map! b: [a 1 b: 2 :c 3 'd 4 #e 5 /f 6 "a" 7 <b> 8 9 9 #"c" 10 a@b 11]
--test-- "body of map"
--assert [a 1 b: 2 :c 3 'd 4 #e 5 /f 6 "a" 7 <b> 8 9 9 #"c" 10 a@b 11] = b
--assert [a: 1 b: 2 c: 3 d: 4 e: 5 f: 6 "a" 7 <b> 8 9 9 #"c" 10 a@b 11] = body-of m
--assert [a: 1 b: 2 c: 3 d: 4 e: 5 f: 6 "a" 7 <b> 8 9 9 #"c" 10 a@b 11] = reflect m 'body

--test-- "values of map"
--assert [1 2 3 4 5 6 7 8 9 10 11] = values-of m
--assert [1 2 3 4 5 6 7 8 9 10 11] = reflect m 'values

--test-- "words of map"
--assert [a b c d e f "a" <b> 9 #"c" a@b] = words-of m
--assert [a b c d e f "a" <b> 9 #"c" a@b] = reflect m 'words

===end-group===

~~~end-file~~~

0 comments on commit 904c078

Please sign in to comment.