see: ERROR: should print as ERROR:.
parent
ce046b77c8
commit
a6926b19ce
|
@ -1,4 +1,5 @@
|
|||
USING: see tools.test io.streams.string math summary words ;
|
||||
USING: see tools.test io.streams.string math sequences summary
|
||||
words ;
|
||||
IN: see.tests
|
||||
|
||||
CONSTANT: test-const 10
|
||||
|
@ -6,6 +7,9 @@ CONSTANT: test-const 10
|
|||
{ "IN: see.tests\nCONSTANT: test-const 10 inline\n" }
|
||||
[ [ \ test-const see ] with-string-writer ] unit-test
|
||||
|
||||
{ "IN: sequences\nERROR: non-negative-integer-expected n ;\n" }
|
||||
[ [ \ non-negative-integer-expected see ] with-string-writer ] unit-test
|
||||
|
||||
ALIAS: test-alias +
|
||||
|
||||
{ "USING: math ;\nIN: see.tests\nALIAS: test-alias + inline\n" }
|
||||
|
@ -15,3 +19,4 @@ ALIAS: test-alias +
|
|||
[ \ test-alias summary ] unit-test
|
||||
|
||||
{ } [ gensym see ] unit-test
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
! Copyright (C) 2009, 2010 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors arrays assocs classes classes.builtin
|
||||
classes.intersection classes.mixin classes.predicate classes.singleton
|
||||
classes.tuple classes.union combinators definitions effects generic
|
||||
generic.single generic.standard generic.hook io io.pathnames
|
||||
classes.error classes.intersection classes.mixin
|
||||
classes.predicate classes.singleton classes.tuple classes.union
|
||||
combinators definitions effects generic generic.hook
|
||||
generic.single generic.standard io io.pathnames
|
||||
io.streams.string io.styles kernel make namespaces prettyprint
|
||||
prettyprint.backend prettyprint.config prettyprint.custom
|
||||
prettyprint.sections sequences sets slots sorting strings summary
|
||||
words words.symbol words.constant words.alias vocabs ;
|
||||
prettyprint.sections sequences sets slots sorting strings
|
||||
summary vocabs words words.alias words.constant words.symbol ;
|
||||
IN: see
|
||||
|
||||
GENERIC: synopsis* ( defspec -- )
|
||||
|
@ -236,6 +237,18 @@ M: word see*
|
|||
[ drop ] [ call-next-method ] if
|
||||
] tri ;
|
||||
|
||||
M: error-class see-class*
|
||||
<colon \ ERROR: pprint-word
|
||||
{
|
||||
[ pprint-word ]
|
||||
[ superclass. ]
|
||||
[ <block "slots" word-prop [ name>> pprint-slot-name ] each block> pprint-; ]
|
||||
[ tuple-declarations. ]
|
||||
} cleave
|
||||
block> ;
|
||||
|
||||
M: error-class see* see-class ;
|
||||
|
||||
: seeing-implementors ( class -- seq )
|
||||
dup implementors
|
||||
[ [ reader? ] [ writer? ] bi or ] reject
|
||||
|
|
Loading…
Reference in New Issue