@@ -0,0 +1,1230 @@
+/*%0A * This file is covered by the terms of the NASA Open Source Agreement v1.3.%0A *%0A * Copyright (c) SZEDER G%C3%A1bor%0A *%0A * Parts of this software were developed within the JEOPARD research%0A * project, which received funding from the European Union's Seventh%0A * Framework Programme under grant agreement No. 216682.%0A */%0A%0Apackage de.fzi.cjunit.jpf.util;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport gov.nasa.jpf.Config;%0Aimport gov.nasa.jpf.Error;%0Aimport gov.nasa.jpf.JPF;%0Aimport gov.nasa.jpf.report.Reporter;%0Aimport gov.nasa.jpf.search.Search;%0A%0A%0Apublic class TestReporter extends Reporter %7B%0A%0A%09List%3CError%3E errors;%0A%0A%09public TestReporter(Config conf, JPF jpf) throws Config.Exception %7B%0A%09%09super(conf, jpf);%0A%09%09errors = new ArrayList%3CError%3E(1);%0A%09%7D%0A%0A%09public void publishError(Error error) %7B%0A%09%09errors.clear();%0A%09%09errors.add(error);%0A%09%09super.propertyViolated(null);%0A%09%7D%0A%0A%09@Override%0A%09public void propertyViolated(Search search) %7B%0A%09%09// do nothing%0A%09%7D%0A%0A%09@Override%0A%09public List%3CError%3E getErrors() %7B%0A%09%09return errors;%0A%09%7D%0A%0A%09@Override%0A%09public Error getLastError() %7B%0A%09%09int i = errors.size();%0A%09%09if (0 %3C i) %7B%0A%09%09%09return errors.get(i-1);%0A%09%09%7D else %7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public int getNumberOfErrors() %7B%0A%09%09return errors.size();%0A%09%7D%0A%7D%0A

Add TestReporter class for reporting only selected errors