From acc9d750d1776d8d1c864fb3ddaadbaec34d286e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 18 Nov 2013 19:27:18 +0100 Subject: Added unit testing support --- src/dotty/tools/dotc/Run.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/Run.scala') diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index b12511478..c662aabfa 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -5,6 +5,7 @@ import core._ import Contexts._, Periods._, Symbols._ import io.PlainFile import util.{SourceFile, NoSource, Stats, SimpleMap} +import reporting.Reporter class Run(comp: Compiler)(implicit ctx: Context) { @@ -28,8 +29,11 @@ class Run(comp: Compiler)(implicit ctx: Context) { } } - def printSummary(): Unit = { - ctx.typerState.reporter.printSummary + /** Print summary; return # of errors encountered */ + def printSummary(): Reporter = { Constraint.printMax() + val r = ctx.typerState.reporter + r.printSummary + r } } \ No newline at end of file -- cgit v1.2.3