ui.gadgets: move some buttons-tests to toolbar-tests.

db4
John Benediktsson 2015-08-16 10:33:52 -07:00
parent bfbab98d57
commit 29d4908ff5
2 changed files with 23 additions and 19 deletions

View File

@ -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" }

View File

@ -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