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

http://github.com/abeaumont/factor · Factor · 29 lines · 18 code · 9 blank · 2 comment · 0 complexity · 71ad3a8156d3aa394e12eb7a43bc46dc MD5 · raw file

  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. [ 0 3 ]
  6. [ 1 { 3 5 7 9 11 } [ odd? ] find-nth ] unit-test
  7. [ 2 7 ]
  8. [ 3 { 3 5 7 9 11 } [ odd? ] find-nth ] unit-test
  9. [ 3 9 ]
  10. [ 3 1 { 3 5 7 9 11 } [ odd? ] find-nth-from ] unit-test
  11. [ 4 11 ]
  12. [ 1 { 3 5 7 9 11 } [ odd? ] find-last-nth ] unit-test
  13. [ 2 7 ]
  14. [ 3 { 3 5 7 9 11 } [ odd? ] find-last-nth ] unit-test
  15. [ 0 3 ]
  16. [ 1 2 { 3 5 7 9 11 } [ odd? ] find-last-nth-from ] unit-test
  17. [ 0 { 3 5 7 9 11 } [ odd? ] find-nth ]
  18. [ undefined-find-nth? ] must-fail-with
  19. [ 0 { 3 5 7 9 11 } [ odd? ] find-last-nth ]
  20. [ undefined-find-nth? ] must-fail-with