PageRenderTime 32ms CodeModel.GetById 11ms app.highlight 17ms RepoModel.GetById 2ms app.codeStats 0ms

/extra/html/parser/analyzer/analyzer-tests.factor

http://github.com/abeaumont/factor
Unknown | 29 lines | 20 code | 9 blank | 0 comment | 0 complexity | 71ad3a8156d3aa394e12eb7a43bc46dc MD5 | raw file
 1! Copyright (C) 2010 Doug Coleman.
 2! See http://factorcode.org/license.txt for BSD license.
 3USING: html.parser.analyzer math tools.test ;
 4IN: 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