|
From: <jbo...@li...> - 2006-06-06 02:20:18
|
Author: mic...@jb...
Date: 2006-06-05 00:52:52 -0400 (Mon, 05 Jun 2006)
New Revision: 4605
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_FieldBindingsAndPredicateSharing.drl
Removed:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test _FieldBindingsAndEvalSharing.drl
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
Log:
JBRULES-281
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:48 UTC (rev 4604)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-05 04:52:52 UTC (rev 4605)
@@ -98,9 +98,19 @@
}
- public void testFieldBiningsAndEvalSharing() throws Exception {
-
- String drl = "test _FieldBindingsAndEvalSharing.drl";
+ public void testFieldBiningsAndEvalSharing() throws Exception {
+ String drl = "test_FieldBindingsAndEvalSharing.drl";
+ evalSharingTest( drl );
+ }
+
+ public void testFieldBiningsAndPredicateSharing() throws Exception {
+ String drl = "test_FieldBindingsAndPredicateSharing.drl";
+ evalSharingTest( drl );
+ }
+
+ private void evalSharingTest(String drl) throws DroolsParserException,
+ IOException,
+ Exception {
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/test _FieldBindingsAndEvalSharing.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test _FieldBindingsAndEvalSharing.drl 2006-06-05 03:33:48 UTC (rev 4604)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test _FieldBindingsAndEvalSharing.drl 2006-06-05 04:52:52 UTC (rev 4605)
@@ -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:48 UTC (rev 4604)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_FieldBindingsAndEvalSharing.drl 2006-06-05 04:52:52 UTC (rev 4605)
@@ -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
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_FieldBindingsAndEvalSharing.drl
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_FieldBindingsAndPredicateSharing.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_FieldBindingsAndPredicateSharing.drl 2006-06-05 03:33:48 UTC (rev 4604)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_FieldBindingsAndPredicateSharing.drl 2006-06-05 04:52:52 UTC (rev 4605)
@@ -0,0 +1,19 @@
+package org.drools;
+
+global java.util.List list;
+
+#this is to test eval condition node sharing working properly
+rule rule1
+ when
+ TestParam(val: value1 -> (val == null))
+ then
+ list.add("rule1 fired");
+end
+
+
+rule rule2
+ when
+ TestParam(val: value2 -> (val == null))
+ then
+ list.add("rule2 fired");
+end
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_FieldBindingsAndPredicateSharing.drl
___________________________________________________________________
Name: svn:eol-style
+ native
|