JaredDavis22 commented on code in PR #5837:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5837#discussion_r1560901979


##########
drools-model/drools-canonical-model/src/test/java/org/drools/model/operators/MatchesOperatorTest.java:
##########
@@ -0,0 +1,23 @@
+package org.drools.model.operators;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+
+public class MatchesOperatorTest {
+    @Test
+    public void testMatchesOperator() {
+        MatchesOperator instance = MatchesOperator.INSTANCE;
+        // Regular expression is second parameter
+        assertThat(instance.eval("a","a")).isTrue();
+        assertThat(instance.eval("a","b")).isFalse();
+        assertThat(instance.eval("a","a")).isTrue();

Review Comment:
   This goes back to my bad test case. I do not know how to create a test case 
that would run for both cases where the system property 
"drools.matches.compiled.cache.count" is 0 and is a positive number > 0 with 
the one INSTANCE.  I see you did it with the benchmark, but that uses jmh. I 
manually ran the test case with the system property set to 100. When the cache 
is used row 15 tests the previously stored Pattern.



-- 
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