]> gitweb.factorcode.org Git - factor.git/commitdiff
More fixes
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 25 Jun 2008 09:06:18 +0000 (04:06 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 25 Jun 2008 09:06:18 +0000 (04:06 -0500)
core/parser/parser-tests.factor
core/parser/parser.factor
core/prettyprint/prettyprint-tests.factor
core/source-files/source-files.factor
core/vocabs/loader/loader-tests.factor
extra/http/http-tests.factor
extra/opengl/shaders/shaders.factor
extra/unicode/collation/collation-tests.factor
extra/webapps/wee-url/wee-url.factor

index eb37d556d032208772aa28906151a6a4b615efc7..074b3738acef0c61ab7472b8e793e94c9b07b92f 100755 (executable)
@@ -198,7 +198,7 @@ IN: parser.tests
     [
         "IN: parser.tests : x ; : y 3 throw ; this is an error"
         <string-reader> "a" parse-stream
-    ] [ parse-error? ] must-fail-with
+    ] [ source-file-error? ] must-fail-with
 
     [ t ] [
         "y" "parser.tests" lookup >boolean
@@ -298,12 +298,12 @@ IN: parser.tests
     [
         "IN: parser.tests TUPLE: another-pred-test ; GENERIC: another-pred-test?"
         <string-reader> "removing-the-predicate" parse-stream
-    ] [ error>> error>> redefine-error? ] must-fail-with
+    ] [ error>> error>> error>> redefine-error? ] must-fail-with
 
     [
         "IN: parser.tests TUPLE: class-redef-test ; TUPLE: class-redef-test ;"
         <string-reader> "redefining-a-class-1" parse-stream
-    ] [ error>> error>> redefine-error? ] must-fail-with
+    ] [ error>> error>> error>> redefine-error? ] must-fail-with
 
     [ ] [
         "IN: parser.tests TUPLE: class-redef-test ; SYMBOL: class-redef-test"
@@ -313,7 +313,7 @@ IN: parser.tests
     [
         "IN: parser.tests TUPLE: class-redef-test ; SYMBOL: class-redef-test : class-redef-test ;"
         <string-reader> "redefining-a-class-3" parse-stream drop
-    ] [ error>> error>> redefine-error? ] must-fail-with
+    ] [ error>> error>> error>> redefine-error? ] must-fail-with
 
     [ ] [
         "IN: parser.tests TUPLE: class-fwd-test ;"
@@ -323,7 +323,7 @@ IN: parser.tests
     [
         "IN: parser.tests \\ class-fwd-test"
         <string-reader> "redefining-a-class-3" parse-stream drop
-    ] [ error>> error>> no-word-error? ] must-fail-with
+    ] [ error>> error>> error>> no-word-error? ] must-fail-with
 
     [ ] [
         "IN: parser.tests TUPLE: class-fwd-test ; SYMBOL: class-fwd-test"
@@ -333,12 +333,12 @@ IN: parser.tests
     [
         "IN: parser.tests \\ class-fwd-test"
         <string-reader> "redefining-a-class-3" parse-stream drop
-    ] [ error>> error>> no-word-error? ] must-fail-with
+    ] [ error>> error>> error>> no-word-error? ] must-fail-with
 
     [
         "IN: parser.tests : foo ; TUPLE: foo ;"
         <string-reader> "redefining-a-class-4" parse-stream drop
-    ] [ error>> error>> redefine-error? ] must-fail-with
+    ] [ error>> error>> error>> redefine-error? ] must-fail-with
 
     [ ] [
         "IN: parser.tests : foo ( x y -- z ) 1 2 ; : bar ( a -- b ) ;" eval
index 44708f11f369ea323be2dbe18b1cd9bb8bcc2606..601245c463ab07b9c8a186d22da65f9f438d790b 100755 (executable)
@@ -24,12 +24,8 @@ t parser-notes set-global
 
 : note. ( str -- )
     parser-notes? [
-        file get file.
-        lexer get [
-            lexer-line number>string print
-        ] [
-            nl
-        ] if*
+        file get [ file. ] when*
+        lexer get line>> number>string write ": " write
         "Note: " write dup print
     ] when drop ;
 
index d5f4dd5906f80c8b00215422785de28b588ae333..9e11611f5b53407cc6702c31129f829624d82876 100755 (executable)
@@ -167,9 +167,11 @@ unit-test
     "another-retain-layout" another-retain-layout-test check-see
 ] unit-test
 
