2014-11-17 20:52:58 -05:00
|
|
|
USING: arrays definitions fuel.xref fuel.xref.private io.pathnames kernel math
|
|
|
|
sequences sets tools.test ;
|
|
|
|
QUALIFIED: tools.crossref
|
2014-11-04 20:30:44 -05:00
|
|
|
IN: fuel.xref.tests
|
|
|
|
|
|
|
|
{ t } [
|
|
|
|
"fuel" apropos-xref empty? not
|
|
|
|
] unit-test
|
2014-11-05 19:20:19 -05:00
|
|
|
|
|
|
|
{ t } [
|
|
|
|
"fuel" vocab-xref length 2 =
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
{ { } } [
|
|
|
|
"i-dont-exist!" callees-xref
|
|
|
|
] unit-test
|
2014-11-17 20:52:58 -05:00
|
|
|
|
|
|
|
: random-word ( -- )
|
|
|
|
3 dup 2drop
|
|
|
|
3 1array drop ;
|
|
|
|
|
|
|
|
{ 2 } [
|
|
|
|
\ random-word tools.crossref:uses format-xrefs group-xrefs
|
|
|
|
members length
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
{ f f } [
|
|
|
|
\ drop where normalize-loc
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
{ t t } [
|
|
|
|
\ where where normalize-loc [ absolute-path? ] [ integer? ] bi*
|
|
|
|
] unit-test
|