]> gitweb.factorcode.org Git - factor.git/blob - basis/sorting/title/title-tests.factor
65a58e463d8437b9de7029927baecaedb9cbc04d
[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         "la vida loca"
12         "Basketball"
13         "racquetball"
14         "Los Fujis"
15         "los Fujis"
16         "La cucaracha"
17         "a day to remember"
18         "of mice and men"
19         "on belay"
20         "for the horde"
21     } ;
22 [
23     {
24         "Another"
25         "Basketball"
26         "The Beatles"
27         "La cucaracha"
28         "a day to remember"
29         "for the horde"
30         "Los Fujis"
31         "los Fujis"
32         "of mice and men"
33         "on belay"
34         "racquetball"
35         "A river runs through it"
36         "la vida loca"
37     }
38 ] [
39     sort-me { title<=> } sort-by
40 ] unit-test