]> gitweb.factorcode.org Git - factor.git/commitdiff
colors: actually add the tests this time.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 3 Apr 2013 23:14:30 +0000 (16:14 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 3 Apr 2013 23:14:30 +0000 (16:14 -0700)
basis/colors/colors-tests.factor [new file with mode: 0644]

diff --git a/basis/colors/colors-tests.factor b/basis/colors/colors-tests.factor
new file mode 100644 (file)
index 0000000..d316c2a
--- /dev/null
@@ -0,0 +1,14 @@
+USING: colors.constants kernel tools.test ;
+IN: colors
+
+{ COLOR: blue } [ COLOR: blue COLOR: red 0.0 linear-gradient ] unit-test
+{ COLOR: red } [ COLOR: blue COLOR: red 1.0 linear-gradient ] unit-test
+
+{ COLOR: blue } [ { COLOR: blue COLOR: red COLOR: green } 0.0 sample-linear-gradient ] unit-test
+{ COLOR: red } [ { COLOR: blue COLOR: red COLOR: green } 0.5 sample-linear-gradient ] unit-test
+{ COLOR: green } [ { COLOR: blue COLOR: red COLOR: green } 1.0 sample-linear-gradient ] unit-test
+
+{ t } [
+    { COLOR: blue COLOR: red } 0.5 sample-linear-gradient
+    COLOR: blue COLOR: red 0.5 linear-gradient =
+] unit-test