USING: delegate kernel arrays tools.test ; IN: temporary TUPLE: hello this that ; C: hello TUPLE: goodbye these those ; C: goodbye GENERIC: foo ( x -- y ) GENERIC: bar ( a -- b ) PROTOCOL: baz foo bar ; CONSULT: baz goodbye goodbye-these ; M: hello foo hello-this ; M: hello bar dup hello? swap hello-that 2array ; GENERIC: bing ( c -- d ) CONSULT: hello goodbye goodbye-these ; M: hello bing dup hello? swap hello-that 2array ; MIMIC: bing goodbye hello [ 1 { t 0 } ] [ 1 0 [ foo ] keep bar ] unit-test [ { t 0 } ] [ 1 0 bing ] unit-test [ 1 ] [ 1 0 f foo ] unit-test [ { t 0 } ] [ 1 0 f bar ] unit-test [ { f 0 } ] [ 1 0 f bing ] unit-test