Package com.google.gxp.compiler.java

Examples of com.google.gxp.compiler.java.IllegalJavaPrimitiveError


    assertNoUnexpectedAlerts();

    // bad int
    compile("<gxp:param name='x' type='int' />",
            "<my:TestCall_nonExprAttributes x='bad' />");
    assertAlert(new IllegalJavaPrimitiveError(pos(3, 1), "bad", "int"));
    assertNoUnexpectedAlerts();

    // good char
    compile("<gxp:param name='x' type='char' />",
            "<my:TestCall_nonExprAttributes x='c' />",
            "<my:TestCall_nonExprAttributes x=' ' />");
    assertNoUnexpectedAlerts();

    // bad char
    compile("<gxp:param name='x' type='char' />",
            "<my:TestCall_nonExprAttributes x='bad' />");
    assertAlert(new IllegalJavaPrimitiveError(pos(3, 1), "bad", "char"));
    assertNoUnexpectedAlerts();

    // good boolean
    compile("<gxp:param name='x' type='boolean' />",
            "<my:TestCall_nonExprAttributes x='true' />",
            "<my:TestCall_nonExprAttributes x='false' />");
    assertNoUnexpectedAlerts();

    // bad boolean
    compile("<gxp:param name='x' type='boolean' />",
            "<my:TestCall_nonExprAttributes x='True' />",
            "<my:TestCall_nonExprAttributes x='TRUE' />",
            "<my:TestCall_nonExprAttributes x='bad' />");
    assertAlert(new IllegalJavaPrimitiveError(pos(3, 1), "True", "boolean"));
    assertAlert(new IllegalJavaPrimitiveError(pos(4, 1), "TRUE", "boolean"));
    assertAlert(new IllegalJavaPrimitiveError(pos(5, 1), "bad", "boolean"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here


    assertNoUnexpectedAlerts();

    // bad int
    compile("<gxp:param name='x' type='int' />",
            "<my:TestCall_nonExprAttributes x='bad' />");
    assertAlert(new IllegalJavaPrimitiveError(pos(3, 1), "bad", "int"));
    assertAlert(new IllegalScalaPrimitiveError(pos(3, 1), "bad", "int"));
    assertNoUnexpectedAlerts();

    // good char
    compile("<gxp:param name='x' type='char' />",
            "<my:TestCall_nonExprAttributes x='c' />",
            "<my:TestCall_nonExprAttributes x=' ' />");
    assertNoUnexpectedAlerts();

    // bad char
    compile("<gxp:param name='x' type='char' />",
            "<my:TestCall_nonExprAttributes x='bad' />");
    assertAlert(new IllegalJavaPrimitiveError(pos(3, 1), "bad", "char"));
    assertAlert(new IllegalScalaPrimitiveError(pos(3, 1), "bad", "char"));
    assertNoUnexpectedAlerts();

    // good boolean
    compile("<gxp:param name='x' type='boolean' />",
            "<my:TestCall_nonExprAttributes x='true' />",
            "<my:TestCall_nonExprAttributes x='false' />");
    assertNoUnexpectedAlerts();

    // bad boolean
    compile("<gxp:param name='x' type='boolean' />",
            "<my:TestCall_nonExprAttributes x='True' />",
            "<my:TestCall_nonExprAttributes x='TRUE' />",
            "<my:TestCall_nonExprAttributes x='bad' />");
    assertAlert(new IllegalJavaPrimitiveError(pos(3, 1), "True", "boolean"));
    assertAlert(new IllegalJavaPrimitiveError(pos(4, 1), "TRUE", "boolean"));
    assertAlert(new IllegalJavaPrimitiveError(pos(5, 1), "bad", "boolean"));
    assertAlert(new IllegalScalaPrimitiveError(pos(3, 1), "True", "boolean"));
    assertAlert(new IllegalScalaPrimitiveError(pos(4, 1), "TRUE", "boolean"));
    assertAlert(new IllegalScalaPrimitiveError(pos(5, 1), "bad", "boolean"));
    assertNoUnexpectedAlerts();
  }
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.java.IllegalJavaPrimitiveError

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.