Basic enumeration support.
diff --git a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java
index d45602c..fc06840 100644
--- a/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java
+++ b/jsf/tests/org.eclipse.jst.jsf.designtime.tests/src/org/eclipse/jst/jsf/designtime/tests/TestAbstractDataModelVariableFactory.java
@@ -95,7 +95,7 @@
final DataModelVariableTestFacade testFacade = new DataModelVariableTestFacade();
// test non-parameterized list
- ValueType valueType = new ValueType(TypeConstants.TYPE_LIST, new String[0], new String[0], new String[0], ValueType.ASSIGNMENT_TYPE_RHS);
+ ValueType valueType = new ValueType(TypeConstants.TYPE_LIST, new String[0], new String[0], new String[0],false, ValueType.ASSIGNMENT_TYPE_RHS);
ISymbol symbol = testFacade.testCreateFromList("rawList", valueType, _jdtTestEnvironment.getJavaProject());
{
// should create the same as passing directly to default
@@ -109,7 +109,7 @@
}
// test list of strings
- valueType = new ValueType(TypeConstants.TYPE_LIST, stringArgType, new String[0], new String[0], ValueType.ASSIGNMENT_TYPE_RHS);
+ valueType = new ValueType(TypeConstants.TYPE_LIST, stringArgType, new String[0], new String[0], false, ValueType.ASSIGNMENT_TYPE_RHS);
symbol = testFacade.testCreateFromList("string", valueType, _jdtTestEnvironment.getJavaProject());
assertTrue(symbol instanceof IComponentSymbol);
assertEquals(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, ((IComponentSymbol)symbol).getRuntimeSource());
@@ -117,7 +117,7 @@
assertEquals(0, ((IComponentSymbol)symbol).getTypeDescriptor().getTypeParameterSignatures().size());
// test list of list of strings
- valueType = new ValueType(TypeConstants.TYPE_LIST, listOfStringArgType, new String[0], new String[0], ValueType.ASSIGNMENT_TYPE_RHS);
+ valueType = new ValueType(TypeConstants.TYPE_LIST, listOfStringArgType, new String[0], new String[0], false, ValueType.ASSIGNMENT_TYPE_RHS);
symbol = testFacade.testCreateFromList("listOfString", valueType, _jdtTestEnvironment.getJavaProject());
assertTrue(symbol instanceof IComponentSymbol);
assertEquals(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL, ((IComponentSymbol)symbol).getRuntimeSource());
@@ -187,7 +187,7 @@
// an array of something should yield the same thing as createArraySymbol
{
final String arraySig = "[Ljava.lang.String;";
- ValueType valueType = new ValueType(arraySig, new String[0], new String[0], new String[0], ValueType.ASSIGNMENT_TYPE_RHS);
+ ValueType valueType = new ValueType(arraySig, new String[0], new String[0], new String[0], false, ValueType.ASSIGNMENT_TYPE_RHS);
ISymbol array1 = testFacade.createFromType("array", valueType, _jdtTestEnvironment.getJavaProject());
ISymbol array2 = testFacade.testCreateArraySymbol("array2", arraySig, _jdtTestEnvironment.getJavaProject());
assertSame((IComponentSymbol)array1, (IComponentSymbol)array2);
@@ -196,7 +196,7 @@
// if it's a list should be the same as createFromList
{
final String listSig = TypeConstants.TYPE_LIST;
- ValueType valueType = new ValueType(listSig, new String[0], new String[0], new String[0], ValueType.ASSIGNMENT_TYPE_RHS);
+ ValueType valueType = new ValueType(listSig, new String[0], new String[0], new String[0], false, ValueType.ASSIGNMENT_TYPE_RHS);
ISymbol list1 = testFacade.createFromType("list", valueType, _jdtTestEnvironment.getJavaProject());
ISymbol list2 = testFacade.testCreateFromList("list2", valueType, _jdtTestEnvironment.getJavaProject());
assertSame((IComponentSymbol)list1, (IComponentSymbol)list2);
@@ -205,7 +205,7 @@
// if it's a DataModel, should be the same as default
{
final String dataModelSig = TypeConstants.TYPE_DATA_MODEL;
- ValueType valueType = new ValueType(dataModelSig, new String[0], new String[0], new String[0], ValueType.ASSIGNMENT_TYPE_RHS);
+ ValueType valueType = new ValueType(dataModelSig, new String[0], new String[0], new String[0], false, ValueType.ASSIGNMENT_TYPE_RHS);
ISymbol dataModel1 = testFacade.createFromType("dataModel", valueType, _jdtTestEnvironment.getJavaProject());
ISymbol dataModel2 = testFacade.createDefaultSymbol("dataModel2");
assertSame((IComponentSymbol)dataModel1, (IComponentSymbol)dataModel2);
@@ -214,7 +214,7 @@
// if it's just some non-special object, like a String, then should be same a scalar
{
final String stringSig = TypeConstants.TYPE_STRING;
- ValueType valueType = new ValueType(stringSig, new String[0], new String[0], new String[0], ValueType.ASSIGNMENT_TYPE_RHS);
+ ValueType valueType = new ValueType(stringSig, new String[0], new String[0], new String[0], false, ValueType.ASSIGNMENT_TYPE_RHS);
ISymbol scalar1 = testFacade.createFromType("scalar1", valueType, _jdtTestEnvironment.getJavaProject());
ISymbol scalar2 = testFacade.testCreateScalarSymbol("scalar2", stringSig, _jdtTestEnvironment.getJavaProject());
assertSame((IComponentSymbol)scalar1, (IComponentSymbol)scalar2);
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs
index 554185c..3a3053c 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,5 +1,6 @@
-#Fri Apr 20 10:17:54 PDT 2007
+#Tue May 15 14:58:45 PDT 2007
eclipse.preferences.version=1
+instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
@@ -22,7 +23,7 @@
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/PerfSuite.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/PerfSuite.java
new file mode 100644
index 0000000..b6125c6
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/PerfSuite.java
@@ -0,0 +1,5 @@
+package org.eclipse.jst.jsf.validation.el.tests;
+
+public class PerfSuite {
+
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java
index 9a5ebeb..a5f9807 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/base/BaseTestCase.java
@@ -146,8 +146,19 @@
*/
protected void configureJDTTestEnvironment(JDTTestEnvironment jdtTestEnv) throws Exception
{
+ // load enums first, since other classes have dependencies
TestFileResource resource = new TestFileResource();
resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MyEnum1.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MyEnum1", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
+ "/testdata/classes/MyEnum2.java.data");
+ jdtTestEnv.addSourceFile("src", "beans", "MyEnum2", resource.toString());
+
+ resource = new TestFileResource();
+ resource.load(ELValidationTestPlugin.getDefault().getBundle(),
"/testdata/classes/MyBean.java.data");
jdtTestEnv.addSourceFile("src", "beans", "MyBean", resource.toString());
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java
index b5bca57..3dd4c95 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/BeanPropertyResolutionTestCase.java
@@ -3,6 +3,7 @@
import java.util.List;
import org.eclipse.jdt.core.Signature;
+import org.eclipse.jst.jsf.common.internal.types.IAssignable;
import org.eclipse.jst.jsf.common.internal.types.TypeConstants;
import org.eclipse.jst.jsf.core.IJSFCoreConstants;
import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
@@ -39,94 +40,108 @@
assertEquals("myBean.bigDoubleProperty", getELText(_structuredDocument,1105));
assertEquals("myBean.writableStringProperty", getELText(_structuredDocument,1163));
assertEquals("myBean.isStyleBooleanProperty", getELText(_structuredDocument,1226));
- assertEquals("myBeanSubClass.stringProperty", getELText(_structuredDocument,1324));
- assertEquals("myBeanSubClass.integerProperty", getELText(_structuredDocument,1387));
- assertEquals("myBeanSubClass.booleanProperty", getELText(_structuredDocument,1451));
- assertEquals("myBeanSubClass.doubleProperty", getELText(_structuredDocument,1515));
- assertEquals("myBeanSubClass.mapProperty", getELText(_structuredDocument,1578));
- assertEquals("myBeanSubClass.stringArrayProperty", getELText(_structuredDocument,1638));
- assertEquals("myBeanSubClass.collectionProperty", getELText(_structuredDocument,1706));
- assertEquals("myBeanSubClass.listProperty", getELText(_structuredDocument,1773));
- assertEquals("myBeanSubClass.comparableProperty", getELText(_structuredDocument,1834));
- assertEquals("myBeanSubClass.bigIntegerProperty", getELText(_structuredDocument,1901));
- assertEquals("myBeanSubClass.bigDoubleProperty", getELText(_structuredDocument,1968));
- assertEquals("myBeanSubClass.writableStringProperty", getELText(_structuredDocument,2034));
- assertEquals("myBeanSubClass.isStyleBooleanProperty", getELText(_structuredDocument,2105));
- assertEquals("myBeanSubClass.subClassStringProperty", getELText(_structuredDocument,2176));
- assertEquals("myBeanSubClass.stringProperty", getELText(_structuredDocument,2278));
- assertEquals("myBeanSettable.integerProperty", getELText(_structuredDocument,2341));
- assertEquals("myBeanSettable.booleanProperty", getELText(_structuredDocument,2405));
- assertEquals("myBeanSettable.doubleProperty", getELText(_structuredDocument,2469));
- assertEquals("myBeanSettable.mapProperty", getELText(_structuredDocument,2532));
- assertEquals("myBeanSettable.stringArrayProperty", getELText(_structuredDocument,2592));
- assertEquals("myBeanSettable.collectionProperty", getELText(_structuredDocument,2660));
- assertEquals("myBeanSettable.listProperty", getELText(_structuredDocument,2727));
- assertEquals("myBeanSettable.comparableProperty", getELText(_structuredDocument,2788));
- assertEquals("myBeanSettable.bigIntegerProperty", getELText(_structuredDocument,2855));
- assertEquals("myBeanSettable.bigDoubleProperty", getELText(_structuredDocument,2922));
- assertEquals("myBeanSettable.writableStringProperty", getELText(_structuredDocument,2988));
- assertEquals("myBeanSettable.isStyleBooleanProperty", getELText(_structuredDocument,3059));
+ assertEquals("myBean.colors", getELText(_structuredDocument,1289));
+ assertEquals("myBean.coins", getELText(_structuredDocument,1336));
+
+ assertEquals("myBeanSubClass.stringProperty", getELText(_structuredDocument,1417));
+ assertEquals("myBeanSubClass.integerProperty", getELText(_structuredDocument,1480));
+ assertEquals("myBeanSubClass.booleanProperty", getELText(_structuredDocument,1544));
+ assertEquals("myBeanSubClass.doubleProperty", getELText(_structuredDocument,1608));
+ assertEquals("myBeanSubClass.mapProperty", getELText(_structuredDocument,1671));
+ assertEquals("myBeanSubClass.stringArrayProperty", getELText(_structuredDocument,1731));
+ assertEquals("myBeanSubClass.collectionProperty", getELText(_structuredDocument,1799));
+ assertEquals("myBeanSubClass.listProperty", getELText(_structuredDocument,1866));
+ assertEquals("myBeanSubClass.comparableProperty", getELText(_structuredDocument,1927));
+ assertEquals("myBeanSubClass.bigIntegerProperty", getELText(_structuredDocument,1994));
+ assertEquals("myBeanSubClass.bigDoubleProperty", getELText(_structuredDocument,2061));
+ assertEquals("myBeanSubClass.writableStringProperty", getELText(_structuredDocument,2127));
+ assertEquals("myBeanSubClass.isStyleBooleanProperty", getELText(_structuredDocument,2198));
+ assertEquals("myBeanSubClass.subClassStringProperty", getELText(_structuredDocument,2269));
+ assertEquals("myBeanSubClass.colors", getELText(_structuredDocument,2340));
+ assertEquals("myBeanSubClass.coins", getELText(_structuredDocument,2395));
- assertEquals("myBean.subClassStringProperty", getELText(_structuredDocument,3159));
- assertEquals("myBeanSubClass.notAMember", getELText(_structuredDocument,3222));
- assertEquals("myBeanSettable.alsoNotAMember", getELText(_structuredDocument,3281));
+ assertEquals("myBeanSubClass.stringProperty", getELText(_structuredDocument,2478));
+ assertEquals("myBeanSettable.integerProperty", getELText(_structuredDocument,2541));
+ assertEquals("myBeanSettable.booleanProperty", getELText(_structuredDocument,2605));
+ assertEquals("myBeanSettable.doubleProperty", getELText(_structuredDocument,2669));
+ assertEquals("myBeanSettable.mapProperty", getELText(_structuredDocument,2732));
+ assertEquals("myBeanSettable.stringArrayProperty", getELText(_structuredDocument,2792));
+ assertEquals("myBeanSettable.collectionProperty", getELText(_structuredDocument,2860));
+ assertEquals("myBeanSettable.listProperty", getELText(_structuredDocument,2927));
+ assertEquals("myBeanSettable.comparableProperty", getELText(_structuredDocument,2988));
+ assertEquals("myBeanSettable.bigIntegerProperty", getELText(_structuredDocument,3055));
+ assertEquals("myBeanSettable.bigDoubleProperty", getELText(_structuredDocument,3122));
+ assertEquals("myBeanSettable.writableStringProperty", getELText(_structuredDocument,3188));
+ assertEquals("myBeanSettable.isStyleBooleanProperty", getELText(_structuredDocument,3259));
+ assertEquals("myBeanSettable.colors", getELText(_structuredDocument,3330));
+ assertEquals("myBeanSettable.coins", getELText(_structuredDocument,3385));
+
+ assertEquals("myBean.subClassStringProperty", getELText(_structuredDocument,3468));
+ assertEquals("myBeanSubClass.notAMember", getELText(_structuredDocument,3531));
+ assertEquals("myBeanSettable.alsoNotAMember", getELText(_structuredDocument,3590));
}
public void testNoErrorExprs()
{
- assertNoError(541, TypeConstants.TYPE_STRING);
- assertNoError(596, Signature.SIG_INT);
- assertNoError(652, Signature.SIG_BOOLEAN);
- assertNoError(708, Signature.SIG_DOUBLE);
- assertNoError(763, TypeConstants.TYPE_MAP);
- assertNoError(815, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1));
- assertNoError(875, TypeConstants.TYPE_COLLECTION);
- assertNoError(934, "Ljava.util.List;");
- assertNoError(987, TypeConstants.TYPE_COMPARABLE);
- assertNoError(1046, TypeConstants.TYPE_BIG_INTEGER);
- assertNoError(1105, TypeConstants.TYPE_BIG_DOUBLE);
- assertNoError(1163, TypeConstants.TYPE_STRING);
- assertNoError(1226, Signature.SIG_BOOLEAN);
+ assertNoError(541, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(596, Signature.SIG_INT, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(652, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(708, Signature.SIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(763, TypeConstants.TYPE_MAP, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(815, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1), IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(875, TypeConstants.TYPE_COLLECTION, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(934, "Ljava.util.List;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(987, TypeConstants.TYPE_COMPARABLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1046, TypeConstants.TYPE_BIG_INTEGER, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1105, TypeConstants.TYPE_BIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1163, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(1226, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1289, "Lbeans.MyEnum2;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1336, "Lbeans.MyEnum1;", IAssignable.ASSIGNMENT_TYPE_RHS);
- assertNoError(1324, TypeConstants.TYPE_STRING);
- assertNoError(1387, Signature.SIG_INT);
- assertNoError(1451, Signature.SIG_BOOLEAN);
- assertNoError(1515, Signature.SIG_DOUBLE);
- assertNoError(1578, TypeConstants.TYPE_MAP);
- assertNoError(1638, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1));
- assertNoError(1706, TypeConstants.TYPE_COLLECTION);
- assertNoError(1773, "Ljava.util.List;");
- assertNoError(1834, TypeConstants.TYPE_COMPARABLE);
- assertNoError(1901, TypeConstants.TYPE_BIG_INTEGER);
- assertNoError(1968, TypeConstants.TYPE_BIG_DOUBLE);
- assertNoError(2034, TypeConstants.TYPE_STRING);
- assertNoError(2105, Signature.SIG_BOOLEAN);
- assertNoError(2176, TypeConstants.TYPE_STRING);
- assertNoError(2278, TypeConstants.TYPE_STRING);
-
- assertNoError(2341, Signature.SIG_INT);
- assertNoError(2405, Signature.SIG_BOOLEAN);
- assertNoError(2469, Signature.SIG_DOUBLE);
- assertNoError(2532, TypeConstants.TYPE_MAP);
- assertNoError(2592, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1));
- assertNoError(2660, TypeConstants.TYPE_COLLECTION);
- assertNoError(2727, "Ljava.util.List;");
- assertNoError(2788, TypeConstants.TYPE_COMPARABLE);
- assertNoError(2855, TypeConstants.TYPE_BIG_INTEGER);
- assertNoError(2922, TypeConstants.TYPE_BIG_DOUBLE);
- assertNoError(2988, TypeConstants.TYPE_STRING);
- assertNoError(3059, Signature.SIG_BOOLEAN);
+ assertNoError(1417, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1480, Signature.SIG_INT, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1544, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1608, Signature.SIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1671, TypeConstants.TYPE_MAP, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1731, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1), IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1799, TypeConstants.TYPE_COLLECTION, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1866, "Ljava.util.List;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1927, TypeConstants.TYPE_COMPARABLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(1994, TypeConstants.TYPE_BIG_INTEGER, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2061, TypeConstants.TYPE_BIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2127, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2198, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2269, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2340, "Lbeans.MyEnum2;", IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2395, "Lbeans.MyEnum1;", IAssignable.ASSIGNMENT_TYPE_RHS);
+
+ assertNoError(2478, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS);
+ assertNoError(2541, Signature.SIG_INT, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2605, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2669, Signature.SIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2732, TypeConstants.TYPE_MAP, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2792, Signature.createArraySignature(TypeConstants.TYPE_STRING, 1), IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2860, TypeConstants.TYPE_COLLECTION, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2927, "Ljava.util.List;", IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(2988, TypeConstants.TYPE_COMPARABLE, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3055, TypeConstants.TYPE_BIG_INTEGER, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3122, TypeConstants.TYPE_BIG_DOUBLE, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3188, TypeConstants.TYPE_STRING, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3259, Signature.SIG_BOOLEAN, IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3330, "Lbeans.MyEnum2;", IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
+ assertNoError(3385, "Lbeans.MyEnum1;", IAssignable.ASSIGNMENT_TYPE_RHS|IAssignable.ASSIGNMENT_TYPE_LHS);
}
public void testWarningExprs()
{
- List list = assertSemanticWarning(3159,null,1);
+ List list = assertSemanticWarning(3468,null,1);
assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
- list = assertSemanticWarning(3222,null,1);
+ list = assertSemanticWarning(3531,null,1);
assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
- list = assertSemanticWarning(3281,null,1);
+ list = assertSemanticWarning(3590,null,1);
assertContainsProblem(list, DiagnosticFactory.MEMBER_NOT_FOUND_ID);
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java
index fa81b23..bf69aae 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanEqTestCase.java
@@ -38,37 +38,45 @@
assertEquals("myBean.comparableProperty >= myBean.collectionProperty", getELText(_structuredDocument,1227));
assertEquals("myBean.comparableProperty ge myBean.collectionProperty", getELText(_structuredDocument,1315));
assertEquals("myBean.integerProperty >= -3", getELText(_structuredDocument,1405));
- assertEquals("myBean.doubleProperty > 5", getELText(_structuredDocument,1467));
- assertEquals("5 gt myBean.bigIntegerProperty", getELText(_structuredDocument,1526));
- assertEquals("myBean.bigDoubleProperty > myBean.bigIntegerProperty", getELText(_structuredDocument,1590));
+ assertEquals("myBean.doubleProperty >= 5", getELText(_structuredDocument,1467));
+ assertEquals("5 ge myBean.bigIntegerProperty", getELText(_structuredDocument,1527));
+ assertEquals("myBean.bigDoubleProperty >= myBean.bigIntegerProperty", getELText(_structuredDocument,1591));
+ assertEquals("myBean.coins >= 'quarter'", getELText(_structuredDocument,1678));
+ assertEquals("myBean.coins ge 'quarter'", getELText(_structuredDocument,1737));
+ assertEquals("myBean.rawEnum >= 'quarter'", getELText(_structuredDocument,1796));
+ assertEquals("myBean.coinEnum ge 'quarter'", getELText(_structuredDocument,1857));
+ assertEquals("myBean.rawEnum >= myBean.coins", getELText(_structuredDocument,1915));
+ assertEquals("myBean.coinEnum >= myBean.colors", getELText(_structuredDocument,1975));
- assertEquals("5 >= 3", getELText(_structuredDocument,1705));
- assertEquals("5 ge 3", getELText(_structuredDocument,1742));
- assertEquals("'4' >= '34'", getELText(_structuredDocument,1779));
- assertEquals("'4' ge '34'", getELText(_structuredDocument,1821));
- assertEquals("'34' >= '34'", getELText(_structuredDocument,1863));
- assertEquals("'34' ge '34'", getELText(_structuredDocument,1906));
- assertEquals("-5 >= 2", getELText(_structuredDocument,1949));
- assertEquals("-5 ge 2", getELText(_structuredDocument,1987));
- assertEquals("2 >= -5", getELText(_structuredDocument,2025));
- assertEquals("2 ge -5", getELText(_structuredDocument,2063));
- assertEquals("-5 >= -5", getELText(_structuredDocument,2101));
- assertEquals("-5 ge -5", getELText(_structuredDocument,2140));
- assertEquals("myBean.integerProperty > null", getELText(_structuredDocument,2179));
- assertEquals("null gt myBean.integerProperty", getELText(_structuredDocument,2239));
+ assertEquals("5 >= 3", getELText(_structuredDocument,2070));
+ assertEquals("5 ge 3", getELText(_structuredDocument,2107));
+ assertEquals("'4' >= '34'", getELText(_structuredDocument,2144));
+ assertEquals("'4' ge '34'", getELText(_structuredDocument,2186));
+ assertEquals("'34' >= '34'", getELText(_structuredDocument,2228));
+ assertEquals("'34' ge '34'", getELText(_structuredDocument,2271));
+ assertEquals("-5 >= 2", getELText(_structuredDocument,2314));
+ assertEquals("-5 ge 2", getELText(_structuredDocument,2352));
+ assertEquals("2 >= -5", getELText(_structuredDocument,2390));
+ assertEquals("2 ge -5", getELText(_structuredDocument,2428));
+ assertEquals("-5 >= -5", getELText(_structuredDocument,2466));
+ assertEquals("-5 ge -5", getELText(_structuredDocument,2505));
+ assertEquals("myBean.integerProperty >= null", getELText(_structuredDocument,2544));
+ assertEquals("null ge myBean.integerProperty", getELText(_structuredDocument,2605));
- assertEquals("5 >= true", getELText(_structuredDocument,2323));
- assertEquals("5 ge true", getELText(_structuredDocument,2363));
- assertEquals("myBean.integerProperty >= myBean.booleanProperty", getELText(_structuredDocument,2403));
- assertEquals("myBean.integerProperty ge myBean.booleanProperty", getELText(_structuredDocument,2482));
- assertEquals("myBean.stringArrayProperty >= myBean.booleanProperty", getELText(_structuredDocument,2561));
- assertEquals("myBean.stringArrayProperty ge myBean.booleanProperty", getELText(_structuredDocument,2644));
- assertEquals("myBean.integerProperty >= true ", getELText(_structuredDocument,2730));
- assertEquals("myBean.integerProperty ge true ", getELText(_structuredDocument,2795));
- assertEquals("myBean.booleanProperty >= true", getELText(_structuredDocument,2860));
- assertEquals("myBean.booleanProperty ge true", getELText(_structuredDocument,2924));
- assertEquals("true >= false", getELText(_structuredDocument,2986));
- assertEquals("true ge false", getELText(_structuredDocument,3031));
+ assertEquals("5 >= true", getELText(_structuredDocument,2689));
+ assertEquals("5 ge true", getELText(_structuredDocument,2729));
+ assertEquals("myBean.integerProperty >= myBean.booleanProperty", getELText(_structuredDocument,2769));
+ assertEquals("myBean.integerProperty ge myBean.booleanProperty", getELText(_structuredDocument,2848));
+ assertEquals("myBean.stringArrayProperty >= myBean.booleanProperty", getELText(_structuredDocument,2927));
+ assertEquals("myBean.stringArrayProperty ge myBean.booleanProperty", getELText(_structuredDocument,3010));
+ assertEquals("myBean.integerProperty >= true ", getELText(_structuredDocument,3096));
+ assertEquals("myBean.integerProperty ge true ", getELText(_structuredDocument,3161));
+ assertEquals("myBean.booleanProperty >= true", getELText(_structuredDocument,3226));
+ assertEquals("myBean.booleanProperty ge true", getELText(_structuredDocument,3290));
+ assertEquals("true >= false", getELText(_structuredDocument,3352));
+ assertEquals("true ge false", getELText(_structuredDocument,3397));
+ assertEquals("myBean.coins >= myBean.colors", getELText(_structuredDocument,3441));
+ assertEquals("myBean.coins ge myBean.colors", getELText(_structuredDocument,3501));
}
public void testNoErrorExprs()
@@ -83,92 +91,104 @@
assertNoError(1315, Signature.SIG_BOOLEAN);
assertNoError(1405, Signature.SIG_BOOLEAN);
assertNoError(1467, Signature.SIG_BOOLEAN);
- assertNoError(1526, Signature.SIG_BOOLEAN);
- assertNoError(1590, Signature.SIG_BOOLEAN);
+ assertNoError(1527, Signature.SIG_BOOLEAN);
+ assertNoError(1591, Signature.SIG_BOOLEAN);
+ assertNoError(1678, Signature.SIG_BOOLEAN);
+ assertNoError(1737, Signature.SIG_BOOLEAN);
+ assertNoError(1796, Signature.SIG_BOOLEAN);
+ assertNoError(1857, Signature.SIG_BOOLEAN);
+ assertNoError(1915, Signature.SIG_BOOLEAN);
+ assertNoError(1975, Signature.SIG_BOOLEAN);
}
public void testWarningExprs()
{
- List list = assertSemanticWarning(1705, Signature.SIG_BOOLEAN, 1);
+ List list = assertSemanticWarning(2070, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1742, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2107, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1779, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2144, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1821, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2186, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1863, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2228, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1906, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2271, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1949, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2314, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1987, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2352, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2025, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2390, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2063, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2428, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2101, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2466, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2140, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2505, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2179, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2544, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2239, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2605, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
}
public void testErrorExprs()
{
- List list = assertSemanticError(2323, null, 1);
+ List list = assertSemanticError(2689, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2363, null, 1);
+ list = assertSemanticError(2729, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2403, null, 1);
+ list = assertSemanticError(2769, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2482, null, 1);
+ list = assertSemanticError(2848, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2561, null, 1);
+ list = assertSemanticError(2927, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2644, null, 1);
+ list = assertSemanticError(3010, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2730, null, 1);
+ list = assertSemanticError(3096, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2795, null, 1);
+ list = assertSemanticError(3161, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2860, null, 1);
+ list = assertSemanticError(3226, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2924, null, 1);
+ list = assertSemanticError(3290, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2986, null, 1);
+ list = assertSemanticError(3352, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(3031, null, 1);
+ list = assertSemanticError(3397, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3441, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3501, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
}
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java
index 0763f0d..7ebc79c 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/GreaterThanTestCase.java
@@ -27,7 +27,6 @@
public void testSanity()
{
super.testSanity();
-
assertEquals("myBean.stringProperty > '3'", getELText(_structuredDocument,852));
assertEquals("myBean.stringProperty gt '3'", getELText(_structuredDocument,913));
assertEquals("myBean.integerProperty > 3", getELText(_structuredDocument,975));
@@ -40,34 +39,42 @@
assertEquals("myBean.doubleProperty > 5", getELText(_structuredDocument,1460));
assertEquals("5 gt myBean.bigIntegerProperty", getELText(_structuredDocument,1519));
assertEquals("myBean.bigDoubleProperty > myBean.bigIntegerProperty", getELText(_structuredDocument,1583));
+ assertEquals("myBean.coins > 'quarter'", getELText(_structuredDocument,1669));
+ assertEquals("myBean.coins gt 'quarter'", getELText(_structuredDocument,1727));
+ assertEquals("myBean.rawEnum > 'quarter'", getELText(_structuredDocument,1786));
+ assertEquals("myBean.coinEnum gt 'quarter'", getELText(_structuredDocument,1846));
+ assertEquals("myBean.rawEnum > myBean.coins", getELText(_structuredDocument,1904));
+ assertEquals("myBean.coinEnum > myBean.colors", getELText(_structuredDocument,1963));
- assertEquals("5 > 3", getELText(_structuredDocument,1695));
- assertEquals("5 gt 3", getELText(_structuredDocument,1731));
- assertEquals("'4' > '34'", getELText(_structuredDocument,1768));
- assertEquals("'4' gt '34'", getELText(_structuredDocument,1809));
- assertEquals("'34' > '34'", getELText(_structuredDocument,1851));
- assertEquals("'34' gt '34'", getELText(_structuredDocument,1893));
- assertEquals("-5 > 2", getELText(_structuredDocument,1936));
- assertEquals("-5 gt 2", getELText(_structuredDocument,1973));
- assertEquals("2 > -5", getELText(_structuredDocument,2011));
- assertEquals("2 gt -5", getELText(_structuredDocument,2048));
- assertEquals("-5 > -5", getELText(_structuredDocument,2086));
- assertEquals("-5 gt -5", getELText(_structuredDocument,2124));
- assertEquals("myBean.integerProperty > null", getELText(_structuredDocument,2163));
- assertEquals("null gt myBean.integerProperty", getELText(_structuredDocument,2223));
+ assertEquals("5 > 3", getELText(_structuredDocument,2054));
+ assertEquals("5 gt 3", getELText(_structuredDocument,2090));
+ assertEquals("'4' > '34'", getELText(_structuredDocument,2127));
+ assertEquals("'4' gt '34'", getELText(_structuredDocument,2168));
+ assertEquals("'34' > '34'", getELText(_structuredDocument,2210));
+ assertEquals("'34' gt '34'", getELText(_structuredDocument,2252));
+ assertEquals("-5 > 2", getELText(_structuredDocument,2295));
+ assertEquals("-5 gt 2", getELText(_structuredDocument,2332));
+ assertEquals("2 > -5", getELText(_structuredDocument,2370));
+ assertEquals("2 gt -5", getELText(_structuredDocument,2407));
+ assertEquals("-5 > -5", getELText(_structuredDocument,2445));
+ assertEquals("-5 gt -5", getELText(_structuredDocument,2483));
+ assertEquals("myBean.integerProperty > null", getELText(_structuredDocument,2522));
+ assertEquals("null gt myBean.integerProperty", getELText(_structuredDocument,2582));
- assertEquals("5 > true", getELText(_structuredDocument,2307));
- assertEquals("5 gt true", getELText(_structuredDocument,2346));
- assertEquals("myBean.integerProperty > myBean.booleanProperty", getELText(_structuredDocument,2386));
- assertEquals("myBean.integerProperty gt myBean.booleanProperty", getELText(_structuredDocument,2464));
- assertEquals("myBean.stringArrayProperty > myBean.booleanProperty", getELText(_structuredDocument,2543));
- assertEquals("myBean.stringArrayProperty gt myBean.booleanProperty", getELText(_structuredDocument,2625));
- assertEquals("myBean.integerProperty > true ", getELText(_structuredDocument,2711));
- assertEquals("myBean.integerProperty gt true ", getELText(_structuredDocument,2775));
- assertEquals("myBean.booleanProperty > true", getELText(_structuredDocument,2840));
- assertEquals("myBean.booleanProperty gt true", getELText(_structuredDocument,2903));
- assertEquals("true > false", getELText(_structuredDocument,2965));
- assertEquals("true gt false", getELText(_structuredDocument,3009));
+ assertEquals("5 > true", getELText(_structuredDocument,2666));
+ assertEquals("5 gt true", getELText(_structuredDocument,2705));
+ assertEquals("myBean.integerProperty > myBean.booleanProperty", getELText(_structuredDocument,2745));
+ assertEquals("myBean.integerProperty gt myBean.booleanProperty", getELText(_structuredDocument,2823));
+ assertEquals("myBean.stringArrayProperty > myBean.booleanProperty", getELText(_structuredDocument,2902));
+ assertEquals("myBean.stringArrayProperty gt myBean.booleanProperty", getELText(_structuredDocument,2984));
+ assertEquals("myBean.integerProperty > true ", getELText(_structuredDocument,3070));
+ assertEquals("myBean.integerProperty gt true ", getELText(_structuredDocument,3134));
+ assertEquals("myBean.booleanProperty > true", getELText(_structuredDocument,3199));
+ assertEquals("myBean.booleanProperty gt true", getELText(_structuredDocument,3262));
+ assertEquals("true > false", getELText(_structuredDocument,3324));
+ assertEquals("true > false", getELText(_structuredDocument,3413));
+ assertEquals("myBean.coins > myBean.colors", getELText(_structuredDocument,3456));
+ assertEquals("myBean.coins gt myBean.colors", getELText(_structuredDocument,3515));
}
public void testNoErrorExprs()
@@ -84,90 +91,104 @@
assertNoError(1460, Signature.SIG_BOOLEAN);
assertNoError(1519, Signature.SIG_BOOLEAN);
assertNoError(1583, Signature.SIG_BOOLEAN);
+ assertNoError(1669, Signature.SIG_BOOLEAN);
+ assertNoError(1727, Signature.SIG_BOOLEAN);
+ assertNoError(1786, Signature.SIG_BOOLEAN);
+ assertNoError(1846, Signature.SIG_BOOLEAN);
+ assertNoError(1904, Signature.SIG_BOOLEAN);
+ assertNoError(1963, Signature.SIG_BOOLEAN);
}
public void testWarningExprs()
{
- List list = assertSemanticWarning(1695, Signature.SIG_BOOLEAN, 1);
+ List list = assertSemanticWarning(2054, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1731, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2090, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1768, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2127, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1809, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2168, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1851, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2210, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1893, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2252, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1936, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2295, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1973, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2332, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2011, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2370, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2048, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2407, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2086, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2445, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2124, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2483, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2163, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2522, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2223, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2582, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
-
}
public void testErrorExprs()
{
- List list = assertSemanticError(2307, null, 1);
+ List list = assertSemanticError(2666, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2346, null, 1);
+ list = assertSemanticError(2705, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2386, null, 1);
+ list = assertSemanticError(2745, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2464, null, 1);
+ list = assertSemanticError(2823, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2543, null, 1);
+ list = assertSemanticError(2902, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2625, null, 1);
+ list = assertSemanticError(2984, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2711, null, 1);
+ list = assertSemanticError(3070, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2775, null, 1);
+ list = assertSemanticError(3134, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2840, null, 1);
+ list = assertSemanticError(3199, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2903, null, 1);
+ list = assertSemanticError(3262, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2965, null, 1);
+ list = assertSemanticError(3324, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(3009, null, 1);
+ list = assertSemanticError(3368, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3413, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3456, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3515, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
}
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java
index a85f5b0..c6debfe 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanEqTestCase.java
@@ -38,36 +38,44 @@
assertEquals("myBean.comparableProperty le myBean.collectionProperty", getELText(_structuredDocument,1315));
assertEquals("myBean.integerProperty <= -3", getELText(_structuredDocument,1405));
assertEquals("myBean.doubleProperty <= 5", getELText(_structuredDocument,1467));
- assertEquals("5 le myBean.bigIntegerProperty", getELText(_structuredDocument,1526));
- assertEquals("myBean.bigDoubleProperty <= myBean.bigIntegerProperty", getELText(_structuredDocument,1590));
+ assertEquals("5 le myBean.bigIntegerProperty", getELText(_structuredDocument,1527));
+ assertEquals("myBean.bigDoubleProperty <= myBean.bigIntegerProperty", getELText(_structuredDocument,1591));
+ assertEquals("myBean.coins <= 'quarter'", getELText(_structuredDocument,1678));
+ assertEquals("myBean.coins le 'quarter'", getELText(_structuredDocument,1737));
+ assertEquals("myBean.rawEnum <= 'quarter'", getELText(_structuredDocument,1796));
+ assertEquals("myBean.coinEnum le 'quarter'", getELText(_structuredDocument,1857));
+ assertEquals("myBean.rawEnum <= myBean.coins", getELText(_structuredDocument,1915));
+ assertEquals("myBean.coinEnum <= myBean.colors", getELText(_structuredDocument,1975));
- assertEquals("5 <= 3", getELText(_structuredDocument,1705));
- assertEquals("5 le 3", getELText(_structuredDocument,1742));
- assertEquals("'4' <= '34'", getELText(_structuredDocument,1779));
- assertEquals("'4' le '34'", getELText(_structuredDocument,1821));
- assertEquals("'34' <= '34'", getELText(_structuredDocument,1863));
- assertEquals("'34' le '34'", getELText(_structuredDocument,1906));
- assertEquals("-5 <= 2", getELText(_structuredDocument,1949));
- assertEquals("-5 le 2", getELText(_structuredDocument,1987));
- assertEquals("2 <= -5", getELText(_structuredDocument,2025));
- assertEquals("2 le -5", getELText(_structuredDocument,2063));
- assertEquals("-5 <= -5", getELText(_structuredDocument,2101));
- assertEquals("-5 le -5", getELText(_structuredDocument,2140));
- assertEquals("myBean.integerProperty <= null", getELText(_structuredDocument,2179));
- assertEquals("null le myBean.integerProperty", getELText(_structuredDocument,2239));
+ assertEquals("5 <= 3", getELText(_structuredDocument,2070));
+ assertEquals("5 le 3", getELText(_structuredDocument,2107));
+ assertEquals("'4' <= '34'", getELText(_structuredDocument,2144));
+ assertEquals("'4' le '34'", getELText(_structuredDocument,2186));
+ assertEquals("'34' <= '34'", getELText(_structuredDocument,2228));
+ assertEquals("'34' le '34'", getELText(_structuredDocument,2271));
+ assertEquals("-5 <= 2", getELText(_structuredDocument,2314));
+ assertEquals("-5 le 2", getELText(_structuredDocument,2352));
+ assertEquals("2 <= -5", getELText(_structuredDocument,2390));
+ assertEquals("2 le -5", getELText(_structuredDocument,2428));
+ assertEquals("-5 <= -5", getELText(_structuredDocument,2466));
+ assertEquals("-5 le -5", getELText(_structuredDocument,2505));
+ assertEquals("myBean.integerProperty <= null", getELText(_structuredDocument,2544));
+ assertEquals("null le myBean.integerProperty", getELText(_structuredDocument,2605));
- assertEquals("5 <= true", getELText(_structuredDocument,2323));
- assertEquals("5 le true", getELText(_structuredDocument,2363));
- assertEquals("myBean.integerProperty <= myBean.booleanProperty", getELText(_structuredDocument,2403));
- assertEquals("myBean.integerProperty le myBean.booleanProperty", getELText(_structuredDocument,2482));
- assertEquals("myBean.stringArrayProperty <= myBean.booleanProperty", getELText(_structuredDocument,2561));
- assertEquals("myBean.stringArrayProperty le myBean.booleanProperty", getELText(_structuredDocument,2644));
- assertEquals("myBean.integerProperty <= true ", getELText(_structuredDocument,2730));
- assertEquals("myBean.integerProperty le true ", getELText(_structuredDocument,2795));
- assertEquals("myBean.booleanProperty <= true", getELText(_structuredDocument,2860));
- assertEquals("myBean.booleanProperty le true", getELText(_structuredDocument,2924));
- assertEquals("true <= false", getELText(_structuredDocument,2986));
- assertEquals("true le false", getELText(_structuredDocument,3031));
+ assertEquals("5 <= true", getELText(_structuredDocument,2689));
+ assertEquals("5 le true", getELText(_structuredDocument,2729));
+ assertEquals("myBean.integerProperty <= myBean.booleanProperty", getELText(_structuredDocument,2769));
+ assertEquals("myBean.integerProperty le myBean.booleanProperty", getELText(_structuredDocument,2848));
+ assertEquals("myBean.stringArrayProperty <= myBean.booleanProperty", getELText(_structuredDocument,2927));
+ assertEquals("myBean.stringArrayProperty le myBean.booleanProperty", getELText(_structuredDocument,3010));
+ assertEquals("myBean.integerProperty <= true ", getELText(_structuredDocument,3096));
+ assertEquals("myBean.integerProperty le true ", getELText(_structuredDocument,3161));
+ assertEquals("myBean.booleanProperty <= true", getELText(_structuredDocument,3226));
+ assertEquals("myBean.booleanProperty le true", getELText(_structuredDocument,3290));
+ assertEquals("true <= false", getELText(_structuredDocument,3352));
+ assertEquals("true le false", getELText(_structuredDocument,3397));
+ assertEquals("myBean.coins <= myBean.colors", getELText(_structuredDocument,3441));
+ assertEquals("myBean.coins le myBean.colors", getELText(_structuredDocument,3501));
}
public void testNoErrorExprs()
@@ -82,92 +90,103 @@
assertNoError(1315, Signature.SIG_BOOLEAN);
assertNoError(1405, Signature.SIG_BOOLEAN);
assertNoError(1467, Signature.SIG_BOOLEAN);
- assertNoError(1526, Signature.SIG_BOOLEAN);
- assertNoError(1590, Signature.SIG_BOOLEAN);
+ assertNoError(1527, Signature.SIG_BOOLEAN);
+ assertNoError(1591, Signature.SIG_BOOLEAN);
+ assertNoError(1678, Signature.SIG_BOOLEAN);
+ assertNoError(1737, Signature.SIG_BOOLEAN);
+ assertNoError(1796, Signature.SIG_BOOLEAN);
+ assertNoError(1857, Signature.SIG_BOOLEAN);
+ assertNoError(1915, Signature.SIG_BOOLEAN);
+ assertNoError(1975, Signature.SIG_BOOLEAN);
}
public void testWarningExprs()
{
- List list = assertSemanticWarning(1705, Signature.SIG_BOOLEAN, 1);
+ List list = assertSemanticWarning(2070, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1742, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2107, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1779, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2144, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1821, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2186, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1863, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2228, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1906, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2271, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1949, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2314, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1987, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2352, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2025, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2390, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2063, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2428, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2101, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2466, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2140, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2505, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2179, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2544, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2239, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2605, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
-
}
public void testErrorExprs()
{
- List list = assertSemanticError(2323, null, 1);
+ List list = assertSemanticError(2689, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2363, null, 1);
+ list = assertSemanticError(2729, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2403, null, 1);
+ list = assertSemanticError(2769, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2482, null, 1);
+ list = assertSemanticError(2848, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2561, null, 1);
+ list = assertSemanticError(2927, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2644, null, 1);
+ list = assertSemanticError(3010, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2730, null, 1);
+ list = assertSemanticError(3096, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2795, null, 1);
+ list = assertSemanticError(3161, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2860, null, 1);
+ list = assertSemanticError(3226, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2924, null, 1);
+ list = assertSemanticError(3290, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2986, null, 1);
+ list = assertSemanticError(3352, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(3031, null, 1);
+ list = assertSemanticError(3397, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3441, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3501, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
}
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java
index ac6897f..87a4008 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LessThanTestCase.java
@@ -40,34 +40,42 @@
assertEquals("myBean.doubleProperty < 5", getELText(_structuredDocument,1460));
assertEquals("5 lt myBean.bigIntegerProperty", getELText(_structuredDocument,1519));
assertEquals("myBean.bigDoubleProperty < myBean.bigIntegerProperty", getELText(_structuredDocument,1583));
+ assertEquals("myBean.coins < 'quarter'", getELText(_structuredDocument,1669));
+ assertEquals("myBean.coins lt 'quarter'", getELText(_structuredDocument,1727));
+ assertEquals("myBean.rawEnum < 'quarter'", getELText(_structuredDocument,1786));
+ assertEquals("myBean.coinEnum lt 'quarter'", getELText(_structuredDocument,1846));
+ assertEquals("myBean.rawEnum < myBean.coins", getELText(_structuredDocument,1904));
+ assertEquals("myBean.coinEnum < myBean.colors", getELText(_structuredDocument,1963));
- assertEquals("5 < 3", getELText(_structuredDocument,1695));
- assertEquals("5 lt 3", getELText(_structuredDocument,1731));
- assertEquals("'4' < '34'", getELText(_structuredDocument,1768));
- assertEquals("'4' lt '34'", getELText(_structuredDocument,1809));
- assertEquals("'34' < '34'", getELText(_structuredDocument,1851));
- assertEquals("'34' lt '34'", getELText(_structuredDocument,1893));
- assertEquals("-5 < 2", getELText(_structuredDocument,1936));
- assertEquals("-5 lt 2", getELText(_structuredDocument,1973));
- assertEquals("2 < -5", getELText(_structuredDocument,2011));
- assertEquals("2 lt -5", getELText(_structuredDocument,2048));
- assertEquals("-5 < -5", getELText(_structuredDocument,2086));
- assertEquals("-5 lt -5", getELText(_structuredDocument,2124));
- assertEquals("myBean.integerProperty < null", getELText(_structuredDocument,2163));
- assertEquals("null lt myBean.integerProperty", getELText(_structuredDocument,2223));
+ assertEquals("5 < 3", getELText(_structuredDocument,2054));
+ assertEquals("5 lt 3", getELText(_structuredDocument,2090));
+ assertEquals("'4' < '34'", getELText(_structuredDocument,2127));
+ assertEquals("'4' lt '34'", getELText(_structuredDocument,2168));
+ assertEquals("'34' < '34'", getELText(_structuredDocument,2210));
+ assertEquals("'34' lt '34'", getELText(_structuredDocument,2252));
+ assertEquals("-5 < 2", getELText(_structuredDocument,2295));
+ assertEquals("-5 lt 2", getELText(_structuredDocument,2332));
+ assertEquals("2 < -5", getELText(_structuredDocument,2370));
+ assertEquals("2 lt -5", getELText(_structuredDocument,2407));
+ assertEquals("-5 < -5", getELText(_structuredDocument,2445));
+ assertEquals("-5 lt -5", getELText(_structuredDocument,2483));
+ assertEquals("myBean.integerProperty < null", getELText(_structuredDocument,2522));
+ assertEquals("null lt myBean.integerProperty", getELText(_structuredDocument,2582));
- assertEquals("5 < true", getELText(_structuredDocument,2307));
- assertEquals("5 lt true", getELText(_structuredDocument,2346));
- assertEquals("myBean.integerProperty < myBean.booleanProperty", getELText(_structuredDocument,2386));
- assertEquals("myBean.integerProperty lt myBean.booleanProperty", getELText(_structuredDocument,2464));
- assertEquals("myBean.stringArrayProperty < myBean.booleanProperty", getELText(_structuredDocument,2543));
- assertEquals("myBean.stringArrayProperty lt myBean.booleanProperty", getELText(_structuredDocument,2625));
- assertEquals("myBean.integerProperty < true ", getELText(_structuredDocument,2711));
- assertEquals("myBean.integerProperty lt true ", getELText(_structuredDocument,2775));
- assertEquals("myBean.booleanProperty < true", getELText(_structuredDocument,2840));
- assertEquals("myBean.booleanProperty lt true", getELText(_structuredDocument,2903));
- assertEquals("true < false", getELText(_structuredDocument,2965));
- assertEquals("true lt false", getELText(_structuredDocument,3009));
+ assertEquals("5 < true", getELText(_structuredDocument,2666));
+ assertEquals("5 lt true", getELText(_structuredDocument,2705));
+ assertEquals("myBean.integerProperty < myBean.booleanProperty", getELText(_structuredDocument,2745));
+ assertEquals("myBean.integerProperty lt myBean.booleanProperty", getELText(_structuredDocument,2823));
+ assertEquals("myBean.stringArrayProperty < myBean.booleanProperty", getELText(_structuredDocument,2902));
+ assertEquals("myBean.stringArrayProperty lt myBean.booleanProperty", getELText(_structuredDocument,2984));
+ assertEquals("myBean.integerProperty < true ", getELText(_structuredDocument,3070));
+ assertEquals("myBean.integerProperty lt true ", getELText(_structuredDocument,3134));
+ assertEquals("myBean.booleanProperty < true", getELText(_structuredDocument,3199));
+ assertEquals("myBean.booleanProperty lt true", getELText(_structuredDocument,3262));
+ assertEquals("true < false", getELText(_structuredDocument,3324));
+ assertEquals("true < false", getELText(_structuredDocument,3413));
+ assertEquals("myBean.coins < myBean.colors", getELText(_structuredDocument,3456));
+ assertEquals("myBean.coins lt myBean.colors", getELText(_structuredDocument,3515));
}
public void testNoErrorExprs()
@@ -84,90 +92,105 @@
assertNoError(1460, Signature.SIG_BOOLEAN);
assertNoError(1519, Signature.SIG_BOOLEAN);
assertNoError(1583, Signature.SIG_BOOLEAN);
+ assertNoError(1669, Signature.SIG_BOOLEAN);
+ assertNoError(1727, Signature.SIG_BOOLEAN);
+ assertNoError(1786, Signature.SIG_BOOLEAN);
+ assertNoError(1846, Signature.SIG_BOOLEAN);
+ assertNoError(1904, Signature.SIG_BOOLEAN);
+ assertNoError(1963, Signature.SIG_BOOLEAN);
}
public void testWarningExprs()
{
- List list = assertSemanticWarning(1695, Signature.SIG_BOOLEAN, 1);
+ List list = assertSemanticWarning(2054, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1731, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2090, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1768, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2127, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1809, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2168, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1851, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2210, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1893, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2252, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1936, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2295, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1973, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2332, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2011, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2370, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2048, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2407, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2086, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2445, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2124, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2483, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2163, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2522, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(2223, Signature.SIG_BOOLEAN, 1);
+ list = assertSemanticWarning(2582, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
}
public void testErrorExprs()
{
- List list = assertSemanticError(2307, null, 1);
+ List list = assertSemanticError(2666, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2346, null, 1);
+ list = assertSemanticError(2705, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2386, null, 1);
+ list = assertSemanticError(2745, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2464, null, 1);
+ list = assertSemanticError(2823, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2543, null, 1);
+ list = assertSemanticError(2902, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2625, null, 1);
+ list = assertSemanticError(2984, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2711, null, 1);
+ list = assertSemanticError(3070, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2775, null, 1);
+ list = assertSemanticError(3134, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2840, null, 1);
+ list = assertSemanticError(3199, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2903, null, 1);
+ list = assertSemanticError(3262, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(2965, null, 1);
+ list = assertSemanticError(3324, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
- list = assertSemanticError(3009, null, 1);
+ list = assertSemanticError(3368, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3413, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_NO_AVAILABLE_TYPE_COERCION_ID);
+
+ list = assertSemanticError(3456, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
+
+ list = assertSemanticError(3515, null, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COMPARISON_OF_ENUMS_INCOMPATIBLE_ID);
}
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java
index 184ce74..255625d 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalEqualsTestCase.java
@@ -39,29 +39,42 @@
assertEquals("myBean.bigIntegerProperty == 500", getELText(_structuredDocument,1480));
assertEquals("myBean.stringArrayProperty == '3'", getELText(_structuredDocument,1546));
assertEquals("myBean.stringArrayProperty eq myBean.listProperty", getELText(_structuredDocument,1613));
+ assertEquals("myBean.coins == 'dime'", getELText(_structuredDocument,1692));
+ assertEquals("myBean.coins eq 'dime'", getELText(_structuredDocument,1745));
+ assertEquals("myBean.colors == 'red'", getELText(_structuredDocument,1798));
+ assertEquals("myBean.colors eq 'red'", getELText(_structuredDocument,1850));
+ assertEquals("myBean.coins == myBean.stringProperty", getELText(_structuredDocument,1902));
+ assertEquals("myBean.coins eq myBean.stringProperty", getELText(_structuredDocument,1969));
+ assertEquals("myBean.rawEnum == 'red'", getELText(_structuredDocument,2036));
+ assertEquals("myBean.coinEnum == myBean.coins", getELText(_structuredDocument,2089));
- assertEquals("5 == 3", getELText(_structuredDocument,1717));
- assertEquals("5 eq 3", getELText(_structuredDocument,1754));
- assertEquals("true == false", getELText(_structuredDocument,1791));
- assertEquals("true eq false", getELText(_structuredDocument,1835));
- assertEquals("'4' == '34'", getELText(_structuredDocument,1879));
- assertEquals("'4' eq '34'", getELText(_structuredDocument,1921));
- assertEquals("'34' == '34'", getELText(_structuredDocument,1963));
- assertEquals("'34' eq '34'", getELText(_structuredDocument,2006));
- assertEquals("myBean.integerProperty == null", getELText(_structuredDocument,2049));
- assertEquals("null eq myBean.integerProperty", getELText(_structuredDocument,2110));
- assertEquals("5.4 == 4.3", getELText(_structuredDocument,2171));
- assertEquals("true == true", getELText(_structuredDocument,2212));
+ assertEquals("5 == 3", getELText(_structuredDocument,2175));
+ assertEquals("5 eq 3", getELText(_structuredDocument,2212));
+ assertEquals("true == false", getELText(_structuredDocument,2249));
+ assertEquals("true eq false", getELText(_structuredDocument,2293));
+ assertEquals("'4' == '34'", getELText(_structuredDocument,2337));
+ assertEquals("'4' eq '34'", getELText(_structuredDocument,2379));
+ assertEquals("'34' == '34'", getELText(_structuredDocument,2421));
+ assertEquals("'34' eq '34'", getELText(_structuredDocument,2464));
+ assertEquals("myBean.integerProperty == null", getELText(_structuredDocument,2507));
+ assertEquals("null eq myBean.integerProperty", getELText(_structuredDocument,2568));
+ assertEquals("5.4 == 4.3", getELText(_structuredDocument,2629));
+ assertEquals("true == true", getELText(_structuredDocument,2670));
+ assertEquals("myBean.coins == 'notAValue'", getELText(_structuredDocument,2713));
+ assertEquals("myBean.coins eq 'notAValue'", getELText(_structuredDocument,2771));
+ assertEquals("myBean.coins == 'notAValue' && myBean.coins == 'dime'", getELText(_structuredDocument,2829));
+ assertEquals("myBean.coins eq 'notAValue' && myBean.coins eq 'dime'", getELText(_structuredDocument,2913));
+ assertEquals("myBean.coins == myBean.colors", getELText(_structuredDocument,2997));
- assertEquals("5 == true", getELText(_structuredDocument,2276));
- assertEquals("5 eq true", getELText(_structuredDocument,2316));
- assertEquals("myBean.integerProperty == myBean.booleanProperty", getELText(_structuredDocument,2356));
- assertEquals("myBean.integerProperty eq myBean.booleanProperty", getELText(_structuredDocument,2435));
- assertEquals("myBean.stringArrayProperty == myBean.booleanProperty", getELText(_structuredDocument,2514));
- assertEquals("myBean.booleanProperty eq myBean.stringArrayProperty", getELText(_structuredDocument,2597));
- assertEquals("myBean.integerProperty == true ", getELText(_structuredDocument,2683));
- assertEquals("myBean.integerProperty eq true ", getELText(_structuredDocument,2748));
- assertEquals("false == myBean.integerProperty", getELText(_structuredDocument,2813));
+ assertEquals("5 == true", getELText(_structuredDocument,3078));
+ assertEquals("5 eq true", getELText(_structuredDocument,3118));
+ assertEquals("myBean.integerProperty == myBean.booleanProperty", getELText(_structuredDocument,3158));
+ assertEquals("myBean.integerProperty eq myBean.booleanProperty", getELText(_structuredDocument,3237));
+ assertEquals("myBean.stringArrayProperty == myBean.booleanProperty", getELText(_structuredDocument,3316));
+ assertEquals("myBean.booleanProperty eq myBean.stringArrayProperty", getELText(_structuredDocument,3399));
+ assertEquals("myBean.integerProperty == true ", getELText(_structuredDocument,3485));
+ assertEquals("myBean.integerProperty eq true ", getELText(_structuredDocument,3550));
+ assertEquals("false == myBean.integerProperty", getELText(_structuredDocument,3615));
}
public void testNoErrorExprs()
@@ -79,74 +92,99 @@
assertNoError(1480, Signature.SIG_BOOLEAN);
assertNoError(1546, Signature.SIG_BOOLEAN);
assertNoError(1613, Signature.SIG_BOOLEAN);
+ assertNoError(1692, Signature.SIG_BOOLEAN);
+ assertNoError(1745, Signature.SIG_BOOLEAN);
+ assertNoError(1798, Signature.SIG_BOOLEAN);
+ assertNoError(1850, Signature.SIG_BOOLEAN);
+ assertNoError(1902, Signature.SIG_BOOLEAN);
+ assertNoError(1969, Signature.SIG_BOOLEAN);
+ assertNoError(2036, Signature.SIG_BOOLEAN);
+ assertNoError(2089, Signature.SIG_BOOLEAN);
}
public void testWarningExprs()
{
- List list = assertSemanticWarning(1717, Signature.SIG_BOOLEAN, 1);
+ List list = assertSemanticWarning(2175, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1754, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1791, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1835, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1879, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1921, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1963, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2006, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2049, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2110, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2171, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
list = assertSemanticWarning(2212, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2249, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2293, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2337, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2379, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2421, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2464, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2507, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2568, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2629, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2670, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2713, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2771, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2829, Signature.SIG_BOOLEAN, 2);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2913, Signature.SIG_BOOLEAN, 2);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2997, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
}
public void testErrorExprs()
{
- List list = assertSemanticError(2276, null, 1);
+ List list = assertSemanticError(3078, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2316, null, 1);
+ list = assertSemanticError(3118, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2356, null, 1);
+ list = assertSemanticError(3158, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2435, null, 1);
+ list = assertSemanticError(3237, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2514, null, 1);
+ list = assertSemanticError(3316, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
- list = assertSemanticError(2597, null, 1);
+ list = assertSemanticError(3399, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
- list = assertSemanticError(2683, null, 1);
+ list = assertSemanticError(3485, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2748, null, 1);
+ list = assertSemanticError(3550, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2813, null, 1);
+ list = assertSemanticError(3615, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
}
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java
index 418d698..40d8194 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/jsp/LogicalNotEqualsTestCase.java
@@ -39,29 +39,42 @@
assertEquals("myBean.bigIntegerProperty != 500", getELText(_structuredDocument,1480));
assertEquals("myBean.stringArrayProperty != '3'", getELText(_structuredDocument,1546));
assertEquals("myBean.stringArrayProperty ne myBean.listProperty", getELText(_structuredDocument,1613));
+ assertEquals("myBean.coins != 'dime'", getELText(_structuredDocument,1692));
+ assertEquals("myBean.coins ne 'dime'", getELText(_structuredDocument,1745));
+ assertEquals("myBean.colors != 'red'", getELText(_structuredDocument,1798));
+ assertEquals("myBean.colors ne 'red'", getELText(_structuredDocument,1850));
+ assertEquals("myBean.coins != myBean.stringProperty", getELText(_structuredDocument,1902));
+ assertEquals("myBean.coins ne myBean.stringProperty", getELText(_structuredDocument,1969));
+ assertEquals("myBean.rawEnum != 'red'", getELText(_structuredDocument,2036));
+ assertEquals("myBean.coinEnum ne myBean.coins", getELText(_structuredDocument,2089));
- assertEquals("5 != 3", getELText(_structuredDocument,1717));
- assertEquals("5 ne 3", getELText(_structuredDocument,1754));
- assertEquals("true != false", getELText(_structuredDocument,1791));
- assertEquals("true ne false", getELText(_structuredDocument,1835));
- assertEquals("'4' != '34'", getELText(_structuredDocument,1879));
- assertEquals("'4' ne '34'", getELText(_structuredDocument,1921));
- assertEquals("'34' != '34'", getELText(_structuredDocument,1963));
- assertEquals("'34' ne '34'", getELText(_structuredDocument,2006));
- assertEquals("myBean.integerProperty != null", getELText(_structuredDocument,2049));
- assertEquals("null ne myBean.integerProperty", getELText(_structuredDocument,2110));
- assertEquals("5.4 != 4.3", getELText(_structuredDocument,2171));
- assertEquals("true != true", getELText(_structuredDocument,2212));
+ assertEquals("5 != 3", getELText(_structuredDocument,2175));
+ assertEquals("5 ne 3", getELText(_structuredDocument,2212));
+ assertEquals("true != false", getELText(_structuredDocument,2249));
+ assertEquals("true ne false", getELText(_structuredDocument,2293));
+ assertEquals("'4' != '34'", getELText(_structuredDocument,2337));
+ assertEquals("'4' ne '34'", getELText(_structuredDocument,2379));
+ assertEquals("'34' != '34'", getELText(_structuredDocument,2421));
+ assertEquals("'34' ne '34'", getELText(_structuredDocument,2464));
+ assertEquals("myBean.integerProperty != null", getELText(_structuredDocument,2507));
+ assertEquals("null ne myBean.integerProperty", getELText(_structuredDocument,2568));
+ assertEquals("5.4 != 4.3", getELText(_structuredDocument,2629));
+ assertEquals("true != true", getELText(_structuredDocument,2670));
+ assertEquals("myBean.coins != 'notAValue'", getELText(_structuredDocument,2713));
+ assertEquals("myBean.coins ne 'notAValue'", getELText(_structuredDocument,2771));
+ assertEquals("myBean.coins != 'notAValue' || myBean.coins != 'dime'", getELText(_structuredDocument,2829));
+ assertEquals("myBean.coins ne 'notAValue' || myBean.coins ne 'dime'", getELText(_structuredDocument,2913));
+ assertEquals("myBean.coins != myBean.colors", getELText(_structuredDocument,2997));
- assertEquals("5 != true", getELText(_structuredDocument,2276));
- assertEquals("5 ne true", getELText(_structuredDocument,2316));
- assertEquals("myBean.integerProperty != myBean.booleanProperty", getELText(_structuredDocument,2356));
- assertEquals("myBean.integerProperty ne myBean.booleanProperty", getELText(_structuredDocument,2435));
- assertEquals("myBean.stringArrayProperty != myBean.booleanProperty", getELText(_structuredDocument,2514));
- assertEquals("myBean.booleanProperty ne myBean.stringArrayProperty", getELText(_structuredDocument,2597));
- assertEquals("myBean.integerProperty != true ", getELText(_structuredDocument,2683));
- assertEquals("myBean.integerProperty ne true ", getELText(_structuredDocument,2748));
- assertEquals("false != myBean.integerProperty", getELText(_structuredDocument,2813));
+ assertEquals("5 != true", getELText(_structuredDocument,3078));
+ assertEquals("5 ne true", getELText(_structuredDocument,3118));
+ assertEquals("myBean.integerProperty != myBean.booleanProperty", getELText(_structuredDocument,3158));
+ assertEquals("myBean.integerProperty ne myBean.booleanProperty", getELText(_structuredDocument,3237));
+ assertEquals("myBean.stringArrayProperty != myBean.booleanProperty", getELText(_structuredDocument,3316));
+ assertEquals("myBean.booleanProperty ne myBean.stringArrayProperty", getELText(_structuredDocument,3399));
+ assertEquals("myBean.integerProperty != true ", getELText(_structuredDocument,3485));
+ assertEquals("myBean.integerProperty ne true ", getELText(_structuredDocument,3550));
+ assertEquals("false != myBean.integerProperty", getELText(_structuredDocument,3615));
}
public void testNoErrorExprs()
@@ -79,74 +92,99 @@
assertNoError(1480, Signature.SIG_BOOLEAN);
assertNoError(1546, Signature.SIG_BOOLEAN);
assertNoError(1613, Signature.SIG_BOOLEAN);
+ assertNoError(1692, Signature.SIG_BOOLEAN);
+ assertNoError(1745, Signature.SIG_BOOLEAN);
+ assertNoError(1798, Signature.SIG_BOOLEAN);
+ assertNoError(1850, Signature.SIG_BOOLEAN);
+ assertNoError(1902, Signature.SIG_BOOLEAN);
+ assertNoError(1969, Signature.SIG_BOOLEAN);
+ assertNoError(2036, Signature.SIG_BOOLEAN);
+ assertNoError(2089, Signature.SIG_BOOLEAN);
}
public void testWarningExprs()
{
- List list = assertSemanticWarning(1717, Signature.SIG_BOOLEAN, 1);
+ List list = assertSemanticWarning(2175, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
- list = assertSemanticWarning(1754, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1791, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1835, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1879, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1921, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(1963, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2006, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2049, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2110, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
-
- list = assertSemanticWarning(2171, Signature.SIG_BOOLEAN, 1);
- assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
-
list = assertSemanticWarning(2212, Signature.SIG_BOOLEAN, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2249, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2293, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2337, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2379, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2421, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2464, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2507, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2568, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_EQUALITY_COMP_WITH_NULL_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2629, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2670, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CONSTANT_EXPRESSION_ALWAYS_EVAL_SAME_ID);
+
+ list = assertSemanticWarning(2713, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2771, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+
+ list = assertSemanticWarning(2829, Signature.SIG_BOOLEAN, 2);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2913, Signature.SIG_BOOLEAN, 2);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_OP_FIRST_ARGUMENT_SHORT_CIRCUITS_ID);
+
+ list = assertSemanticWarning(2997, Signature.SIG_BOOLEAN, 1);
+ assertContainsProblem(list, DiagnosticFactory.BINARY_COMPARISON_WITH_ENUM_ALWAYS_SAME_ID);
}
public void testErrorExprs()
{
- List list = assertSemanticError(2276, null, 1);
+ List list = assertSemanticError(3078, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2316, null, 1);
+ list = assertSemanticError(3118, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2356, null, 1);
+ list = assertSemanticError(3158, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2435, null, 1);
+ list = assertSemanticError(3237, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2514, null, 1);
+ list = assertSemanticError(3316, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
- list = assertSemanticError(2597, null, 1);
+ list = assertSemanticError(3399, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_CANNOT_COERCE_ARGUMENT_TO_BOOLEAN_ID);
- list = assertSemanticError(2683, null, 1);
+ list = assertSemanticError(3485, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2748, null, 1);
+ list = assertSemanticError(3550, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
- list = assertSemanticError(2813, null, 1);
+ list = assertSemanticError(3615, null, 1);
assertContainsProblem(list, DiagnosticFactory.BINARY_OP_COULD_NOT_MAKE_NUMERIC_COERCION_ID);
}
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/StressTest.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/StressTest.java
new file mode 100644
index 0000000..f7d97d3
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/perf/StressTest.java
@@ -0,0 +1,189 @@
+package org.eclipse.jst.jsf.validation.el.tests.perf;
+
+import java.io.PrintStream;
+import java.text.MessageFormat;
+
+import org.eclipse.jst.jsf.context.symbol.ISymbol;
+import org.eclipse.jst.jsf.core.IJSFCoreConstants;
+import org.eclipse.jst.jsf.designtime.DesignTimeApplicationManager;
+import org.eclipse.jst.jsf.designtime.context.DTFacesContext;
+import org.eclipse.jst.jsf.designtime.el.AbstractDTPropertyResolver;
+import org.eclipse.jst.jsf.designtime.el.AbstractDTVariableResolver;
+import org.eclipse.jst.jsf.validation.el.tests.base.SingleJSPTestCase;
+import org.eclipse.jst.jsf.validation.internal.el.ELExpressionValidator;
+
+/**
+ * TODO: should the resolver specific stuff be split to different test plugin?
+ *
+ * @author cbateman
+ *
+ */
+public class StressTest extends SingleJSPTestCase
+{
+ public StressTest()
+ {
+ super("/testdata/jsps/perfTest1.jsp.data", "/perfTest1.jsp", IJSFCoreConstants.FACET_VERSION_1_1, FACES_CONFIG_FILE_NAME_1_1);
+ }
+
+ public void testStressVariableResolver()
+ {
+ final int numTimes = 100000;
+
+ final AbstractDTVariableResolver variableRes =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getVariableResolver();
+ final DTFacesContext facesContext =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getFacesContext(_testJSP);
+ final PerfTracker perfTracker = new PerfTracker("Stress Variable Resolver", numTimes);
+
+ // resolve the same variable 100K times
+ for (int x = 0; x < numTimes; x++)
+ {
+ final long startTime = System.nanoTime();
+
+ ISymbol var = variableRes.resolveVariable(facesContext, "myBean", _testJSP);
+
+ perfTracker.recordTime(System.nanoTime() - startTime);
+
+ assertNotNull(var);
+ assertEquals("myBean",var.getName());
+ }
+
+ perfTracker.printReport(System.out);
+ }
+
+ public void testStressPropertyResolver()
+ {
+ final int numTimes = 1000;
+
+ final AbstractDTVariableResolver variableRes =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getVariableResolver();
+ final DTFacesContext facesContext =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getFacesContext(_testJSP);
+ final ISymbol var = variableRes.resolveVariable(facesContext, "myBean", _testJSP);
+ final AbstractDTPropertyResolver propRes =
+ DesignTimeApplicationManager.getInstance(_testEnv.getTestProject()).getPropertyResolver();
+ final PerfTracker perfTracker = new PerfTracker("Stress Property Resolver", numTimes);
+
+ // resolve the same variable 100K times
+ for (int x = 0; x < numTimes; x++)
+ {
+ final long startTime = System.nanoTime();
+
+ final ISymbol property = propRes.getProperty(var, "stringProperty");
+
+ perfTracker.recordTime(System.nanoTime() - startTime);
+
+ assertNotNull(property);
+ assertEquals("stringProperty",property.getName());
+ }
+
+ perfTracker.printReport(System.out);
+ }
+
+ public void testStressSimpleValueBindingValidation()
+ {
+ final int numTimes = 1000;
+ final int elOffset = 819;
+ assertEquals("myBean.stringProperty", getELText(_structuredDocument,elOffset));
+
+ final PerfTracker perfTracker = new PerfTracker("Stress Simple Bean Property Validation", numTimes);
+
+ // resolve the same variable 100K times
+ for (int x = 0; x < numTimes; x++)
+ {
+ final ELExpressionValidator validator =
+ createELValidator(_structuredDocument, elOffset, _testJSP);
+
+ final long startTime = System.nanoTime();
+
+ validator.validateXMLNode();
+
+ perfTracker.recordTime(System.nanoTime() - startTime);
+ }
+
+ perfTracker.printReport(System.out);
+ }
+
+ // TODO: factor off these validation tests
+ @Override
+ public void testErrorExprs() {
+ // none.
+ }
+
+ @Override
+ public void testNoErrorExprs() {
+ // none.
+
+ }
+
+ @Override
+ public void testWarningExprs() {
+ // none
+
+ }
+
+ private static class PerfTracker
+ {
+ private long _max = Long.MIN_VALUE; // ensure any value compared to to this will be bigger
+ private long _maxIdx = 0;
+ private long _min = Long.MAX_VALUE; // ensure any value compared to this will be smaller
+ private long _minIdx = 0;
+ private long _runningTotal = 0;
+ private final long[] _times;
+ private int _numTimesRecorded = 0;
+
+ private final String _name;
+
+ public PerfTracker(final String name, final int numOfRuns)
+ {
+ _times = new long[numOfRuns];
+ _name = name;
+ }
+
+ public void recordTime(long time)
+ {
+ _max = Math.max(_max, time);
+ _maxIdx = _max == time ? _numTimesRecorded : _maxIdx;
+
+ _min = Math.min(_min, time);
+ _minIdx = _min == time ? _numTimesRecorded : _minIdx;
+
+ _runningTotal += time;
+
+ _times[_numTimesRecorded] = time;
+ _numTimesRecorded++;
+ }
+ public void printReport(PrintStream outStream)
+ {
+ outStream.println("===================================================");
+ outStream.println("Report for performance test: "+_name);
+ outStream.println("Number of iterations: "+_numTimesRecorded);
+ outStream.println("===================================================");
+ outStream.println(MessageFormat.format("Max: {0}, Max Index: {1}", new Object[] {_max, _maxIdx}));
+ outStream.println(MessageFormat.format("Min: {0}, Min Index: {1}", new Object[] {_min, _minIdx}));
+ outStream.println(MessageFormat.format("Avg: {0}, StdDev: {1}, StdDev Ignore Max/Min: {2}", new Object[]{average(), calculateStdDev(false), calculateStdDev(true)}));
+ outStream.println("===================================================");
+ outStream.println("");
+ }
+
+ private double average()
+ {
+ return _runningTotal/_numTimesRecorded;
+ }
+
+ private double calculateStdDev(boolean ignoreMaxMin)
+ {
+ double total = 0;
+ final double avg = average();
+ for (int i = 0; i < _numTimesRecorded; i++)
+ {
+ if (!ignoreMaxMin
+ || ((i != _maxIdx) && (i != _minIdx)))
+ {
+ total += Math.pow((_times[i] - avg), 2) / _numTimesRecorded;
+ }
+ }
+ return Math.sqrt(total);
+ }
+ }
+}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java
index cc50c7d..2a2ab5d 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/src/org/eclipse/jst/jsf/validation/el/tests/util/CreateTestCaseForJSP.java
@@ -24,7 +24,7 @@
*/
public class CreateTestCaseForJSP extends TestCase
{
- private final static String jspFile = "resourceBundleResolution";
+ private final static String jspFile = "greaterThanEq";
private static IFile file;
private static IStructuredModel model;
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data
index 6cfd48a..8a03b49 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBean.java.data
@@ -131,4 +131,24 @@
return "foo";
}
}
+
+ public MyEnum1 getCoins() {
+ return MyEnum1.dime;
+ }
+
+ public MyEnum2 getColors() {
+ return MyEnum2.red;
+ }
+
+ public java.lang.Enum getRawEnum()
+ {
+ // doesn't matter what we return as long as is an enum
+ return MyEnum2.red;
+ }
+
+ public java.lang.Enum<MyEnum1> getCoinEnum()
+ {
+ // doesn't matter what we return as long as is an enum of type MyEnum1
+ return MyEnum1.dime;
+ }
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data
index 7edb245..8931f2c 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyBeanSettable.java.data
@@ -93,7 +93,7 @@
return Collections.EMPTY_LIST;
}
- public void setComparablePropety(Comparable comp)
+ public void setComparableProperty(Comparable comp)
{
}
@@ -168,4 +168,21 @@
{
}
+
+ public MyEnum1 getCoins() {
+ return this.coins;
+ }
+
+ public void setCoins(MyEnum1 coins) {
+ this.coins = coins;
+ }
+
+ public MyEnum2 getColors() {
+ return colors;
+ }
+
+ public void setColors(MyEnum2 colors) {
+ this.colors = colors;
+ }
+
}
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum1.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum1.java.data
new file mode 100644
index 0000000..3e82341
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum1.java.data
@@ -0,0 +1,7 @@
+package beans;
+
+public enum MyEnum1
+{
+ penny, nickel, dime, quarter;
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum2.java.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum2.java.data
new file mode 100644
index 0000000..d6fb950
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/classes/MyEnum2.java.data
@@ -0,0 +1,7 @@
+package beans;
+
+public enum MyEnum2
+{
+ red, green, blue, tRuE;
+}
+
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data
index ad9e557..cdde6c0 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/beanPropertyResolution.jsp.data
@@ -29,8 +29,10 @@
<h:outputText value="#{myBean.bigDoubleProperty}"/>
<h:outputText value="#{myBean.writableStringProperty}"/>
<h:outputText value="#{myBean.isStyleBooleanProperty}"/>
-
- <!-- sub-class resolution -->
+ <h:outputText value="#{myBean.colors}"/>
+ <h:outputText value="#{myBean.coins}"/>
+
+ <!-- sub-class resolution -->
<h:outputText value="#{myBeanSubClass.stringProperty}"/>
<h:outputText value="#{myBeanSubClass.integerProperty}"/>
<h:outputText value="#{myBeanSubClass.booleanProperty}"/>
@@ -45,9 +47,11 @@
<h:outputText value="#{myBeanSubClass.writableStringProperty}"/>
<h:outputText value="#{myBeanSubClass.isStyleBooleanProperty}"/>
<h:outputText value="#{myBeanSubClass.subClassStringProperty}"/>
+ <h:outputText value="#{myBeanSubClass.colors}"/>
+ <h:outputText value="#{myBeanSubClass.coins}"/>
- <!-- settable properties -->
- <h:outputText value="#{myBeanSubClass.stringProperty}"/>
+ <!-- settable properties -->
+ <h:outputText value="#{myBeanSubClass.stringProperty}"/>
<h:outputText value="#{myBeanSettable.integerProperty}"/>
<h:outputText value="#{myBeanSettable.booleanProperty}"/>
<h:outputText value="#{myBeanSettable.doubleProperty}"/>
@@ -60,6 +64,8 @@
<h:outputText value="#{myBeanSettable.bigDoubleProperty}"/>
<h:outputText value="#{myBeanSettable.writableStringProperty}"/>
<h:outputText value="#{myBeanSettable.isStyleBooleanProperty}"/>
+ <h:outputText value="#{myBeanSettable.colors}"/>
+ <h:outputText value="#{myBeanSettable.coins}"/>
<!-- warnings -->
<h:outputText value="#{myBean.subClassStringProperty}"/>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data
index 05ff5c4..e6eaa3d 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThan.jsp.data
@@ -34,6 +34,12 @@
<h:outputText value="#{myBean.doubleProperty > 5}"/>
<h:outputText value="#{5 gt myBean.bigIntegerProperty}"/>
<h:outputText value="#{myBean.bigDoubleProperty > myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins > 'quarter'}"/>
+ <h:outputText value="#{myBean.coins gt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum > 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum gt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum > myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum > myBean.colors}"/>
<!-- warnings -->
<h:outputText value="#{5 > 3}"/>
@@ -64,6 +70,9 @@
<h:outputText value="#{myBean.booleanProperty gt true}"/>
<h:outputText value="#{true > false}"/>
<h:outputText value="#{true gt false}"/>
+ <h:outputText value="#{true > false}"/>
+ <h:outputText value="#{myBean.coins > myBean.colors}"/>
+ <h:outputText value="#{myBean.coins gt myBean.colors}"/>
</f:view>
</body>
</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data
index ee71add..dbbc2c7 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/greaterThanEq.jsp.data
@@ -31,9 +31,15 @@
<h:outputText value="#{myBean.comparableProperty >= myBean.collectionProperty}"/>
<h:outputText value="#{myBean.comparableProperty ge myBean.collectionProperty}"/>
<h:outputText value="#{myBean.integerProperty >= -3}"/>
- <h:outputText value="#{myBean.doubleProperty > 5}"/>
- <h:outputText value="#{5 gt myBean.bigIntegerProperty}"/>
- <h:outputText value="#{myBean.bigDoubleProperty > myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.doubleProperty >= 5}"/>
+ <h:outputText value="#{5 ge myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.bigDoubleProperty >= myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins >= 'quarter'}"/>
+ <h:outputText value="#{myBean.coins ge 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum >= 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum ge 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum >= myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum >= myBean.colors}"/>
<!-- warnings -->
<h:outputText value="#{5 >= 3}"/>
@@ -48,8 +54,8 @@
<h:outputText value="#{2 ge -5}"/>
<h:outputText value="#{-5 >= -5}"/>
<h:outputText value="#{-5 ge -5}"/>
- <h:outputText value="#{myBean.integerProperty > null}"/>
- <h:outputText value="#{null gt myBean.integerProperty}"/>
+ <h:outputText value="#{myBean.integerProperty >= null}"/>
+ <h:outputText value="#{null ge myBean.integerProperty}"/>
<!-- errors -->
<h:outputText value="#{5 >= true}"/>
@@ -64,6 +70,8 @@
<h:outputText value="#{myBean.booleanProperty ge true}"/>
<h:outputText value="#{true >= false}"/>
<h:outputText value="#{true ge false}"/>
+ <h:outputText value="#{myBean.coins >= myBean.colors}"/>
+ <h:outputText value="#{myBean.coins ge myBean.colors}"/>
</f:view>
</body>
</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data
index c8f4de1..5049370 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThan.jsp.data
@@ -34,6 +34,12 @@
<h:outputText value="#{myBean.doubleProperty < 5}"/>
<h:outputText value="#{5 lt myBean.bigIntegerProperty}"/>
<h:outputText value="#{myBean.bigDoubleProperty < myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins < 'quarter'}"/>
+ <h:outputText value="#{myBean.coins lt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum < 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum lt 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum < myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum < myBean.colors}"/>
<!-- warnings -->
<h:outputText value="#{5 < 3}"/>
@@ -64,6 +70,9 @@
<h:outputText value="#{myBean.booleanProperty lt true}"/>
<h:outputText value="#{true < false}"/>
<h:outputText value="#{true lt false}"/>
+ <h:outputText value="#{true < false}"/>
+ <h:outputText value="#{myBean.coins < myBean.colors}"/>
+ <h:outputText value="#{myBean.coins lt myBean.colors}"/>
</f:view>
</body>
</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data
index cff2356..b866bc1 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/lessThanEq.jsp.data
@@ -1,4 +1,4 @@
-<%@page contentType="text/html"%>
+%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
@@ -34,6 +34,12 @@
<h:outputText value="#{myBean.doubleProperty <= 5}"/>
<h:outputText value="#{5 le myBean.bigIntegerProperty}"/>
<h:outputText value="#{myBean.bigDoubleProperty <= myBean.bigIntegerProperty}"/>
+ <h:outputText value="#{myBean.coins <= 'quarter'}"/>
+ <h:outputText value="#{myBean.coins le 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum <= 'quarter'}"/>
+ <h:outputText value="#{myBean.coinEnum le 'quarter'}"/>
+ <h:outputText value="#{myBean.rawEnum <= myBean.coins}"/>
+ <h:outputText value="#{myBean.coinEnum <= myBean.colors}"/>
<!-- warnings -->
<h:outputText value="#{5 <= 3}"/>
@@ -64,6 +70,8 @@
<h:outputText value="#{myBean.booleanProperty le true}"/>
<h:outputText value="#{true <= false}"/>
<h:outputText value="#{true le false}"/>
+ <h:outputText value="#{myBean.coins <= myBean.colors}"/>
+ <h:outputText value="#{myBean.coins le myBean.colors}"/>
</f:view>
</body>
</html>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data
index a354d22..d44e924 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalEquals.jsp.data
@@ -35,6 +35,14 @@
<h:outputText value="#{myBean.bigIntegerProperty == 500}"/>
<h:outputText value="#{myBean.stringArrayProperty == '3'}"/>
<h:outputText value="#{myBean.stringArrayProperty eq myBean.listProperty}"/>
+ <h:outputText value="#{myBean.coins == 'dime'}" />
+ <h:outputText value="#{myBean.coins eq 'dime'}" />
+ <h:outputText value="#{myBean.colors == 'red'}"/>
+ <h:outputText value="#{myBean.colors eq 'red'}"/>
+ <h:outputText value="#{myBean.coins == myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.coins eq myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.rawEnum == 'red'}"/>
+ <h:outputText value="#{myBean.coinEnum == myBean.coins}"/>
<!-- warnings -->
<h:outputText value="#{5 == 3}"/>
@@ -49,6 +57,11 @@
<h:outputText value="#{null eq myBean.integerProperty}"/>
<h:outputText value="#{5.4 == 4.3}"/>
<h:outputText value="#{true == true}"/>
+ <h:outputText value="#{myBean.coins == 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins eq 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins == 'notAValue' && myBean.coins == 'dime'}"/>
+ <h:outputText value="#{myBean.coins eq 'notAValue' && myBean.coins eq 'dime'}"/>
+ <h:outputText value="#{myBean.coins == myBean.colors}"/>
<!-- errors -->
<h:outputText value="#{5 == true}"/>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data
index a054c75..01e75d0 100644
--- a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/logicalNotEquals.jsp.data
@@ -35,6 +35,14 @@
<h:outputText value="#{myBean.bigIntegerProperty != 500}"/>
<h:outputText value="#{myBean.stringArrayProperty != '3'}"/>
<h:outputText value="#{myBean.stringArrayProperty ne myBean.listProperty}"/>
+ <h:outputText value="#{myBean.coins != 'dime'}" />
+ <h:outputText value="#{myBean.coins ne 'dime'}" />
+ <h:outputText value="#{myBean.colors != 'red'}"/>
+ <h:outputText value="#{myBean.colors ne 'red'}"/>
+ <h:outputText value="#{myBean.coins != myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.coins ne myBean.stringProperty}"/>
+ <h:outputText value="#{myBean.rawEnum != 'red'}"/>
+ <h:outputText value="#{myBean.coinEnum ne myBean.coins}"/>
<!-- warnings -->
<h:outputText value="#{5 != 3}"/>
@@ -49,6 +57,11 @@
<h:outputText value="#{null ne myBean.integerProperty}"/>
<h:outputText value="#{5.4 != 4.3}"/>
<h:outputText value="#{true != true}"/>
+ <h:outputText value="#{myBean.coins != 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins ne 'notAValue'}"/>
+ <h:outputText value="#{myBean.coins != 'notAValue' || myBean.coins != 'dime'}"/>
+ <h:outputText value="#{myBean.coins ne 'notAValue' || myBean.coins ne 'dime'}"/>
+ <h:outputText value="#{myBean.coins != myBean.colors}"/>
<!-- errors -->
<h:outputText value="#{5 != true}"/>
diff --git a/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/perfTest1.jsp.data b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/perfTest1.jsp.data
new file mode 100644
index 0000000..069db0f
--- /dev/null
+++ b/jsf/tests/org.eclipse.jst.jsf.validation.el.tests/testdata/jsps/perfTest1.jsp.data
@@ -0,0 +1,30 @@
+<%@page contentType="text/html"%>
+<%@page pageEncoding="UTF-8"%>
+<%--
+The taglib directive below imports the JSTL library. If you uncomment it,
+you must also add the JSTL library to the project. The Add Library... action
+on Libraries node in Projects view can be used to add the JSTL 1.1 library.
+--%>
+
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>JSP Page</title>
+ </head>
+ <body>
+ <f:view>
+ <h1>JSP Page</h1>
+ <h:outputText value="#{myBean.stringProperty}"/>
+
+ </f:view>
+ </body>
+</html>
+