[
"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
[
"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"
[
"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 ;"
[
"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"
[
"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
: 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 ;
"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"
: 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"
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 ;
<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
-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
! 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 -- )
\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
! 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 ;