testNestedLiteralSet
�� �� �� �� | compiler |
�� �� �� �� compiler := OpalCompiler new.
�� �� �� �� compiler compilationContext parserClass: RBParserLiteralCollection.
�� �� �� �� self
�� �� �� �� �� �� �� �� assert: (compiler evaluate: '{ :Set 1 . {�� :Set 2 . 2 } . 1}' )
�� �� �� �� �� �� �� �� equals:�� (Set new add: 1 ; add: (Set new add: 2; add: 2; yourself);�� add: 1 ;yourself).
testOrderedCollection
�� �� �� �� | compiler |
�� �� �� �� compiler := OpalCompiler new.
�� �� �� �� compiler compilationContext parserClass: RBParserLiteralCollection.
�� �� �� �� self
�� �� �� �� �� �� �� �� assert: (compiler evaluate: '{ :OrderedCollection 1 . 2 . 1 . 3}��� )
�� �� �� �� �� �� �� �� equals: #(1 2 1 3) asOrderedCollection.
testDictionary
�� �� �� �� | compiler dict |
�� �� �� �� compiler := OpalCompiler new.
�� �� �� �� compiler compilationContext parserClass: RBParserLiteralCollection.
�� �� �� �� dict := (compiler evaluate: '{ :Dictionary #a -> 33 . #b -> 44}' ).
�� �� �� �� self assert: (dict at: #a) equals: 33
I want to thank dave mason for the design!
S