pre_marking1/collatz_test2.scala
changeset 424 daf561a83ba6
parent 423 e9d14d58be3c
child 425 957808dcb367
equal deleted inserted replaced
423:e9d14d58be3c 424:daf561a83ba6
     1 //def myassert(cond : => Boolean) = {
       
     2 //  try {
       
     3 //    assert(cond)
       
     4 //  } catch { 
       
     5 //    case _ : Throwable => System.exit(1)
       
     6 //  }
       
     7 //}
       
     8 
       
     9 assert(CW6a.collatz_max(10) == (19, 9))
       
    10 assert(CW6a.collatz_max(100) == (118, 97))
       
    11 assert(CW6a.collatz_max(1000) == (178, 871))
       
    12 assert(CW6a.collatz_max(10000) == (261, 6171))
       
    13 assert(CW6a.collatz_max(100000) == (350, 77031))
       
    14 assert(CW6a.collatz_max(1000000) == (524, 837799))
       
    15 assert(CW6a.collatz_max(2) == (1, 2))
       
    16 assert(CW6a.collatz_max(77000) == (339, 52527))