diff --git a/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc b/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc index 08873815..b45a5c74 100644 --- a/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc +++ b/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc @@ -415,8 +415,8 @@ list[ModuleMessages] checkAll(loc root, PathConfig pcfg, CompilerConfig compiler // ---- Convenience check function during development ------------------------- -map[str, list[Message]] checkModules(list[str] moduleNames, TypePalConfig config, PathConfig pcfg) { - ModuleStatus ms = rascalTModelForNames(moduleNames, config, getRascalCompilerConfig(), dummy_compile1); +map[str, list[Message]] checkModules(list[str] moduleNames, TypePalConfig config, PathConfig pcfg, bool verbose=true) { + ModuleStatus ms = rascalTModelForNames(moduleNames, config, getRascalCompilerConfig()[verbose=verbose], dummy_compile1); tmodels = ms.tmodels; return (mname : tmodels[mname].messages | mname <- tmodels, !isEmpty(tmodels[mname].messages)); } diff --git a/src/org/rascalmpl/core/library/lang/rascalcore/check/tests/StaticTestingUtils.rsc b/src/org/rascalmpl/core/library/lang/rascalcore/check/tests/StaticTestingUtils.rsc index 9b8c5a85..b9edd393 100644 --- a/src/org/rascalmpl/core/library/lang/rascalcore/check/tests/StaticTestingUtils.rsc +++ b/src/org/rascalmpl/core/library/lang/rascalcore/check/tests/StaticTestingUtils.rsc @@ -62,14 +62,17 @@ set[Message] getAllMessages(ModuleStatus r) = { m | mname <- r.tmodels, m <- r.tmodels[mname].messages }; -ModuleStatus checkStatements(str stmts, list[str] importedModules = [], list[str] initialDecls = []){ +ModuleStatus checkStatements(str stmts, list[str] importedModules = [], list[str] initialDecls = [], bool verbose=true){ mloc = buildModule(stmts, importedModules=importedModules, initialDecls=initialDecls); - return rascalTModelForLocs([mloc], rascalTypePalConfig(rascalPathConfig=testingConfig()), getRascalCompilerConfig(), dummy_compile1); + return rascalTModelForLocs([mloc], rascalTypePalConfig(rascalPathConfig=testingConfig()), getRascalCompilerConfig()[verbose=verbose], dummy_compile1); } bool check(str stmts, list[str] expected, list[str] importedModules = [], list[str] initialDecls = []){ - errors = getAllMessages(checkStatements(stmts, importedModules=importedModules, initialDecls=initialDecls)); - println(errors); + bool verbose=false; + errors = getAllMessages(checkStatements(stmts, importedModules=importedModules, initialDecls=initialDecls, verbose=verbose)); + if (verbose) { + println(errors); + } for(eitem <- errors, str exp <- expected){ if(matches(eitem.msg, exp)) return true;