]> gitweb.factorcode.org Git - factor.git/blob - basis/regexp/negation/negation-tests.factor
factor: clean up spaces in -tests files
[factor.git] / basis / regexp / negation / negation-tests.factor
1 ! Copyright (C) 2009 Daniel Ehrenberg.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test regexp.negation regexp.transition-tables regexp.classes ;
4 IN: regexp.negation.tests
5
6 [
7     ! R/ |[^a]|.+/
8     T{ transition-table
9         { transitions H{
10             { 0 H{ { CHAR: a 1 } { T{ not-class f CHAR: a } -1 } } }
11             { 1 H{ { t -1 } } }
12             { -1 H{ { t -1 } } }
13         } }
14         { start-state 0 }
15         { final-states HS{ 0 -1 } }
16     }
17 ] [
18     ! R/ a/
19     T{ transition-table
20         { transitions H{
21             { 0 H{ { CHAR: a 1 } } }
22             { 1 H{ } }
23         } }
24         { start-state 0 }
25         { final-states HS{ 1 } }
26     } negate-table
27 ] unit-test