]> gitweb.factorcode.org Git - factor.git/blob - basis/sorting/title/title-tests.factor
aae733281afc651ec84f135c6c1e1ca09bb7839c
[factor.git] / basis / sorting / title / title-tests.factor
1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test sorting.title sorting.slots ;
4 IN: sorting.title.tests
5
6 : sort-me ( -- seq )
7     {
8         "The Beatles"
9         "A river runs through it"
10         "Another"
11         "The"
12         "A"
13         "Los"
14         "la vida loca"
15         "Basketball"
16         "racquetball"
17         "Los Fujis"
18         "los Fujis"
19         "La cucaracha"
20         "a day to remember"
21         "of mice and men"
22         "on belay"
23         "for the horde"
24     } ;
25 {
26     {
27         "A"
28         "Another"
29         "Basketball"
30         "The Beatles"
31         "La cucaracha"
32         "a day to remember"
33         "for the horde"
34         "Los Fujis"
35         "los Fujis"
36         "Los"
37         "of mice and men"
38         "on belay"
39         "racquetball"
40         "A river runs through it"
41         "The"
42         "la vida loca"
43     }
44 } [
45     sort-me { title<=> } sort-by
46 ] unit-test