marking/collatz_test1.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 10 Mar 2017 06:22:30 +0000
changeset 120 564b4baec85e
parent 64 d6f97b562424
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
assert(List(0,1).contains(collatz(1)))
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
assert(collatz(2)==2)
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
assert(collatz(9)==20)
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
assert(collatz(9000)==48)
d6f97b562424 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9