ui.gadgets: move some buttons-tests to toolbar-tests.
parent
bfbab98d57
commit
29d4908ff5
|
@ -1,24 +1,7 @@
|
|||
USING: ui.commands ui.gadgets.buttons ui.gadgets.labels
|
||||
ui.gadgets tools.test namespaces sequences kernel models
|
||||
accessors ;
|
||||
USING: accessors models namespaces tools.test ui.gadgets
|
||||
ui.gadgets.buttons ;
|
||||
IN: ui.gadgets.buttons.tests
|
||||
|
||||
TUPLE: foo-gadget ;
|
||||
|
||||
: com-foo-a ( -- ) ;
|
||||
|
||||
: com-foo-b ( -- ) ;
|
||||
|
||||
\ foo-gadget "toolbar" f {
|
||||
{ f com-foo-a }
|
||||
{ f com-foo-b }
|
||||
} define-command-map
|
||||
|
||||
T{ foo-gadget } <toolbar> "t" set
|
||||
|
||||
{ 2 } [ "t" get children>> length ] unit-test
|
||||
{ "Foo A" } [ "t" get gadget-child gadget-child string>> ] unit-test
|
||||
|
||||
{ } [
|
||||
2 <model> {
|
||||
{ 0 "atheist" }
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
USING: accessors namespaces sequences tools.test ui.commands
|
||||
ui.gadgets ui.gadgets.toolbar ;
|
||||
IN: ui.gadgets.toolbar.tests
|
||||
|
||||
TUPLE: foo-gadget ;
|
||||
|
||||
: com-foo-a ( -- ) ;
|
||||
|
||||
: com-foo-b ( -- ) ;
|
||||
|
||||
\ foo-gadget "toolbar" f {
|
||||
{ f com-foo-a }
|
||||
{ f com-foo-b }
|
||||
} define-command-map
|
||||
|
||||
T{ foo-gadget } <toolbar> "t" set
|
||||
|
||||
{ 2 } [ "t" get children>> length ] unit-test
|
||||
{ "Foo A" } [ "t" get gadget-child gadget-child string>> ] unit-test
|
||||
|
||||
|
Loading…
Reference in New Issue