+DEFER: parse-error-file
+
 : another-soft-break-test
     {
-        "USING: namespaces parser sequences ;"
+        "USING: namespaces sequences ;"
         "IN: prettyprint.tests"
         ": another-soft-break-layout ( node -- quot )"
         "    parse-error-file"
@@ -183,7 +185,7 @@ unit-test
 
 : string-layout
     {
-        "USING: io kernel parser ;"
+        "USING: io kernel lexer ;"
         "IN: prettyprint.tests"
         ": string-layout-test ( error -- )"
         "    \"Expected \" write dup unexpected-want expected>string write"
index 0577dacc8529d6ebd0785df39d8d51c06f8d2375..2c5c19708e5c2f3eae95bda558fd5eee3937194f 100755 (executable)
@@ -82,11 +82,10 @@ TUPLE: source-file-error file error ;
         file get >>file
         swap >>error ;
 
-: file. ( file -- ) path>> <pathname> pprint ;
+: file. ( file -- ) path>> <pathname> . ;
 
 M: source-file-error error.
-    "Error while parsing " write
-    [ file>> file. nl ] [ error>> error. ] bi ;
+    [ file>> file. ] [ error>> error. ] bi ;
 
 M: source-file-error summary
     error>> summary ;
index 45b0d6b0191f4c69b6b6a9eac184f12ba5c998c1..5ed0b0a34c1287723525ff1cc69d364562424d94 100755 (executable)
@@ -68,7 +68,7 @@ IN: vocabs.loader.tests
     <string-reader>
     "resource:core/vocabs/loader/test/a/a.factor"
     parse-stream
-] [ error>> error>> no-word-error? ] must-fail-with
+] [ error>> error>> error>> no-word-error? ] must-fail-with
 
 0 "count-me" set-global
 
index a920d4e67a71f73f397e911c531500c834d033b5..2a02d2cc20d398b187ef20ed21987d4fa67cf4b9 100755 (executable)
@@ -1,8 +1,8 @@
-USING: http tools.test multiline tuple-syntax
-io.streams.string io.encodings.utf8 io.encodings.string
-kernel arrays splitting sequences
-assocs io.sockets db db.sqlite continuations urls hashtables
-accessors ;
+USING: http tools.test multiline tuple-syntax io.streams.string
+io.encodings.utf8 io.encodings.8-bit io.encodings.binary
+io.encodings.string kernel arrays splitting sequences assocs
+io.sockets db db.sqlite continuations urls hashtables accessors
+;
 IN: http.tests
 
 [ "text/plain" latin1 ] [ "text/plain" parse-content-type ] unit-test
index 7c18736bdee41b9d912d2ba979666f5ee4031fbe..c05e180c115e889746aa1776a51fa4ccdd22fb17 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: kernel opengl.gl alien.c-types continuations namespaces
 assocs alien alien.strings libc opengl math sequences combinators
-macros arrays io.encodings.ascii ;
+combinators.lib macros arrays io.encodings.ascii ;
 IN: opengl.shaders
 
 : with-gl-shader-source-ptr ( string quot -- )
index 5bc25de804f64811777d43dd96487029e1aef9c0..d523a15ada84cfe5f6238adf50881f42a4655f11 100755 (executable)
@@ -17,7 +17,7 @@ IN: unicode.collation.tests
 \r
 : test-equality\r
     { primary= secondary= tertiary= quaternary= }\r
-    [ execute ] 2with each ;\r
+    [ execute ] with with each ;\r
 \r
 [ f f f f ] [ "hello" "hi" test-equality ] unit-test\r
 [ t f f f ] [ "hello" "h\u0000e9llo" test-equality ] unit-test\r
index 5f354b2a19708c8ce69fc0d943806b0309c08294..27187c4352e30f638866921243d7a7bf1e013fcb 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2007 Doug Coleman.
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: math.ranges sequences random accessors
+USING: math.ranges sequences random accessors combinators.lib
 kernel namespaces fry db.types db.tuples urls validators
 html.components html.forms http http.server.dispatchers furnace
 furnace.actions furnace.boilerplate furnace.redirection ;