]> gitweb.factorcode.org Git - factor.git/blob - extra/html/parser/analyzer/analyzer-tests.factor
Simplify combinator with joe's suggestion, unit test
[factor.git] / extra / html / parser / analyzer / analyzer-tests.factor
1 ! Copyright (C) 2010 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: html.parser.analyzer math tools.test ;
4 IN: html.parser.analyzer.tests
5
6 [ 0 3 ]
7 [ 1 { 3 5 7 9 11 } [ odd? ] find-nth ] unit-test
8
9 [ 2 7 ]
10 [ 3 { 3 5 7 9 11 } [ odd? ] find-nth ] unit-test
11
12 [ 3 9 ]
13 [ 3 1 { 3 5 7 9 11 } [ odd? ] find-nth-from ] unit-test
14
15 [ 4 11 ]
16 [ 1 { 3 5 7 9 11 } [ odd? ] find-last-nth ] unit-test
17
18 [ 2 7 ]
19 [ 3 { 3 5 7 9 11 } [ odd? ] find-last-nth ] unit-test
20
21 [ 0 3 ]
22 [ 1 2 { 3 5 7 9 11 } [ odd? ] find-last-nth-from ] unit-test
23
24
25 [ 0 { 3 5 7 9 11 } [ odd? ] find-nth ]
26 [ undefined-find-nth? ] must-fail-with
27
28 [ 0 { 3 5 7 9 11 } [ odd? ] find-last-nth ]
29 [ undefined-find-nth? ] must-fail-with