tkobayas commented on code in PR #5855:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5855#discussion_r1574246829


##########
drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrCommonPropertyTest.java:
##########
@@ -298,13 +341,20 @@ void fromDescr() {
                 "    Child() from $children\n" +
                 "  then\n" +
                 "end";;
-        final PackageDescr pkg = parser.parse(source);
+        final PackageDescr pkg = parseAndGetPackageDescr(source);
         final RuleDescr rule = pkg.getRules().get(0);
         PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(1);
         FromDescr from = (FromDescr)  pattern.getSource();
 
-        // "from" is not included in FromDescr
-        assertProperties(from, 64, 72, 4, 17, 4, 25);
+        // Backward Compatibility Notes:
+        //   The old DRL6Parser doesn't populate common properties of 
FromDescr (seem to be wrong).
+        //   Backward compatibility doesn't seem to be required in this case.

Review Comment:
   `Backward Compatibility Notes` : B) Old parser seems to be wrong
   
   Old parser doesn't populate FromDescr common properties. So all `-1`.



##########
drools-drl/drools-drl-parser-tests/src/test/java/org/drools/drl/parser/antlr4/DescrCommonPropertyTest.java:
##########
@@ -329,11 +379,19 @@ void entryPointDescr() {
                 "    StockTick() from entry-point \"stream\"\n" +
                 "  then\n" +
                 "end";
-        final PackageDescr pkg = parser.parse(source);
+        final PackageDescr pkg = parseAndGetPackageDescr(source);
         final RuleDescr rule = pkg.getRules().get(0);
         PatternDescr pattern = (PatternDescr) rule.getLhs().getDescrs().get(0);
         EntryPointDescr entryPoint = (EntryPointDescr) pattern.getSource();
-        assertProperties(entryPoint, 35, 54, 3, 21, 3, 40);
+
+        // Backward Compatibility Notes:
+        //   The old DRL6Parser doesn't populate common properties of 
EntryPointDescr (seem to be wrong).
+        //   Backward compatibility doesn't seem to be required in this case.

Review Comment:
   `Backward Compatibility Notes` : B) Old parser seems to be wrong
   
   Old parser doesn't populate EntryPointDescr common properties. So all `-1`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to