]> gitweb.factorcode.org Git - factor.git/commitdiff
db.tuples: use natural-sort in test case.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Feb 2018 22:23:22 +0000 (14:23 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 22 Feb 2018 22:23:22 +0000 (14:23 -0800)
basis/db/tuples/tuples-tests.factor

index c850d1568aec9f226e62effa57ec235f94a7d73c..275f47f89e78efb38bf495191fcba3607a66b6d8 100644 (file)
@@ -3,7 +3,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors calendar calendar.parser classes continuations
 db.tester db.tuples db.types kernel math math.intervals math.ranges
-namespaces random sequences strings tools.test urls ;
+namespaces random sequences sorting strings tools.test urls ;
 FROM: math.ranges => [a,b] ;
 IN: db.tuples.tests
 
@@ -678,16 +678,18 @@ select-me "select_me"
         select-me new [ data>> ] collector [ each-tuple ] dip
     ] unit-test
 
-    [ V{ "test" "test2" } ] [
+    [ { "test" "test2" } ] [
         select-me new NULL >>data [ "test" >>data ] update-tuples
         select-me new [ data>> ] collector [ each-tuple ] dip
+        natural-sort
     ] unit-test
 
-    [ V{ "test1" "test2" } ] [
+    [ { "test1" "test2" } ] [
         select-me new [
             dup data>> "test" = [ "test1" >>data ] [ drop f ] if
         ] update-tuples
         select-me new [ data>> ] collector [ each-tuple ] dip
+        natural-sort
     ] unit-test ;
 
 [ test-mapping ] test-sqlite