remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git] / basis / suffix-arrays / suffix-arrays-tests.factor
blob5149804ce609b31f6080a005af748536e4fed863
1 ! Copyright (C) 2008 Marc Fauconneau.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test suffix-arrays kernel namespaces sequences ;
4 IN: suffix-arrays.tests
6 ! built from [ all-words 10 head [ name>> ] map ]
7 [ ] [ 
8      {
9         "run-tests"
10         "must-fail-with"
11         "test-all"
12         "short-effect"
13         "failure"
14         "test"
15         "<failure>"
16         "this-test"
17         "(unit-test)"
18         "unit-test"
19     } >suffix-array "suffix-array" set
20 ] unit-test
22 [ t ]
23 [ "suffix-array" get "" swap query empty? not ] unit-test
25 [ { } ]
26 [ SA{ } "something" swap query ] unit-test
28 [ V{ "unit-test" "(unit-test)" } ]
29 [ "suffix-array" get "unit-test" swap query ] unit-test
31 [ t ]
32 [ "suffix-array" get "something else" swap query empty? ] unit-test
34 [ V{ "rofl" } ] [ SA{ "rofl" } "r" swap query ] unit-test
35 [ V{ "rofl" } ] [ SA{ "rofl" } "o" swap query ] unit-test
36 [ V{ "rofl" } ] [ SA{ "rofl" } "f" swap query ] unit-test
37 [ V{ "rofl" } ] [ SA{ "rofl" } "l" swap query ] unit-test
38 [ V{ } ] [ SA{ "rofl" } "t" swap query ] unit-test