org.bouncycastle.PrintTestResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-debug-jdk15to18 Show documentation
Show all versions of bcprov-debug-jdk15to18 Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8.
package org.bouncycastle;
import java.util.Enumeration;
import junit.framework.TestFailure;
import junit.framework.TestResult;
public class PrintTestResult
{
public static void printResult(TestResult result)
{
Enumeration e = result.failures();
if (e != null)
{
while (e.hasMoreElements())
{
System.out.println(e.nextElement());
}
}
e = result.errors();
if (e != null)
{
while (e.hasMoreElements())
{
System.out.println(e.nextElement());
}
}
if (!result.wasSuccessful())
{
System.exit(1);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy