]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/regexp/minimize/minimize-tests.factor
Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring...
[factor.git] / basis / regexp / minimize / minimize-tests.factor
index fc80cc0ac36e3d228630e6f58e471fed8de149b7..8a018ea60ade42884b8990aa8a73f589285b60c9 100644 (file)
@@ -5,27 +5,27 @@ accessors regexp.transition-tables regexp.parser
 regexp.classes regexp.negation ;
 IN: regexp.minimize.tests
 
-{ t } [ 1 2 H{ { { 1 2 } t } } same-partition? ] unit-test
-{ t } [ 2 1 H{ { { 1 2 } t } } same-partition? ] unit-test
-{ f } [ 2 3 H{ { { 1 2 } t } } same-partition? ] unit-test
+[ t ] [ 1 2 H{ { { 1 2 } t } } same-partition? ] unit-test
+[ t ] [ 2 1 H{ { { 1 2 } t } } same-partition? ] unit-test
+[ f ] [ 2 3 H{ { { 1 2 } t } } same-partition? ] unit-test
 
-{ H{ { 1 1 } { 2 1 } { 3 3 } { 4 3 } } }
+[ H{ { 1 1 } { 2 1 } { 3 3 } { 4 3 } } ]
 [ { { 1 1 } { 1 2 } { 2 2 } { 3 3 } { 3 4 } { 4 4 } } [ t ] H{ } map>assoc partition>classes ] unit-test
 
-{ { { 1 2 } { 3 4 } } } [ H{ { "elephant" 1 } { "tiger" 3 } } H{ { "elephant" 2 } { "tiger" 4 } } assemble-values ] unit-test
+[ { { 1 2 } { 3 4 } } ] [ H{ { "elephant" 1 } { "tiger" 3 } } H{ { "elephant" 2 } { "tiger" 4 } } assemble-values ] unit-test
 
 : regexp-states ( string -- n )
     parse-regexp ast>dfa transitions>> assoc-size ;
 
-{ 3 } [ "ab|ac" regexp-states ] unit-test
-{ 3 } [ "a(b|c)" regexp-states ] unit-test
-{ 1 } [ "((aa*)*)*" regexp-states ] unit-test
-{ 1 } [ "a|((aa*)*)*" regexp-states ] unit-test
-{ 2 } [ "ab|((aa*)*)*b" regexp-states ] unit-test
-{ 4 } [ "ab|cd" regexp-states ] unit-test
-{ 1 } [ "(?i:[a-z]*|[A-Z]*)" regexp-states ] unit-test
+[ 3 ] [ "ab|ac" regexp-states ] unit-test
+[ 3 ] [ "a(b|c)" regexp-states ] unit-test
+[ 1 ] [ "((aa*)*)*" regexp-states ] unit-test
+[ 1 ] [ "a|((aa*)*)*" regexp-states ] unit-test
+[ 2 ] [ "ab|((aa*)*)*b" regexp-states ] unit-test
+[ 4 ] [ "ab|cd" regexp-states ] unit-test
+[ 1 ] [ "(?i:[a-z]*|[A-Z]*)" regexp-states ] unit-test
 
-{
+[
     T{ transition-table
         { transitions H{
             { 0 H{ { CHAR: a 1 } { CHAR: b 1 } } }
@@ -36,7 +36,7 @@ IN: regexp.minimize.tests
         { start-state 0 }
         { final-states HS{ 3 } }
     }
-} [
+] [
     T{ transition-table
         { transitions H{
             { 0 H{ { CHAR: a 1 } { CHAR: b 4 } } }
@@ -54,5 +54,5 @@ IN: regexp.minimize.tests
 
 [ [ ] [ ] while-changes ] must-infer
 
-{ H{ { T{ or-class f { 2 1 } } 3 } { 4 5 } } }
+[ H{ { T{ or-class f { 2 1 } } 3 } { 4 5 } } ]
 [ H{ { 1 3 } { 2 3 } { 4 5 } } combine-state-transitions ] unit-test