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 [
|
||||
pop-literal [ first2 cons ] map
|
||||
pop-literal [ first2 cons ] map reverse-slice
|
||||
[ no-cond ] swap alist>quot infer-quot-value
|
||||
] "infer" set-word-prop
|
||||
|
||||
|
|
|
@ -124,3 +124,12 @@ DEFER: countdown-b
|
|||
} cond
|
||||
] compile-1
|
||||
] 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
|
||||
[ "text/plain" ] [ "foo.bar.txt" 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
|
||||
] 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
|
||||
|
||||
[ ] [ "123" write 9000 CHAR: x fill write flush ] unit-test
|
||||
! [ ] [ "123" write 9000 CHAR: x fill write flush ] unit-test
|
||||
|
||||
[ "line 1" CHAR: l ]
|
||||
[
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
IN: temporary
|
||||
USING: kernel parser sequences test words ;
|
||||
IN: temporary
|
||||
|
||||
DEFER: foo
|
||||
|
||||
": foo 2 2 + . ; parsing" eval
|
||||
"IN: temporary : foo 2 2 + . ; parsing" eval
|
||||
|
||||
[ [ ] ] [ "USE: temporary foo" parse ] unit-test
|
||||
|
||||
": foo 2 2 + . ;" eval
|
||||
"IN: temporary : foo 2 2 + . ;" eval
|
||||
|
||||
[ [ POSTPONE: foo ] ] [ "USE: temporary foo" parse ] unit-test
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
IN: temporary
|
||||
USING: alien io kernel lists math prettyprint sequences
|
||||
test words inference namespaces vectors ;
|
||||
IN: temporary
|
||||
|
||||
[ "4" ] [ 4 unparse ] unit-test
|
||||
[ "1.0" ] [ 1.0 unparse ] unit-test
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
IN: temporary
|
||||
USING: compiler inference math generic parser test ;
|
||||
IN: temporary
|
||||
|
||||
: foo 1 2 ;
|
||||
: bar foo foo ; compiled
|
||||
|
|
|
@ -52,7 +52,9 @@ SYMBOL: failures
|
|||
: test ( name -- ? )
|
||||
[
|
||||
"=====> " write dup write "..." print
|
||||
test-path [ [ run-resource ] keep ] assert-depth drop
|
||||
test-path [
|
||||
[ [ run-resource ] with-scope ] keep
|
||||
] assert-depth drop
|
||||
] test-handler ;
|
||||
|
||||
: prepare-tests ( -- )
|
||||
|
|
|
@ -15,9 +15,8 @@ sequences vectors ;
|
|||
] when* ;
|
||||
|
||||
: (clear-gadget) ( gadget -- )
|
||||
gadget-children [
|
||||
dup [ f swap set-gadget-parent ] each 0 swap set-length
|
||||
] when* ;
|
||||
dup gadget-children [ f swap set-gadget-parent ] each
|
||||
f swap set-gadget-children ;
|
||||
|
||||
: clear-gadget ( gadget -- )
|
||||
dup (clear-gadget) relayout ;
|
||||
|
|
Loading…
Reference in New Issue