diff -r e87462c9b895 -r d29cd5883c7b pre_marking1/collatz_test2.scala --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pre_marking1/collatz_test2.scala Fri Nov 27 00:55:24 2020 +0000 @@ -0,0 +1,16 @@ +//def myassert(cond : => Boolean) = { +// try { +// assert(cond) +// } catch { +// case _ : Throwable => System.exit(1) +// } +//} + +assert(CW6a.collatz_max(10) == (19, 9)) +assert(CW6a.collatz_max(100) == (118, 97)) +assert(CW6a.collatz_max(1000) == (178, 871)) +assert(CW6a.collatz_max(10000) == (261, 6171)) +assert(CW6a.collatz_max(100000) == (350, 77031)) +assert(CW6a.collatz_max(1000000) == (524, 837799)) +assert(CW6a.collatz_max(2) == (1, 2)) +assert(CW6a.collatz_max(77000) == (339, 52527))