ui.*: more tests
parent
20711a0fd3
commit
bff165c85c
|
@ -1,8 +1,7 @@
|
||||||
USING: alien ui.gadgets.panes ui.gadgets namespaces
|
USING: accessors colors fonts fry help help.markup help.stylesheet
|
||||||
kernel sequences io io.styles io.streams.string tools.test
|
help.syntax help.topics inspector io io.streams.string io.styles
|
||||||
prettyprint definitions help help.syntax help.markup
|
kernel math models namespaces prettyprint see sequences tools.test
|
||||||
help.stylesheet splitting ui.gadgets.debug models math summary
|
ui.gadgets ui.gadgets.debug ui.gadgets.panes ui.gadgets.panes.private ;
|
||||||
inspector accessors help.topics see fry ;
|
|
||||||
IN: ui.gadgets.panes.tests
|
IN: ui.gadgets.panes.tests
|
||||||
|
|
||||||
: #children ( -- n ) "pane" get children>> length ;
|
: #children ( -- n ) "pane" get children>> length ;
|
||||||
|
@ -125,3 +124,30 @@ ARTICLE: "test-article-2" "This is a test article"
|
||||||
|
|
||||||
{ t } [ <test-pane> dup input>> child? ] unit-test
|
{ t } [ <test-pane> dup input>> child? ] unit-test
|
||||||
{ t } [ <test-pane> dup last-line>> child? ] unit-test
|
{ t } [ <test-pane> dup last-line>> child? ] unit-test
|
||||||
|
|
||||||
|
! smash-line
|
||||||
|
{
|
||||||
|
""
|
||||||
|
T{ font
|
||||||
|
{ name "sans-serif" }
|
||||||
|
{ size 12 }
|
||||||
|
{ foreground
|
||||||
|
T{ rgba
|
||||||
|
{ red 0.0 }
|
||||||
|
{ green 0.0 }
|
||||||
|
{ blue 0.0 }
|
||||||
|
{ alpha 1.0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{ background
|
||||||
|
T{ rgba
|
||||||
|
{ red 1.0 }
|
||||||
|
{ green 1.0 }
|
||||||
|
{ blue 1.0 }
|
||||||
|
{ alpha 1.0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} [
|
||||||
|
<pane> current>> smash-line [ text>> ] [ font>> ] bi
|
||||||
|
] unit-test
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: tools.test ui.pens.caching ;
|
USING: accessors colors.constants kernel
|
||||||
|
specialized-arrays.instances.alien.c-types.float tools.test
|
||||||
|
ui.gadgets.labels ui.pens.caching ui.pens.gradient ;
|
||||||
IN: ui.pens.caching.tests
|
IN: ui.pens.caching.tests
|
||||||
|
|
||||||
|
! compute-pen
|
||||||
|
{
|
||||||
|
{ 0 0 }
|
||||||
|
float-array{ 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 }
|
||||||
|
float-array{ 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 }
|
||||||
|
} [
|
||||||
|
"hi" <label> { COLOR: white COLOR: black } <gradient>
|
||||||
|
[ compute-pen ] keep
|
||||||
|
[ last-dim>> ] [ last-vertices>> ] [ last-colors>> ] tri
|
||||||
|
] unit-test
|
||||||
|
|
Loading…
Reference in New Issue