]> gitweb.factorcode.org Git - factor.git/commitdiff
disjoint-sets: add some tests for compiler bug; eventually more tests should be writt...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 30 Jun 2009 21:08:16 +0000 (16:08 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 30 Jun 2009 21:08:16 +0000 (16:08 -0500)
basis/disjoint-sets/disjoint-sets-tests.factor [new file with mode: 0644]

diff --git a/basis/disjoint-sets/disjoint-sets-tests.factor b/basis/disjoint-sets/disjoint-sets-tests.factor
new file mode 100644 (file)
index 0000000..74746f1
--- /dev/null
@@ -0,0 +1,16 @@
+IN: disjoint-sets.testes
+USING: tools.test disjoint-sets namespaces slots.private ;
+
+SYMBOL: +blah+
+-405534154 +blah+ 1 set-slot
+
+SYMBOL: uf
+
+[ ] [
+    <disjoint-set> uf set
+    +blah+ uf get add-atom
+    19026 uf get add-atom
+    19026 +blah+ uf get equate
+] unit-test
+
+[ 2 ] [ 19026 uf get equiv-set-size ] unit-test