Package org.apache.flex.compiler.tree.as

Examples of org.apache.flex.compiler.tree.as.IFileNode


    @Override
    @Test
    public void testPackageQualified_ClassBody()
    {
        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){}}}");
        asBlockWalker.visitFile(node);
        assertOut("goog.provide('foo.bar.baz.A');\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n};");
    }
View Full Code Here


    @Override
    @Test
    public void testPackageQualified_ClassBodyMethodContents()
    {
        IFileNode node = compileAS("package foo.bar.baz {public class A{public function A(){if (a){for (var i:Object in obj){doit();}}}}}");
        asBlockWalker.visitFile(node);
        assertOut("goog.provide('foo.bar.baz.A');\n\n/**\n * @constructor\n */\nfoo.bar.baz.A = function() {\n\tvar self = this;\n\tif (a) {\n\t\tfor (var /** @type {Object} */ i in obj) {\n\t\t\tdoit();\n\t\t}\n\t}\n};");
    }
View Full Code Here

public class TestGoogFile extends ASTestBase
{
    @Test
    public void testFile_plain()
    {
        IFileNode node = compileAS("input", true, "goog" + File.separator
                + "files");
        asBlockWalker.visitFile(node);
        assertOut(getCodeFromFile("output", true, "goog" + File.separator
                + "files"));
    }
View Full Code Here

    }

    @Test
    public void testFile_getset()
    {
        IFileNode node = compileAS("get-set", true, "goog" + File.separator
                + "files");
        asBlockWalker.visitFile(node);
        assertOut(getCodeFromFile("get-set_result", true, "goog"
                + File.separator + "files"));
    }
View Full Code Here

    }

    @Test
    public void testFile_callsuper()
    {
        IFileNode node = compileAS("call-super", true, "goog" + File.separator
                + "files");
        asBlockWalker.visitFile(node);
        assertOut(getCodeFromFile("call-super_result", true, "goog"
                + File.separator + "files"));
    }
View Full Code Here

    }

    @Test
    public void testFile_qualifynewobject()
    {
        IFileNode node = compileAS("qualify-new-object", true, "goog"
                + File.separator + "files");
        asBlockWalker.visitFile(node);
        assertOut(getCodeFromFile("qualify-new-object_result", true, "goog"
                + File.separator + "files"));
    }
View Full Code Here

    }

    @Test
    public void testFile_poc()
    {
        IFileNode node = compileAS("poc", true, "goog" + File.separator
                + "files");
        asBlockWalker.visitFile(node);
        assertOut(getCodeFromFile("poc_result", true, "goog" + File.separator
                + "files"));
    }
View Full Code Here

    //--------------------------------------------------------------------------

    @Test
    public void testPackage_Simple()
    {
        IFileNode node = compileAS("package{}");
        asBlockWalker.visitFile(node);
        assertOut("package {\n}");
    }
View Full Code Here

    }

    @Test
    public void testPackage_SimpleName()
    {
        IFileNode node = compileAS("package foo {}");
        asBlockWalker.visitFile(node);
        assertOut("package foo {\n}");
    }
View Full Code Here

    }

    @Test
    public void testPackage_Name()
    {
        IFileNode node = compileAS("package foo.bar.baz {}");
        asBlockWalker.visitFile(node);
        assertOut("package foo.bar.baz {\n}");
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.tree.as.IFileNode

Copyright © 2018 www.massapicom. 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.