[jboss-svn-commits] JBL Code SVN: r14055 - labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Aug 6 18:26:36 EDT 2007
Author: pombredanne
Date: 2007-08-06 18:26:35 -0400 (Mon, 06 Aug 2007)
New Revision: 14055
Modified:
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/CompletionContextTest.java
Log:
Added variations (without trailing white space) of three failing tests, such that thoe do not fail anymore. The tests methods starting the FAILINGxxx still need review.
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/CompletionContextTest.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/CompletionContextTest.java 2007-08-06 19:52:25 UTC (rev 14054)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-test/src/test/java/org/drools/eclipse/editors/completion/CompletionContextTest.java 2007-08-06 22:26:35 UTC (rev 14055)
@@ -208,6 +208,20 @@
assertEquals("Class", location.getProperty(Location.LOCATION_PROPERTY_CLASS_NAME));
}
+
+ //pombredanne: this variation without ending space does not fail as below
+ public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START9() {
+ String input =
+ "rule MyRule \n" +
+ " when \n" +
+ " Class ( name:";
+ Location location = new CompletionContext(input).getLocation();
+ assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, location.getType());
+ assertEquals("Class", location.getProperty(Location.LOCATION_PROPERTY_CLASS_NAME));
+ }
+
+
+ //TODO: fix me
public void FAILINGtestCheckLHSLocationDetermination_INSIDE_CONDITION_START9() {
String input =
"rule MyRule \n" +
@@ -1719,17 +1733,38 @@
assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION, location.getType());
}
- //TODO: fix me
- public void FAILINGtestCheckLHSLocationDetermination_BEGIN_OF_CONDITION77() {
+// pombredanne: this variation without ending space does not fail as below
+ public void testCheckLHSLocationDetermination_BEGIN_OF_CONDITION77() {
String input =
"rule MyRule \n" +
" when \n" +
- " ArrayList(size > 50) from accumulate( Person( disabled == \"yes\", income > 100000 ) from town.getPersons() )";
+ " ArrayList(size > 50) from accumulate( Person( disabled == \"yes\", income > 100000 ) from town.getPersons() ) ";
Location location = new CompletionContext(input).getLocation();
assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION, location.getType());
}
//TODO: fix me
+ public void FAILINGtestCheckLHSLocationDetermination_BEGIN_OF_CONDITION77() {
+ String input =
+ "rule MyRule \n" +
+ " when \n" +
+ " ArrayList(size > 50) from accumulate( Person( disabled == \"yes\", income > 100000 ) from town.getPersons() )";
+ Location location = new CompletionContext(input).getLocation();
+ assertEquals(Location.LOCATION_LHS_BEGIN_OF_CONDITION, location.getType());
+ }
+
+ // pombredanne: this variation without ending space does not fail as below
+ public void testCheckLHSLocationDetermination_INSIDE_CONDITION_START45() {
+ String input =
+ "rule MyRule \n" +
+ " when \n" +
+ " Class ( name :";
+ Location location = new CompletionContext(input).getLocation();
+ assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_START, location.getType());
+ assertEquals("Class", location.getProperty(Location.LOCATION_PROPERTY_CLASS_NAME));
+ }
+
+ //TODO: fix me
public void FAILINGtestCheckLHSLocationDetermination_INSIDE_CONDITION_START45() {
String input =
"rule MyRule \n" +
More information about the jboss-svn-commits
mailing list