factor/unfinished/compiler/tree/copy-equiv/copy-equiv-tests.factor

26 lines
691 B
Factor

IN: compiler.tree.copy-equiv.tests
USING: compiler.tree.copy-equiv tools.test namespaces kernel
assocs ;
H{ } clone copies set
[ ] [ 0 introduce-value ] unit-test
[ ] [ 1 introduce-value ] unit-test
[ ] [ 1 2 is-copy-of ] unit-test
[ ] [ 2 3 is-copy-of ] unit-test
[ ] [ 2 4 is-copy-of ] unit-test
[ ] [ 4 5 is-copy-of ] unit-test
[ ] [ 0 6 is-copy-of ] unit-test
[ 0 ] [ 0 resolve-copy ] unit-test
[ 1 ] [ 5 resolve-copy ] unit-test
! Make sure that we did path compression
[ 1 ] [ 5 copies get at ] unit-test
[ 1 ] [ 1 resolve-copy ] unit-test
[ 1 ] [ 2 resolve-copy ] unit-test
[ 1 ] [ 3 resolve-copy ] unit-test
[ 1 ] [ 4 resolve-copy ] unit-test
[ 0 ] [ 6 resolve-copy ] unit-test