2 * Copyright 2014-2016 the libsecp256k1 contributors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 public class NativeSecp256k1Util{
21 public static void assertEquals( int val, int val2, String message ) throws AssertFailException{
23 throw new AssertFailException("FAIL: " + message);
26 public static void assertEquals( boolean val, boolean val2, String message ) throws AssertFailException{
28 throw new AssertFailException("FAIL: " + message);
30 System.out.println("PASS: " + message);
33 public static void assertEquals( String val, String val2, String message ) throws AssertFailException{
34 if( !val.equals(val2) )
35 throw new AssertFailException("FAIL: " + message);
37 System.out.println("PASS: " + message);
40 public static class AssertFailException extends Exception {
41 public AssertFailException(String message) {