|
From: <jbo...@li...> - 2006-06-06 01:50:15
|
Author: mar...@jb...
Date: 2006-06-04 23:33:48 -0400 (Sun, 04 Jun 2006)
New Revision: 4604
Added:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test _FieldBindingsAndEvalSharing.drl
Removed:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/field_bindings.drl
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
Log:
JBRULES-281 node sharing for eval, predicate etc incorrectly sharing
-Made eval, predicate and returnvalue equals check compare column and
extractor for declaration.
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-05 03:33:42 UTC (rev 4603)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-05 03:33:48 UTC (rev 4604)
@@ -97,9 +97,10 @@
list.get( 0 ) );
}
- public void FIXME_testFieldBiningsAndEvalSharing() throws Exception {
+
+ public void testFieldBiningsAndEvalSharing() throws Exception {
- String drl = "field_bindings.drl";
+ String drl = "test _FieldBindingsAndEvalSharing.drl";
final PackageBuilder builder = new PackageBuilder();
builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( drl ) ) );
final Package pkg = builder.getPackage();
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/field_bindings.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/field_bindings.drl 2006-06-05 03:33:42 UTC (rev 4603)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/field_bindings.drl 2006-06-05 03:33:48 UTC (rev 4604)
@@ -1,21 +0,0 @@
-package org.drools;
-
-global java.util.List list;
-
-#this is to test eval condition node sharing working properly
-rule rule1
- when
- TestParam(val: value1)
- eval(val == null)
- then
- list.add("rule1 fired");
-end
-
-
-rule rule2
- when
- TestParam(val: value2)
- eval(val == null) #note its the same guts, but different binding
- then
- list.add("rule2 fired");
-end
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test _FieldBindingsAndEvalSharing.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test _FieldBindingsAndEvalSharing.drl 2006-06-05 03:33:42 UTC (rev 4603)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test _FieldBindingsAndEvalSharing.drl 2006-06-05 03:33:48 UTC (rev 4604)
@@ -0,0 +1,21 @@
+package org.drools;
+
+global java.util.List list;
+
+#this is to test eval condition node sharing working properly
+rule rule1
+ when
+ TestParam(val: value1)
+ eval(val == null)
+ then
+ list.add("rule1 fired");
+end
+
+
+rule rule2
+ when
+ TestParam(val: value2)
+ eval(val == null) #note its the same guts, but different binding
+ then
+ list.add("rule2 fired");
+end
\ No newline at end of file
|