Skip to content

Commit

Permalink
[DROOLS-7298] Implement memberOf (apache#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkobayas committed Jun 11, 2024
1 parent 45f12e3 commit 8eae710
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ DRL_NOT : 'not';
DRL_IN : 'in';
DRL_FROM : 'from';
DRL_MATCHES : 'matches';
DRL_MEMBEROF : 'memberOf';
DRL_ACCUMULATE : 'accumulate' | 'acc';
DRL_INIT : 'init';
DRL_ACTION : 'action';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ drlKeywords
| DRL_IN
| DRL_FROM
| DRL_MATCHES
| DRL_MEMBEROF
| DRL_ACCUMULATE
| DRL_INIT
| DRL_ACTION
Expand Down Expand Up @@ -205,6 +206,7 @@ drlExpression
| drlExpression bop=(LE | GE | GT | LT) drlExpression
| drlExpression bop=INSTANCEOF (typeType | pattern)
| drlExpression bop=DRL_MATCHES drlExpression
| drlExpression DRL_NOT? DRL_MEMBEROF drlExpression
| drlExpression bop=(EQUAL | NOTEQUAL) drlExpression
| drlExpression bop=BITAND drlExpression
| drlExpression bop=CARET drlExpression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2168,7 +2168,6 @@ public void parse_ForallWithFrom() throws Exception {
assertThat(((FromDescr) cheese.getSource()).getDataSource().toString()).isEqualTo("$cheesery");
}

@Disabled("Priority : High | Implement memberOf")
@Test
public void parse_Memberof() throws Exception {
final String text = "rule X when Country( $cities : city )\nPerson( city memberOf $cities )\n then end";
Expand All @@ -2182,7 +2181,6 @@ public void parse_Memberof() throws Exception {
assertThat(fieldConstr.getExpression()).isEqualTo("city memberOf $cities");
}

@Disabled("Priority : High | Implement not memberOf")
@Test
public void parse_NotMemberof() throws Exception {
final String text = "rule X when Country( $cities : city )\nPerson( city not memberOf $cities ) then end\n";
Expand Down

0 comments on commit 8eae710

Please sign in to comment.