X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Ftest%2FTestLauncher.java;h=d01e0f802cf026f1aa886d6c99d2917538a67693;hp=10a6e2794811036a12f21239d254f7dd3e2c483b;hb=e9ca6bb892b5358a273807bff834945ffe7b0cee;hpb=16d593780fa5a4c39cc36b29382da610eae951da diff --git a/src/be/nikiroo/utils/test/TestLauncher.java b/src/be/nikiroo/utils/test/TestLauncher.java index 10a6e27..d01e0f8 100644 --- a/src/be/nikiroo/utils/test/TestLauncher.java +++ b/src/be/nikiroo/utils/test/TestLauncher.java @@ -20,7 +20,7 @@ public class TestLauncher { private class SetupException extends Exception { private static final long serialVersionUID = 1L; - public SetupException(Exception e) { + public SetupException(Throwable e) { super(e); } } @@ -33,7 +33,7 @@ public class TestLauncher { private class TearDownException extends Exception { private static final long serialVersionUID = 1L; - public TearDownException(Exception e) { + public TearDownException(Throwable e) { super(e); } } @@ -185,20 +185,20 @@ public class TestLauncher { for (TestCase test : tests) { print(depth, test.getName()); - Exception ex = null; + Throwable ex = null; try { try { test.setUp(); - } catch (Exception e) { + } catch (Throwable e) { throw new SetupException(e); } test.test(); try { test.tearDown(); - } catch (Exception e) { + } catch (Throwable e) { throw new TearDownException(e); } - } catch (Exception e) { + } catch (Throwable e) { ex = e; } @@ -300,7 +300,7 @@ public class TestLauncher { * @param error * the {@link Exception} it ran into if any */ - private void print(int depth, Exception error) { + private void print(int depth, Throwable error) { if (error != null) { System.out.println(" " + koString); StringWriter sw = new StringWriter();