示例#1
0
 @Test
 public void testBottom() {
   try {
     String funId = IdUtils.qualify(this.exn, "bottom");
     Future<ExecutionContext> f = this.runtime.eval(funId);
     f.get();
     assertTrue(false);
   } catch (JellyException e) {
     assertTrue(e.getCause() instanceof JellyRuntimeException);
   }
 }
示例#2
0
 @Test
 public void testRaise() {
   String funId = IdUtils.qualify(this.exn, "raise");
   Future<ExecutionContext> f = this.runtime.eval(funId);
   try {
     // f.get() must raise an exception
     f.get();
     assertTrue(false);
   } catch (JellyException e) {
     // We expect to get here
     assertTrue(e.getCause() instanceof JellyRuntimeException);
   }
 }