Handbook
Glossary
check-example ( element -- )
Vocabulary
help
.
lint
.
checks
Inputs
element
a
sequence
Outputs
None
Word description
Throws an error if the expected output from the $example is different from the expected, or if it leaks disposables.
Definition
USING:
classes
combinators
eval
io
io.streams.string
kernel
math
math.statistics
namespaces
prettyprint
sequences
sets
splitting
tools.destructors
;
IN:
help.lint.checks
:
check-example
( element -- )
[
[
rest
[
but-last
join-lines
(eval-with-stack>string)
"\n"
?tail
drop
]
keep
last
assert=
]
curry
vocabs-quot
get
( quot -- )
call-effect
]
leaks
members
no-ui-disposables
dup
length
0
>
[
dup
[
class-of
]
histogram-by
[
"Leaked resources: "
write
...
]
with-string-writer
simple-lint-error
]
[
drop
]
if
;