Package org.boris.expr

Source Code of org.boris.expr.SimpleGraphEngineTest

/*******************************************************************************
* This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
*     Peter Smith
*******************************************************************************/
package org.boris.expr;

import org.boris.expr.engine.SimpleGraphEngine;

public class SimpleGraphEngineTest extends TH
{
    public void testEngine1() throws Exception {
        SimpleGraphEngine e = new SimpleGraphEngine();
        e.setValue("x", 3.);
        e.setValue("y", 5.);
        e.setFormula("z", "x+y+2");
        e.setFormula("a", "z/2");
        e.setFormula("b", "a^2");
        e.setFormula("y", "13+5");
        e.calculate();
        assertEquals(e.get("a"), 5.);
    }
}
TOP

Related Classes of org.boris.expr.SimpleGraphEngineTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.