// for testing evaluation

import scala.util.{Try, Success, Failure}
import $file.cw034_add
import cw034_add._

val str = os.read(os.pwd / "test.while")
val output = "1\n"

Try(test_string(str)) match {
  case Success(v) if urban == output => Console.println(s"Generated the correct output\n\"\"\"$urban\"\"\"")
  case Success(v) => Console.println(s"Generated\n\"\"\"$urban\"\"\"\ninstead of\n\"\"\"$output\"\"\"") ; throw new Exception("Different")
  case Failure(e) => Console.println(s"Exception raised.") ; throw(e)
}
