]> gitweb.factorcode.org Git - factor.git/blob - basis/ui/gadgets/buttons/buttons-tests.factor
a427da9793a6932a9702dc565e9cd782aa4a1644
[factor.git] / basis / ui / gadgets / buttons / buttons-tests.factor
1 USING: accessors kernel models namespaces tools.test ui.gadgets
2 ui.gadgets.buttons ;
3 IN: ui.gadgets.buttons.tests
4
5 { } [
6     2 <model> {
7         { 0 "atheist" }
8         { 1 "christian" }
9         { 2 "muslim" }
10         { 3 "jewish" }
11     } <radio-buttons> "religion" set
12 ] unit-test
13
14 { 0 } [
15     "religion" get gadget-child value>>
16 ] unit-test
17
18 { 2 } [
19     "religion" get gadget-child control-value
20 ] unit-test
21
22 { t t } [
23     "but1" [ ] <roll-button> "but2" [ ] <roll-button>
24     [ [ boundary>> ] bi@ eq? ] [ [ interior>> ] bi@ eq? ] 2bi
25 ] unit-test