cw5_marking/c2.sc
changeset 1039 86d59b074abe
parent 977 7a02c5b9e0df
equal deleted inserted replaced
1038:34d2cfb7761a 1039:86d59b074abe
    14 
    14 
    15   print(s"Testing Parsing of $file ")
    15   print(s"Testing Parsing of $file ")
    16   val str = os.read(os.pwd / file)
    16   val str = os.read(os.pwd / file)
    17   
    17   
    18 
    18 
    19   Try(test_string(str).length) match {
    19   Try(urban_test_string(str).length) match {
    20     case Success(v) if v == no => println(s"--> Success. Parsed $no top-level definitions.")
    20     case Success(v) if v == no => println(s"--> Success. Parsed $no top-level definitions.")
    21     case Success(v) => println(s"--> Success? Parsed $v top-level definitions (should be $no).")// ; throw new Exception("Different")
    21     case Success(v) => println(s"--> Success? Parsed $v top-level definitions (should be $no).")// ; throw new Exception("Different")
    22     case Failure(e) => println(s"--> FAIL. Exception raised.") ; throw(e)
    22     case Failure(e) => println(s"--> FAIL. Exception raised.") ; throw(e)
    23   }
    23   }
    24 }
    24 }