Package com.google.gxp.compiler.validate

Examples of com.google.gxp.compiler.validate.ConflictingVarNameError


    // test nested <gxp:abbr>s
    compile("<gxp:abbr name='foo' type='int' expr='1'>",
            "  <gxp:abbr name='foo' type='int' expr='2'>",
            "  </gxp:abbr>",
            "</gxp:abbr>");
    assertAlert(new ConflictingVarNameError(pos(3,3), "<gxp:abbr>", "foo"));
    assertNoUnexpectedAlerts();

    // test nested <gxp:abbr>s with different types
    compile("<gxp:abbr name='foo' type='int' expr='1'>",
            "  <gxp:abbr name='foo' type='String' expr='\"whatever\"'>",
            "  </gxp:abbr>",
            "</gxp:abbr>");
    assertAlert(new ConflictingVarNameError(pos(3,3), "<gxp:abbr>", "foo"));
    assertNoUnexpectedAlerts();

    // test triply tested <gxp:abbr>s
    compile("<gxp:abbr name='foo' type='int' expr='1'>",
            "  <gxp:abbr name='bar' type='int' expr='2'>",
            "    <gxp:abbr name='foo' type='int' expr='3'>",
            "    </gxp:abbr>",
            "  </gxp:abbr>",
            "</gxp:abbr>");
    assertAlert(new ConflictingVarNameError(pos(4,5), "<gxp:abbr>", "foo"));
    assertNoUnexpectedAlerts();

    // test <gxp:abbr> that conflicts with <gxp:param>
    compile("<gxp:param name='foo' type='int' />",
            "",
            "<gxp:abbr name='foo' type='int' expr='1'>",
            "</gxp:abbr>");
    assertAlert(new ConflictingVarNameError(pos(4,1), "<gxp:abbr>", "foo"));
    assertNoUnexpectedAlerts();

    // make sure sequential abbrs don't cause an alert
    compile("<gxp:abbr name='foo' type='int' expr='1'>",
            "</gxp:abbr>",
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.validate.ConflictingVarNameError

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.