1 ! Copyright (C) 2008 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
4 USING: kernel tools.test sequences ;
6 { { V{ } } } [ { } 1 binpack ] unit-test
8 { { V{ 3 } V{ 2 1 } } } [ { 1 2 3 } 2 binpack ] unit-test
10 { { V{ 1000 } V{ 100 60 30 7 } V{ 70 60 40 23 3 } } }
11 [ { 100 23 40 60 1000 30 60 07 70 03 } 3 binpack ] unit-test
15 V{ "violet" "orange" }
17 V{ "yellow" "blue" "red" }
20 { "red" "orange" "yellow" "green" "blue" "indigo" "violet" }
21 [ length ] 3 map-binpack