factor/basis/ui/pens/caching/caching-tests.factor

19 lines
572 B
Factor
Raw Normal View History

2009-02-12 04:58:42 -05:00
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors colors.constants kernel tools.test
2016-09-05 01:47:39 -04:00
ui.gadgets.labels ui.pens.caching ui.pens.gradient ;
2009-02-12 04:58:42 -05:00
IN: ui.pens.caching.tests
2016-09-05 01:47:39 -04:00
SPECIALIZED-ARRAY: float
2016-09-05 01:47:39 -04:00
! 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