Skip to content

Commit

Permalink
Confirm long-running Collatz (27) works.
Browse files Browse the repository at this point in the history
  • Loading branch information
timmc committed Mar 10, 2011
1 parent 8fcb56c commit 5ccfe2e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/org/timmc/pipeline/test/core.clj
Expand Up @@ -102,4 +102,11 @@
[:decoder :done :down :up :next]))
(let [steps (iterate step c27)]
(is (= (peek-register (nth steps 0) :n) 27))
(is (= (peek-wire (nth steps 0) :halt) false)))))
(is (= (peek-wire (nth steps 0) :halt) false))
(is (= (peek-register (nth steps 1) :n) 82))
(is (= (peek-wire (nth steps 1) :halt) false))
(is (= (peek-register (nth steps 2) :n) 41))
(is (= (peek-wire (nth steps 2) :halt) false))
(is (= (first (keep-indexed (fn [i el] (if (peek-wire el :halt) i nil))
steps))
111)))))

0 comments on commit 5ccfe2e

Please sign in to comment.