MCPcopy Create free account
hub / github.com/ReadyTalk/avian / continuationUnwindTest

Method continuationUnwindTest

test/extra/DynamicWind.java:89–121  ·  view source on GitHub ↗
(final Function<Callback<Integer>,Integer> receiver)

Source from the content-addressed store, hash-verified

87 }
88
89 private void continuationUnwindTest
90 (final Function<Callback<Integer>,Integer> receiver)
91 throws Exception
92 {
93 System.out.println("continuationUnwindTest enter");
94
95 try {
96 expect
97 (callWithCurrentContinuation
98 (new Function<Callback<Integer>,Integer>() {
99 public Integer call(final Callback<Integer> continuation)
100 throws Exception
101 {
102 unwindTest(new Callable<Integer>() {
103 public Integer call() throws Exception {
104 return receiver.call(continuation);
105 }
106 });
107 throw new AssertionError();
108 }
109 }) == 42);
110 } catch (MyException e) {
111 e.printStackTrace();
112 }
113
114 System.out.println("continuationUnwindTest expect");
115
116 expect(before == 1);
117 expect(task == 1);
118 expect(after == 1);
119
120 System.out.println("continuationUnwindTest exit");
121 }
122
123 private void continuationResultUnwind() throws Exception {
124 continuationUnwindTest(new Function<Callback<Integer>,Integer>() {

Callers 2

Calls 4

expectMethod · 0.95
printStackTraceMethod · 0.80
printlnMethod · 0.45

Tested by

no test coverage detected