|
From: <jbo...@li...> - 2006-06-03 03:08:59
|
Author: mic...@jb...
Date: 2006-06-02 23:08:51 -0400 (Fri, 02 Jun 2006)
New Revision: 4586
Added:
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/or_nesting.drl
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
Log:
more test coverage for nesting of OR CEs
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java 2006-06-02 22:23:50 UTC (rev 4585)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java 2006-06-03 03:08:51 UTC (rev 4586)
@@ -1056,8 +1056,8 @@
assertFalse( parser.hasErrors() );
}
- public void FIXME_testOrNesting() throws Exception {
- final RuleParser parser = parseResource( "and_or_rule.drl" );
+ public void testOrNesting() throws Exception {
+ final RuleParser parser = parseResource( "or_nesting.drl" );
parser.compilation_unit();
final PackageDescr pack = parser.getPackageDescr();
@@ -1082,7 +1082,7 @@
ColumnDescr left = (ColumnDescr) and.getDescrs().get( 0 );
assertEquals("Person", left.getObjectType());
- ColumnDescr right = (ColumnDescr) and.getDescrs().get( 0 );
+ ColumnDescr right = (ColumnDescr) and.getDescrs().get( 1 );
assertEquals("Cheese", right.getObjectType());
}
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/or_nesting.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/or_nesting.drl 2006-06-02 22:23:50 UTC (rev 4585)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/or_nesting.drl 2006-06-03 03:08:51 UTC (rev 4586)
@@ -0,0 +1,10 @@
+
+import org.drools.Person
+
+rule simple_rule
+ when
+ Person(name == "mark") or
+ ( Person(type == "fan") and Cheese(type == "green") )
+ then
+ System.out.println( "Mark and Michael" + bar );
+end
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/or_nesting.drl
___________________________________________________________________
Name: svn:eol-style
+ native
|