pre_testing1/collatz_test1.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sat, 31 Oct 2020 16:47:46 +0000
changeset 345 40657f9a4e4a
parent 281 testing1/collatz_test1.scala@87b9e3e2c1a7
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
147
72f7dd1a3754 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     1
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     2
import CW6a._
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     4
assert(collatz(1) == 0) 
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 147
diff changeset
     5
assert(collatz(6) == 8)
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 147
diff changeset
     6
assert(collatz(9) == 19)
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8