/** @since 0.8 or earlier */ @Test public void testAddComplexNumbers() throws Exception { String id = complexAdd(); if (id == null) { return; } PolyglotEngine.Value apply = findGlobalSymbol(id); ComplexNumber a = new ComplexNumber(32, 10); ComplexNumber b = new ComplexNumber(10, 32); apply.execute(a, b); assertEquals(42.0, a.get(ComplexNumber.REAL_IDENTIFIER), 0.1); assertEquals(42.0, a.get(ComplexNumber.IMAGINARY_IDENTIFIER), 0.1); }