]> gitweb.factorcode.org Git - factor.git/blob - basis/colors/lab/lab-tests.factor
factor: trim using lists
[factor.git] / basis / colors / lab / lab-tests.factor
1 ! Copyright (C) 2014 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
3
4 USING: arrays colors colors.lab kernel math.functions
5 ranges sequences tools.test ;
6
7 { t } [
8     0.0 1.0 0.1 <range> [| r |
9         0.0 1.0 0.1 <range> [| g |
10             0.0 1.0 0.1 <range> [| b |
11                 r g b 1.0 <rgba> dup >laba >rgba
12                 [ >rgba-components 4array ] bi@
13                 [ 0.00001 ~ ] 2all?
14             ] all?
15         ] all?
16     ] all?
17 ] unit-test