IN: xmode.utilities.tests USING: xmode.utilities tools.test xml xml.data kernel strings vectors sequences io.files prettyprint assocs unicode.case ; [ "hi" 3 ] [ { 1 2 3 4 5 6 7 8 } [ H{ { 3 "hi" } } at ] map-find ] unit-test [ f f ] [ { 1 2 3 4 5 6 7 8 } [ H{ { 11 "hi" } } at ] map-find ] unit-test TUPLE: company employees type ; : V{ } clone f company boa ; : add-employee company-employees push ; \ parse-employee-tag see : parse-company-tag [ { { "type" >upper set-company-type } } init-from-tag dup ] keep tag-children [ tag? ] filter [ parse-employee-tag ] with each ; [ T{ company f V{ T{ employee f "Joe" "VP Sales" } T{ employee f "Jane" "CFO" } } "PUBLIC" "This is a great company" } ] [ "resource:extra/xmode/utilities/test.xml" file>xml parse-company-tag ] unit-test