]> gitweb.factorcode.org Git - factor.git/commitdiff
google.charts: make the tests check more things.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 21 Dec 2016 23:25:00 +0000 (15:25 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 21 Dec 2016 23:25:00 +0000 (15:25 -0800)
extra/google/charts/charts-tests.factor

index cd3a7eebd85def5f07aeb318a72abeac90e7acc3..6dd9c7640fc9eb56f97bb4620b0914d3f6774a5f 100644 (file)
@@ -1,35 +1,42 @@
 ! Copyright (C) 2016 Alexander Ilin.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors colors.constants google.charts
-google.charts.private kernel present sequences tools.test ;
+google.charts.private kernel math present sequences tools.test ;
 IN: google.charts.tests
 
-[ f ] [
-    { 0 0 } <line> COLOR: red >>background chart>url present length
-    { 0 0 } <line> chart>url present length =
+{ t } [
+
+    { 0 0 } <line>
+    { 0 0 } <line> COLOR: red >>background
+    [ chart>url present length ] bi@ <
 ] unit-test
 
-[ f ] [
-    { 0 0 } <line> COLOR: red >>foreground chart>url present length
-    { 0 0 } <line> chart>url present length =
+{ t } [
+    { 0 0 } <line>
+    { 0 0 } <line> COLOR: red >>foreground
+    [ chart>url present length ] bi@ <
 ] unit-test
 
-[ f ] [
-    "" <formula> t >>data-scale chart>url present length
-    "" <formula> chart>url present length =
+{ t } [
+    "" <formula>
+    "" <formula> t >>data-scale
+    [ chart>url present length ] bi@ <
 ] unit-test
 
-[ f ] [
-    { 0 0 } <line> f >>width f >>height chart>url present length
-    { 0 0 } <line> chart>url present length =
+{ t } [
+    { 0 0 } <line>
+    { 0 0 } <line> f >>width f >>height
+    [ chart>url present length ] bi@ >
 ] unit-test
 
-[ f ] [
-    { 0 0 } <line> { 0 0 } >>margin chart>url present length
-    { 0 0 } <line> chart>url present length =
+{ t } [
+    { 0 0 } <line>
+    { 0 0 } <line> { 0 0 } >>margin
+    [ chart>url present length ] bi@ <
 ] unit-test
 
-[ f ] [
-    { 0 0 } <line> 5 >>bar-width chart>url present length
-    { 0 0 } <line> chart>url present length =
+{ t } [
+    { 0 0 } <line>
+    { 0 0 } <line> 5 >>bar-width
+    [ chart>url present length ] bi@ <
 ] unit-test