Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Util.java
Show All 31 Lines | public class NativeSecp256k1Util{ | ||||
public static void assertEquals( String val, String val2, String message ) throws AssertFailException{ | public static void assertEquals( String val, String val2, String message ) throws AssertFailException{ | ||||
if( !val.equals(val2) ) | if( !val.equals(val2) ) | ||||
throw new AssertFailException("FAIL: " + message); | throw new AssertFailException("FAIL: " + message); | ||||
else | else | ||||
System.out.println("PASS: " + message); | System.out.println("PASS: " + message); | ||||
} | } | ||||
public static void checkArgument(boolean expression) { | |||||
if (!expression) { | |||||
throw new IllegalArgumentException(); | |||||
} | |||||
} | |||||
public static class AssertFailException extends Exception { | public static class AssertFailException extends Exception { | ||||
public AssertFailException(String message) { | public AssertFailException(String message) { | ||||
super( message ); | super( message ); | ||||
} | } | ||||
} | } | ||||
} | } |