2004-08-16 21:11:27 -04:00
|
|
|
IN: scratchpad
|
|
|
|
USE: errors
|
|
|
|
USE: kernel
|
|
|
|
USE: namespaces
|
|
|
|
USE: test
|
2004-11-25 20:37:05 -05:00
|
|
|
USE: lists
|
2004-11-25 23:14:17 -05:00
|
|
|
USE: parser
|
|
|
|
USE: stdio
|
2004-08-16 21:11:27 -04:00
|
|
|
|
|
|
|
[ f ] [ [ ] [ ] catch ] unit-test
|
|
|
|
|
|
|
|
[ 5 ] [ [ 5 throw ] [ ] catch ] unit-test
|
|
|
|
|
|
|
|
[ t ] [
|
|
|
|
[ "Hello" throw ] [ drop ] catch
|
|
|
|
global [ "error" get ] bind
|
|
|
|
"Hello" =
|
|
|
|
] unit-test
|
2004-11-25 20:37:05 -05:00
|
|
|
|
2004-11-25 23:14:17 -05:00
|
|
|
"!!! The following error is part of the test" print
|
|
|
|
|
|
|
|
[ ] [ [ 6 [ 12 [ "2 car" ] ] ] default-error-handler ] unit-test
|
|
|
|
|
|
|
|
"!!! The following error is part of the test" print
|
|
|
|
|
|
|
|
[ [ "2 car" ] parse ] [ default-error-handler ] catch
|
2004-12-22 22:16:46 -05:00
|
|
|
|
|
|
|
[ [ "\"\" { } vector-nth" ] parse ] [ type-check-error ] catch
|
|
|
|
|
|
|
|
[ "cons" ] [ [ 1 2 ] type type-error-name ] unit-test
|