[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[m8n] 45 Association


-- setup
test=smalltalk.Association:key_value_("one",2)
a=smalltalk.Association:key_value_("a",1)
b=smalltalk.Association:key_value_("b",2)
c=smalltalk.Association:key_value_("c",3)


-- tests
if (not test:key()=="one") then error("Must return one") end
test:key_("two")
if (not test:key()=="two") then error("Must return two") end
if (not (a:value()+b:value())==3) then error("Must return 3") end
if (a:_comma(b):class():name()~="ComposedAssociations") then error("Invalid result for composite") end


-- clear
test, a, b, c =nil