core_testing1/collatz_test1.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 13 Jun 2024 13:13:33 +0100
changeset 491 e2ffe8642f55
parent 472 6a77c260c8a5
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
472
6a77c260c8a5 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 399
diff changeset
     2
def urbanmain() = {
6a77c260c8a5 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 399
diff changeset
     3
  import C1._
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
472
6a77c260c8a5 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 399
diff changeset
     5
  assert(collatz(1) == 0) 
6a77c260c8a5 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 399
diff changeset
     6
  assert(collatz(6) == 8)
6a77c260c8a5 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 399
diff changeset
     7
  assert(collatz(9) == 19)
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
472
6a77c260c8a5 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 399
diff changeset
     9
}
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10