You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/11/17 12:57:11 UTC

[commons-bcel] branch master updated (eecfa5c8 -> c5a5ab58)

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

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git


    from eecfa5c8 Clear ConstantUtf8 cache after each test
     new a70d4313 Add logging
     new c5a5ab58 Add disabled test

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...aBcel291TestCase.java => JavaMathTestCase.java} | 17 ++++++++---
 .../bcel/verifier/VerifyJavaHomesTestCase.java     | 35 ++++++++++------------
 2 files changed, 28 insertions(+), 24 deletions(-)
 copy src/test/java/org/apache/bcel/verifier/{JiraBcel291TestCase.java => JavaMathTestCase.java} (68%)


[commons-bcel] 02/02: Add disabled test

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git

commit c5a5ab58d155fda34d5dcaea0af99259f572bbda
Author: Gary David Gregory (Code signing key) <gg...@apache.org>
AuthorDate: Thu Nov 17 07:57:05 2022 -0500

    Add disabled test
---
 .../org/apache/bcel/verifier/JavaMathTestCase.java | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/src/test/java/org/apache/bcel/verifier/JavaMathTestCase.java b/src/test/java/org/apache/bcel/verifier/JavaMathTestCase.java
new file mode 100644
index 00000000..9a10db4e
--- /dev/null
+++ b/src/test/java/org/apache/bcel/verifier/JavaMathTestCase.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.bcel.verifier;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+public class JavaMathTestCase extends AbstractVerifierTestCase {
+
+    @Test
+    @Disabled
+    public void testBigDecimal() throws ClassNotFoundException {
+        assertTrue(doAllPasses("java.math.BigDecimal"));
+    }
+    
+    @Test
+    @Disabled
+    public void testBigInteger() throws ClassNotFoundException {
+        assertTrue(doAllPasses("java.math.BigInteger"));
+    }
+    
+}


[commons-bcel] 01/02: Add logging

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git

commit a70d431319b207cdd55823843dcef0efc84c85e9
Author: Gary David Gregory (Code signing key) <gg...@apache.org>
AuthorDate: Thu Nov 17 07:56:51 2022 -0500

    Add logging
---
 .../bcel/verifier/VerifyJavaHomesTestCase.java     | 35 ++++++++++------------
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/src/test/java/org/apache/bcel/verifier/VerifyJavaHomesTestCase.java b/src/test/java/org/apache/bcel/verifier/VerifyJavaHomesTestCase.java
index 5b8e3cdb..f08ed4d5 100644
--- a/src/test/java/org/apache/bcel/verifier/VerifyJavaHomesTestCase.java
+++ b/src/test/java/org/apache/bcel/verifier/VerifyJavaHomesTestCase.java
@@ -17,6 +17,8 @@
 
 package org.apache.bcel.verifier;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.MethodSource;
@@ -25,22 +27,11 @@ public class VerifyJavaHomesTestCase extends AbstractVerifierTestCase {
 
     static int count;
 
+    boolean logStep = Boolean.getBoolean("BCEL.logStep");
+
     /**
      * Eventually runs out of memory? Super now calls VerifierFactory.clear();
      * 
-     * <pre>
-      164800................................................................................
-      165600...........Exception in thread "fork-1-event-thread" .java.lang.OutOfMemoryError: Java heap space
-        Exception in thread "fork-1-event-thread" java.lang.OutOfMemoryError: Java heap space
-        at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:68)
-        at java.lang.StringBuilder.<init>(StringBuilder.java:106)
-        at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.toString(AbstractStreamDecoder.java:364)
-        at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.readString(AbstractStreamDecoder.java:336)
-        at org.apache.maven.surefire.api.stream.AbstractStreamDecoder.readString(AbstractStreamDecoder.java:196)
-        at org.apache.maven.surefire.stream.EventDecoder.decode(EventDecoder.java:176)
-        at org.apache.maven.plugin.surefire.extensions.EventConsumerThread.run(EventConsumerThread.java:73)
-     * </pre>
-     * 
      * @param name
      * @throws ClassNotFoundException
      */
@@ -52,15 +43,19 @@ public class VerifyJavaHomesTestCase extends AbstractVerifierTestCase {
         // System.out.println(jarEntry.getName());
         // Skip $ classes for now
         count++;
-        if (count % 10 == 0) {
-            System.out.print('.');
-        }
-        if (count % 800 == 0) {
-            System.out.println();
-            System.out.print(count);
+        if (logStep) {
+            System.out.printf("%,d %s%n", count, name);
+        } else {
+            if (count % 10 == 0) {
+                System.out.print('.');
+            }
+            if (count % 800 == 0) {
+                System.out.println();
+                System.out.print(count);
+            }
         }
         if (!name.contains("$")) {
-            doAllPasses(name);
+            assertTrue(doAllPasses(name));
         }
     }