]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/ui/pens/caching/caching-tests.factor
factor: Clean up wrong form of specialized-arrays in using lists.
[factor.git] / basis / ui / pens / caching / caching-tests.factor
index 3a655b23aa2e69debc8a106a8e6b5e5226f53f0e..cce3f0cb7cd43d063444ff5144013ff757bf89d1 100644 (file)
@@ -1,4 +1,18 @@
 ! Copyright (C) 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: tools.test ui.pens.caching ;
+USING: accessors colors.constants kernel tools.test
+ui.gadgets.labels ui.pens.caching ui.pens.gradient ;
 IN: ui.pens.caching.tests
+
+SPECIALIZED-ARRAY: float
+
+! 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