This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 1e77d5c0df Expand unit tests ready for BZ 69338 fix
1e77d5c0df is described below

commit 1e77d5c0df5ef91d966a1829c7a57f1ea639da8b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Sep 25 19:23:21 2024 +0100

    Expand unit tests ready for BZ 69338 fix
---
 test/org/apache/el/parser/TestAstAnd.java | 43 +++++++++++++++++++++++++++++++
 test/org/apache/el/parser/TestAstOr.java  | 42 ++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+)

diff --git a/test/org/apache/el/parser/TestAstAnd.java 
b/test/org/apache/el/parser/TestAstAnd.java
index 8303eaf92e..54078cc89d 100644
--- a/test/org/apache/el/parser/TestAstAnd.java
+++ b/test/org/apache/el/parser/TestAstAnd.java
@@ -50,4 +50,47 @@ public class TestAstAnd {
         Boolean result = processor.eval("null && null");
         Assert.assertEquals(Boolean.FALSE, result);
     }
+
+    @Test
+    public void test05() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("true && true && true && true && 
true");
+        Assert.assertEquals(Boolean.TRUE, result);
+    }
+
+    @Test
+    public void test06() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("true && true && true && true && 
false");
+        Assert.assertEquals(Boolean.FALSE, result);
+    }
+
+    @Test
+    public void test07() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("false && true && true && true && 
true");
+        Assert.assertEquals(Boolean.FALSE, result);
+    }
+
+    @Test
+    public void test08() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("true && false && true && true && 
true");
+        Assert.assertEquals(Boolean.FALSE, result);
+    }
+
+    @Test
+    public void test09() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("true && true && false && true && 
true");
+        Assert.assertEquals(Boolean.FALSE, result);
+    }
+
+    @Test
+    public void test10() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("true && true && true && false &&  
true");
+        Assert.assertEquals(Boolean.FALSE, result);
+    }
+
 }
diff --git a/test/org/apache/el/parser/TestAstOr.java 
b/test/org/apache/el/parser/TestAstOr.java
index bb7a2bdd9a..d6f63d8779 100644
--- a/test/org/apache/el/parser/TestAstOr.java
+++ b/test/org/apache/el/parser/TestAstOr.java
@@ -50,4 +50,46 @@ public class TestAstOr {
         Boolean result = processor.eval("null || null");
         Assert.assertEquals(Boolean.FALSE, result);
     }
+
+    @Test
+    public void test05() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("false || false || false || false || 
false");
+        Assert.assertEquals(Boolean.FALSE, result);
+    }
+
+    @Test
+    public void test06() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("false || false || false || false || 
true");
+        Assert.assertEquals(Boolean.TRUE, result);
+    }
+
+    @Test
+    public void test07() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("true || false || false || false || 
false");
+        Assert.assertEquals(Boolean.TRUE, result);
+    }
+
+    @Test
+    public void test08() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("false || true || false || false || 
false");
+        Assert.assertEquals(Boolean.TRUE, result);
+    }
+
+    @Test
+    public void test09() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("false || false || true || false || 
false");
+        Assert.assertEquals(Boolean.TRUE, result);
+    }
+
+    @Test
+    public void test10() {
+        ELProcessor processor = new ELProcessor();
+        Boolean result = processor.eval("false || false || false || true ||  
false");
+        Assert.assertEquals(Boolean.TRUE, result);
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to