]> gitweb.factorcode.org Git - factor.git/commitdiff
tests: prefer ${ } instead of 1array
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 2 Jul 2015 21:56:14 +0000 (14:56 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 2 Jul 2015 21:56:14 +0000 (14:56 -0700)
basis/compiler/cfg/linear-scan/allocation/state/state-tests.factor
basis/compiler/cfg/value-numbering/value-numbering-tests.factor
basis/globs/globs-tests.factor
basis/http/http-tests.factor
basis/json/reader/reader-tests.factor

index 3fba3b97b36b0833adb551fa3120cd797dfe27b0..3e2ab01d9657af58c4bf9987c3dfad1306f2ca67 100644 (file)
@@ -1,9 +1,9 @@
-USING: accessors arrays assocs combinators.extras compiler.cfg
+USING: accessors assocs combinators.extras compiler.cfg
 compiler.cfg.instructions compiler.cfg.linear-scan.allocation
 compiler.cfg.linear-scan.allocation.state
-compiler.cfg.linear-scan.live-intervals compiler.cfg.utilities cpu.architecture
-cpu.x86.assembler.operands heaps kernel layouts namespaces sequences system
-tools.test ;
+compiler.cfg.linear-scan.live-intervals compiler.cfg.utilities
+cpu.architecture cpu.x86.assembler.operands heaps kernel layouts
+literals namespaces sequences system tools.test ;
 IN: compiler.cfg.linear-scan.allocation.state.tests
 
 ! active-intervals-for
@@ -68,18 +68,19 @@ cpu x86.64? [
 ] unit-test
 
 ! assign-spill-slot
-cpu x86.32?
-H{
-    { { 3 4 } T{ spill-slot { n 32 } } }
-    { { 1234 4 } T{ spill-slot } }
-    { { 45 16 } T{ spill-slot { n 16 } } }
-}
-H{
-    { { 3 8 } T{ spill-slot { n 32 } } }
-    { { 1234 8 } T{ spill-slot } }
-    { { 45 16 } T{ spill-slot { n 16 } } }
-} ? 1array
-[
+${
+    cpu x86.32?
+    H{
+        { { 3 4 } T{ spill-slot { n 32 } } }
+        { { 1234 4 } T{ spill-slot } }
+        { { 45 16 } T{ spill-slot { n 16 } } }
+    }
+    H{
+        { { 3 8 } T{ spill-slot { n 32 } } }
+        { { 1234 8 } T{ spill-slot } }
+        { { 45 16 } T{ spill-slot { n 16 } } }
+    } ?
+} [
     H{ } clone spill-slots set
     f f <basic-block> <cfg> cfg set
     { 1234 45 3 } { int-rep double-2-rep tagged-rep }
index f3b286dc2573228e657122ecea100ea141590821..cb2753e9db8dce7262d71ab5956f48d611b06b50 100644 (file)
@@ -1,11 +1,10 @@
-USING: compiler.cfg.value-numbering compiler.cfg.instructions
-compiler.cfg.registers compiler.cfg.debugger compiler.cfg.comparisons
-cpu.architecture tools.test kernel math combinators.short-circuit
-accessors sequences compiler.cfg.predecessors locals compiler.cfg.dce
-compiler.cfg.ssa.destruction compiler.cfg.loop-detection
-compiler.cfg.representations compiler.cfg compiler.cfg.utilities assocs vectors
-arrays layouts literals namespaces alien compiler.cfg.value-numbering.simd
-system ;
+USING: accessors alien assocs combinators.short-circuit
+compiler.cfg compiler.cfg.comparisons compiler.cfg.dce
+compiler.cfg.debugger compiler.cfg.instructions
+compiler.cfg.registers compiler.cfg.representations
+compiler.cfg.ssa.destruction compiler.cfg.utilities
+compiler.cfg.value-numbering cpu.architecture kernel layouts
+literals math namespaces sequences system tools.test ;
 QUALIFIED-WITH: alien.c-types c
 IN: compiler.cfg.value-numbering.tests
 
@@ -3039,8 +3038,8 @@ cpu x86?
 ] unit-test
 
 ! Scale fusion on ##load/store-memory
-cpu x86?
-[
+${
+    cpu x86?
     V{
         T{ ##peek f 0 D 0 }
         T{ ##peek f 1 D 1 }
@@ -3049,8 +3048,6 @@ cpu x86?
         T{ ##shl-imm f 4 3 2 }
         T{ ##load-memory f 5 2 3 2 0 int-rep c:uchar }
     }
-]
-[
     V{
         T{ ##peek f 0 D 0 }
         T{ ##peek f 1 D 1 }
@@ -3058,9 +3055,8 @@ cpu x86?
         T{ ##tagged>integer f 3 1 }
         T{ ##shl-imm f 4 3 2 }
         T{ ##load-memory f 5 2 4 0 0 int-rep c:uchar }
-    }
-] ?
-[
+    } ?
+} [
     V{
         T{ ##peek f 0 D 0 }
         T{ ##peek f 1 D 1 }
index 1abc074438b384f6890c1ce4ea1e6ae442a11bc1..658103924b7cef6736f257217be5db69915b1ae1 100755 (executable)
@@ -1,4 +1,4 @@
-USING: arrays tools.test globs io.pathnames sequences ;
+USING: globs io.pathnames literals sequences tools.test ;
 IN: globs.tests
 
 [ f ] [ "abd" "fdf" glob-matches? ] unit-test
@@ -30,7 +30,7 @@ IN: globs.tests
 [ t ] [ "fo\\*" glob-pattern? ] unit-test
 [ t ] [ "fo{o,bro}" glob-pattern? ] unit-test
 
-{ "foo" "bar" } path-separator join 1array
+${ { "foo" "bar" } path-separator join }
 [ { "foo" "bar" "ba?" } path-separator join glob-parent-directory ] unit-test
 
 [ "foo" ]
index fda88dd42aad8dad040de89a4e64b530308a2406..dafebebc870122b1e404fcc60c128d38b5a34436 100644 (file)
@@ -60,7 +60,7 @@ some-header: 1; 2
 blah
 ;
 
-read-request-test-1' 1array [
+${ read-request-test-1' } [
     read-request-test-1 lf>crlf
     [ read-request ] with-string-reader
     [ write-request ] with-string-writer
@@ -157,7 +157,7 @@ content-type: text/html; charset=UTF-8
 
 ;
 
-read-response-test-1' 1array [
+${ read-response-test-1' } [
     URL" http://localhost/" url set
     read-response-test-1 lf>crlf
     [ read-response ] with-string-reader
index a0199e35048c1d13c983e0910644bf2910922fac..bb5502eefd62b5b12f97a46086802455efd9333f 100644 (file)
@@ -1,5 +1,5 @@
-USING: assocs arrays json.reader kernel strings tools.test
-hashtables json io.streams.string math ;
+USING: hashtables io.streams.string json json.reader kernel
+literals math strings tools.test ;
 IN: json.reader.tests
 
 { f } [ "false" json> ] unit-test
@@ -30,8 +30,8 @@ IN: json.reader.tests
 { "while 1:\n\tpass" } [ """  "while 1:\n\tpass" """  json> ] unit-test
 ! unicode is allowed in json
 { "ß∂¬ƒ˚∆" } [ """  "ß∂¬ƒ˚∆""""  json> ] unit-test
-{ 8 9 10 12 13 34 47 92 } >string 1array [ """ "\\b\\t\\n\\f\\r\\"\\/\\\\" """ json> ] unit-test
-{ 0xabcd } >string 1array [ """ "\\uaBCd" """ json> ] unit-test
+${ { 8 9 10 12 13 34 47 92 } >string } [ """ "\\b\\t\\n\\f\\r\\"\\/\\\\" """ json> ] unit-test
+${ { 0xabcd } >string } [ """ "\\uaBCd" """ json> ] unit-test
 { "𝄞" } [ "\"\\ud834\\udd1e\"" json> ] unit-test
 
 { H{ { "a" { } } { "b" 123 } } } [ "{\"a\":[],\"b\":123}" json> ] unit-test