marking/collatz_test1.scala
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Mon, 05 Aug 2019 20:14:06 +0100
changeset 269 86a85865e772
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