commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [01/50] commons-crypto git commit: Show version if available; warn if JNI/JNA could not be init
Date Fri, 22 Jul 2016 07:00:29 GMT
Repository: commons-crypto
Updated Branches:
  refs/heads/CRYPTO-1.0.0 1335e165e -> ed1b6097c


Show version if available; warn if JNI/JNA could not be init

Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/c4462318
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/c4462318
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/c4462318

Branch: refs/heads/CRYPTO-1.0.0
Commit: c4462318fb061ec454849f1a3beb58c4138a22c0
Parents: d3e86ff
Author: Sebb <sebb@apache.org>
Authored: Thu Jul 7 17:56:36 2016 +0100
Committer: Sebb <sebb@apache.org>
Committed: Thu Jul 7 17:56:36 2016 +0100

----------------------------------------------------------------------
 .../org/apache/commons/crypto/NativeCodeLoaderTest.java | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/c4462318/src/test/java/org/apache/commons/crypto/NativeCodeLoaderTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/crypto/NativeCodeLoaderTest.java b/src/test/java/org/apache/commons/crypto/NativeCodeLoaderTest.java
index f4fa6e3..ff871de 100644
--- a/src/test/java/org/apache/commons/crypto/NativeCodeLoaderTest.java
+++ b/src/test/java/org/apache/commons/crypto/NativeCodeLoaderTest.java
@@ -31,6 +31,18 @@ import org.junit.Test;
 public class NativeCodeLoaderTest {
 
     @Test
+    public void test() {
+        if (NativeCodeLoader.isNativeCodeLoaded()) {
+            // TODO display versions once available
+            System.out.println("** INFO: Native (JNI) code loaded successfully");
+        } else {
+            System.out.println("** WARN: Native (JNI) code was not loaded: " 
+                + NativeCodeLoader.getLoadingError());
+        }
+        assertNotNull(NativeCodeLoader.getVersion());
+    }
+
+    @Test
     public void testGetVersion() {
         assertNotNull(NativeCodeLoader.getVersion());
     }


Mime
View raw message