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