cw5_marking/c4.sc
changeset 1039 86d59b074abe
parent 977 7a02c5b9e0df
equal deleted inserted replaced
1038:34d2cfb7761a 1039:86d59b074abe
    31 val out = os.read(os.pwd / "mand.out")
    31 val out = os.read(os.pwd / "mand.out")
    32 
    32 
    33 //println("TEST4")
    33 //println("TEST4")
    34 
    34 
    35 Try(res.out.text()) match {
    35 Try(res.out.text()) match {
    36   case Success(v) if v == out => println(s"   Success. Printed out the correct picture.\n")
    36   case Success(v) if v == out => println(s"  Success. Printed out the correct picture.\n")
    37   case Success(v) => println(s"   Printed out wrong or no picture.\n${pp(v, out)}") ; throw new Exception("Wrong picture")
    37   case Success(v) => println(s"  Printed out wrong or no picture.\n${pp(v, out)}") ; throw new Exception("Wrong picture")
    38   case Failure(e) => println(s"   Fail. Printed ${res.out.text()} instead\n") ; throw(e)
    38   case Failure(e) => println(s"  Fail. Printed ${res.out.text()} instead\n") ; throw(e)
    39 }
    39 }
    40 
    40