marking/collatz_test1.scala
author Christian Urban <urbanc@in.tum.de>
Thu, 15 Nov 2018 14:23:55 +0000
changeset 203 eb188f9ac038
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