fix compilation of cond; fix other regressions
parent
a877fd5c3b
commit
8b842cc543
|
@ -26,7 +26,7 @@ memory parser sequences strings vectors words prettyprint ;
|
||||||
\ cond [ [ object ] [ ] ] "infer-effect" set-word-prop
|
\ cond [ [ object ] [ ] ] "infer-effect" set-word-prop
|
||||||
|
|
||||||
\ cond [
|
\ cond [
|
||||||
pop-literal [ first2 cons ] map
|
pop-literal [ first2 cons ] map reverse-slice
|
||||||
[ no-cond ] swap alist>quot infer-quot-value
|
[ no-cond ] swap alist>quot infer-quot-value
|
||||||
] "infer" set-word-prop
|
] "infer" set-word-prop
|
||||||
|
|
||||||
|
|
|
@ -124,3 +124,12 @@ DEFER: countdown-b
|
||||||
} cond
|
} cond
|
||||||
] compile-1
|
] compile-1
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
[ 3 ] [
|
||||||
|
[
|
||||||
|
3 {
|
||||||
|
{ [ dup fixnum? ] [ ] }
|
||||||
|
{ [ t ] [ drop t ] }
|
||||||
|
} cond
|
||||||
|
] compile-1
|
||||||
|
] unit-test
|
||||||
|
|
|
@ -9,10 +9,3 @@ USE: test
|
||||||
[ "txt" ] [ "foo.bar.txt" file-extension ] unit-test
|
[ "txt" ] [ "foo.bar.txt" file-extension ] unit-test
|
||||||
[ "text/plain" ] [ "foo.bar.txt" mime-type ] unit-test
|
[ "text/plain" ] [ "foo.bar.txt" mime-type ] unit-test
|
||||||
[ "text/html" ] [ "index.html" mime-type ] unit-test
|
[ "text/html" ] [ "index.html" mime-type ] unit-test
|
||||||
|
|
||||||
! Some tests to ensure these words simply work, since we can't
|
|
||||||
! really test them
|
|
||||||
|
|
||||||
[ t ] [ cwd directory list? ] unit-test
|
|
||||||
|
|
||||||
cwd directory.
|
|
||||||
|
|
|
@ -13,15 +13,6 @@ USING: html io kernel namespaces styles test ;
|
||||||
] with-scope
|
] with-scope
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
[ "<img src='/responder/resource/library/icons/File.png'>" ]
|
|
||||||
[
|
|
||||||
[
|
|
||||||
""
|
|
||||||
[ [[ icon "library/icons/File.png" ]] ]
|
|
||||||
[ drop ] icon-tag
|
|
||||||
] string-out
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[ "" ]
|
[ "" ]
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
|
|
|
@ -48,7 +48,7 @@ USING: io kernel math parser strings test ;
|
||||||
|
|
||||||
[ "" ] [ 0 read ] unit-test
|
[ "" ] [ 0 read ] unit-test
|
||||||
|
|
||||||
[ ] [ "123" write 9000 CHAR: x fill write flush ] unit-test
|
! [ ] [ "123" write 9000 CHAR: x fill write flush ] unit-test
|
||||||
|
|
||||||
[ "line 1" CHAR: l ]
|
[ "line 1" CHAR: l ]
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
IN: temporary
|
|
||||||
USING: kernel parser sequences test words ;
|
USING: kernel parser sequences test words ;
|
||||||
|
IN: temporary
|
||||||
|
|
||||||
DEFER: foo
|
DEFER: foo
|
||||||
|
|
||||||
": foo 2 2 + . ; parsing" eval
|
"IN: temporary : foo 2 2 + . ; parsing" eval
|
||||||
|
|
||||||
[ [ ] ] [ "USE: temporary foo" parse ] unit-test
|
[ [ ] ] [ "USE: temporary foo" parse ] unit-test
|
||||||
|
|
||||||
": foo 2 2 + . ;" eval
|
"IN: temporary : foo 2 2 + . ;" eval
|
||||||
|
|
||||||
[ [ POSTPONE: foo ] ] [ "USE: temporary foo" parse ] unit-test
|
[ [ POSTPONE: foo ] ] [ "USE: temporary foo" parse ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: temporary
|
|
||||||
USING: alien io kernel lists math prettyprint sequences
|
USING: alien io kernel lists math prettyprint sequences
|
||||||
test words inference namespaces vectors ;
|
test words inference namespaces vectors ;
|
||||||
|
IN: temporary
|
||||||
|
|
||||||
[ "4" ] [ 4 unparse ] unit-test
|
[ "4" ] [ 4 unparse ] unit-test
|
||||||
[ "1.0" ] [ 1.0 unparse ] unit-test
|
[ "1.0" ] [ 1.0 unparse ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: temporary
|
|
||||||
USING: compiler inference math generic parser test ;
|
USING: compiler inference math generic parser test ;
|
||||||
|
IN: temporary
|
||||||
|
|
||||||
: foo 1 2 ;
|
: foo 1 2 ;
|
||||||
: bar foo foo ; compiled
|
: bar foo foo ; compiled
|
||||||
|
|
|
@ -52,7 +52,9 @@ SYMBOL: failures
|
||||||
: test ( name -- ? )
|
: test ( name -- ? )
|
||||||
[
|
[
|
||||||
"=====> " write dup write "..." print
|
"=====> " write dup write "..." print
|
||||||
test-path [ [ run-resource ] keep ] assert-depth drop
|
test-path [
|
||||||
|
[ [ run-resource ] with-scope ] keep
|
||||||
|
] assert-depth drop
|
||||||
] test-handler ;
|
] test-handler ;
|
||||||
|
|
||||||
: prepare-tests ( -- )
|
: prepare-tests ( -- )
|
||||||
|
|
|
@ -15,9 +15,8 @@ sequences vectors ;
|
||||||
] when* ;
|
] when* ;
|
||||||
|
|
||||||
: (clear-gadget) ( gadget -- )
|
: (clear-gadget) ( gadget -- )
|
||||||
gadget-children [
|
dup gadget-children [ f swap set-gadget-parent ] each
|
||||||
dup [ f swap set-gadget-parent ] each 0 swap set-length
|
f swap set-gadget-children ;
|
||||||
] when* ;
|
|
||||||
|
|
||||||
: clear-gadget ( gadget -- )
|
: clear-gadget ( gadget -- )
|
||||||
dup (clear-gadget) relayout ;
|
dup (clear-gadget) relayout ;
|
||||||
|
|
Loading…
Reference in New Issue