]> gitweb.factorcode.org Git - factor.git/commitdiff
Unit tests for Pango and Cairo
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 2 Mar 2009 02:14:16 +0000 (20:14 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 2 Mar 2009 02:14:16 +0000 (20:14 -0600)
basis/cairo/cairo-tests.factor [new file with mode: 0644]
basis/pango/layouts/layouts-tests.factor

diff --git a/basis/cairo/cairo-tests.factor b/basis/cairo/cairo-tests.factor
new file mode 100644 (file)
index 0000000..bf7c468
--- /dev/null
@@ -0,0 +1,8 @@
+IN: cairo.tests
+USING: cairo tools.test math.rectangles accessors ;
+
+[ { 10 20 } ] [
+    { 10 20 } [
+        { 0 1 } { 3 4 } <rect> fill-rect
+    ] make-bitmap-image dim>>
+] unit-test
\ No newline at end of file
index 34aba6216e11e60df39b917db5c8b5738072ef73..5959eddb07c1a294973698c4e2c71e37701dea56 100644 (file)
@@ -4,10 +4,8 @@ sequences combinators.short-circuit math destructors ;
 
 [ t ] [
     [
-        "OH, HAI"
         <font> "Helvetica" >>name 12 >>size
-        dummy-cairo
-        <layout> &g_object_unref
-        layout-dim
-    ] with-destructors [ { [ integer? ] [ 0 > ] } 1&& ] all?
+        "OH, HAI"
+        cached-layout ink-rect>> dim>>
+    ] with-destructors [ 0 > ] all?
 ] unit-test
\ No newline at end of file