175176177178179180181182183184185
assertEquals(eval(e, 5), 6.); assertEquals(eval(e, 6), 6.); } public void testEXP() throws Exception { EXP e = new EXP(); for (int i = 0; i < 100; i++) { double d = Math.random() * 10; assertEquals(eval(e, d), Math.exp(d)); } }