Package tests

Source Code of tests.FunctionNode

package tests;
import static junit.framework.Assert.assertTrue;
import static utils.TestHelper.parseFunction;

import java.util.ArrayList;

import org.antlr.runtime.RecognitionException;
import org.junit.Test;

import tree.Function;
import tree.HaxeTree;
import tree.expression.Declaration;

public class FunctionNode
{

    @Test
    public void testIntToFloat() throws RecognitionException
    {
        HaxeTree tree = parseFunction("function main(x:Int, y:Float) {}");
       
        ArrayList<Declaration> firstType = ((Function)tree).getParametersAsDeclarations();
        assertTrue(firstType.size() == 2);
    }
}
TOP

Related Classes of tests.FunctionNode

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.