From 8463bb4056e4cc57e39acd24919e36d6e2d9935c Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 16 May 2009 21:41:27 -0600 Subject: [PATCH] minor tweaks to test classes --- test/extra/Continuations.java | 8 ++++---- test/extra/Coroutines.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/extra/Continuations.java b/test/extra/Continuations.java index 938ea0328c..a439d8a58d 100644 --- a/test/extra/Continuations.java +++ b/test/extra/Continuations.java @@ -14,7 +14,7 @@ public class Continuations { expect(callWithCurrentContinuation(new CallbackReceiver() { public Integer receive(Callback continuation) { continuation.handleResult(42); - throw new RuntimeException("unreachable"); + throw new AssertionError(); } }) == 42); @@ -28,10 +28,10 @@ public class Continuations { callWithCurrentContinuation(new CallbackReceiver() { public Integer receive(Callback continuation) { continuation.handleException(new MyException()); - throw new RuntimeException("unreachable"); + throw new AssertionError(); } }); - throw new RuntimeException("unreachable"); + throw new AssertionError(); } catch (MyException e) { e.printStackTrace(); } @@ -44,7 +44,7 @@ public class Continuations { throw new MyException(); } }); - throw new RuntimeException("unreachable"); + throw new AssertionError(); } catch (MyException e) { e.printStackTrace(); } diff --git a/test/extra/Coroutines.java b/test/extra/Coroutines.java index 9623f37dd7..bacbe99563 100644 --- a/test/extra/Coroutines.java +++ b/test/extra/Coroutines.java @@ -33,13 +33,13 @@ public class Coroutines { state.consumeNext.handleResult(c); - throw new RuntimeException("unreachable"); + throw new AssertionError(); } }); } }; - Producer producer = new Producer() { + final Producer producer = new Producer() { public Character produce() throws Exception { return callWithCurrentContinuation(new CallbackReceiver() { public Character receive(Callback continuation) @@ -53,7 +53,7 @@ public class Coroutines { state.produceNext.handleResult(null); } - throw new RuntimeException("unreachable"); + throw new AssertionError(); } }); } @@ -63,7 +63,7 @@ public class Coroutines { } private static class CoroutineState { - public Callback produceNext; + public Callback produceNext; public Callback consumeNext; }