testing1/collatz_test2.scala
author Christian Urban <urbanc@in.tum.de>
Wed, 28 Nov 2018 23:26:47 +0000
changeset 220 3020f8c76baa
parent 199 54befaf23648
child 281 87b9e3e2c1a7
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     3
assert(collatz_max(10) == (19, 9))
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     5
assert(collatz_max(100) == (118, 97))
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     7
assert(collatz_max(1000) == (178, 871))
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     9
assert(collatz_max(10000) == (261, 6171))
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
    11
assert(collatz_max(100000) == (350, 77031))
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
    13
assert(collatz_max(1000000) == (524, 837799))