# HG changeset patch # User Jaroslav Tulach # Date 1458453700 -3600 # Node ID cb637833bfb3b3c9c13360fd629df373360506d2 # Parent 9984d9a62bc08822e05f43b8b77ff8357d09303b Removing accidentally commited debris diff -r 9984d9a62bc0 -r cb637833bfb3 rt/aot-nb-test/pom.xml --- a/rt/aot-nb-test/pom.xml Sat Mar 19 13:15:11 2016 +0100 +++ b/rt/aot-nb-test/pom.xml Sun Mar 20 07:01:40 2016 +0100 @@ -53,12 +53,6 @@ ${project.version} test - - junit - junit - 4.12 - jar - diff -r 9984d9a62bc0 -r cb637833bfb3 rt/aot-nb-test/src/main/java/org/apidesign/bck2brwsr/aot/junit/RunTest.java --- a/rt/aot-nb-test/src/main/java/org/apidesign/bck2brwsr/aot/junit/RunTest.java Sat Mar 19 13:15:11 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator - * Copyright (C) 2012-2015 Jaroslav Tulach - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. Look for COPYING file in the top folder. - * If not, see http://opensource.org/licenses/GPL-2.0. - */ -package org.apidesign.bck2brwsr.aot.junit; - -import java.io.PrintStream; -import java.io.UnsupportedEncodingException; -import junit.framework.AssertionFailedError; -import junit.framework.JUnit4TestAdapter; -import junit.framework.Test; -import junit.framework.TestListener; -import junit.framework.TestResult; -import junit.textui.ResultPrinter; - -public class RunTest extends ResultPrinter { - public static void main(String... args) throws UnsupportedEncodingException { - System.err.println(run()); - } - - public static String run() throws UnsupportedEncodingException { - TestResult tr = new TestResult(); - class L implements TestListener { - StringBuilder sb = new StringBuilder(); - - @Override - public void addError(Test test, Throwable e) { - sb.append(test.toString()).append("\n"); - } - - @Override - public void addFailure(Test test, AssertionFailedError e) { - sb.append(test.toString()).append("\n");; - } - - @Override - public void endTest(Test test) { - } - - @Override - public void startTest(Test test) { - } - } - L listener = new L(); - tr.addListener(listener); - JUnit4TestAdapter suite = new JUnit4TestAdapter(TestedTest.class); - suite.run(tr); - return listener.sb.toString(); - } - - RunTest(PrintStream writer) { - super(writer); - } -} diff -r 9984d9a62bc0 -r cb637833bfb3 rt/aot-nb-test/src/main/java/org/apidesign/bck2brwsr/aot/junit/TestedTest.java --- a/rt/aot-nb-test/src/main/java/org/apidesign/bck2brwsr/aot/junit/TestedTest.java Sat Mar 19 13:15:11 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator - * Copyright (C) 2012-2015 Jaroslav Tulach - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. Look for COPYING file in the top folder. - * If not, see http://opensource.org/licenses/GPL-2.0. - */ -package org.apidesign.bck2brwsr.aot.junit; - -import org.junit.Test; -import static org.junit.Assert.fail; - -public class TestedTest { - @Test - public void ok() { - } - - @Test - public void error() { - fail("Failing"); - } -} diff -r 9984d9a62bc0 -r cb637833bfb3 rt/aot-nb-test/src/test/java/org/apidesign/bck2brwsr/aot/junit/test/JUnitRunTest.java --- a/rt/aot-nb-test/src/test/java/org/apidesign/bck2brwsr/aot/junit/test/JUnitRunTest.java Sat Mar 19 13:15:11 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/** - * Back 2 Browser Bytecode Translator - * Copyright (C) 2012-2015 Jaroslav Tulach - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. Look for COPYING file in the top folder. - * If not, see http://opensource.org/licenses/GPL-2.0. - */ -package org.apidesign.bck2brwsr.aot.junit.test; - -import org.apidesign.bck2brwsr.aot.junit.RunTest; -import org.apidesign.bck2brwsr.vmtest.Compare; -import org.apidesign.bck2brwsr.vmtest.VMTest; -import org.testng.annotations.Factory; - -/** - * - * @author Jaroslav Tulach - */ -public class JUnitRunTest { - @Compare public String runTests() throws Exception { - return RunTest.run(); - } - - @Factory public static Object[] create() { - return VMTest.create(JUnitRunTest.class); - } -}