forked from I2P_Developers/i2p.i2p
Tests: copy the EdDSA test.data file to where the classloader can find it
This commit is contained in:
@ -128,6 +128,7 @@
|
||||
<!-- EdDSA test vectors -->
|
||||
<copy todir="./build/obj">
|
||||
<fileset dir="./test/junit/">
|
||||
<include name="net/i2p/crypto/eddsa/test.data"/>
|
||||
<include name="net/i2p/crypto/eddsa/math/baseDblPrecmp"/>
|
||||
<include name="net/i2p/crypto/eddsa/math/basePrecmp"/>
|
||||
</fileset>
|
||||
@ -154,7 +155,7 @@
|
||||
<!-- warning - The junit.test target below doesn't actually include i2ptest.jar in the classpath,
|
||||
only the build/obj directory.
|
||||
-->
|
||||
<jar destfile="./build/i2ptest.jar" basedir="./build/obj" includes="**/*.class **/baseDblPrecmp **/basePrecmp" />
|
||||
<jar destfile="./build/i2ptest.jar" basedir="./build/obj" includes="**/*.class **/test.data **/baseDblPrecmp **/basePrecmp" />
|
||||
</target>
|
||||
<!-- preparation of code coverage tool of choice -->
|
||||
<target name="prepareClover" depends="compile" if="with.clover">
|
||||
|
@ -2,6 +2,7 @@ package net.i2p.crypto.eddsa;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@ -32,8 +33,10 @@ public class Ed25519TestVectors {
|
||||
List<TestTuple> testCases = new ArrayList<TestTuple>();
|
||||
BufferedReader file = null;
|
||||
try {
|
||||
file = new BufferedReader(new InputStreamReader(
|
||||
Ed25519TestVectors.class.getResourceAsStream(fileName)));
|
||||
InputStream is = Ed25519TestVectors.class.getResourceAsStream(fileName);
|
||||
if (is == null)
|
||||
throw new IOException("Resource not found: " + fileName);
|
||||
file = new BufferedReader(new InputStreamReader(is));
|
||||
String line;
|
||||
while ((line = file.readLine()) != null) {
|
||||
testCases.add(new TestTuple(line));
|
||||
|
Reference in New Issue
Block a user