Here you can find the source of equalOrDie(String testName, Object[] a, Object[] b)
private static void equalOrDie(String testName, Object[] a, Object[] b) throws Exception
//package com.java2s; /*/*from w ww. j a va 2 s.c o m*/ * Copyright (C) 2005 Stephen Ostermiller * http://ostermiller.org/contact.pl?regarding=Java+Utilities * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * See COPYING.TXT for details. */ import java.util.*; public class Main { private static void equalOrDie(String testName, Object[] a, Object[] b) throws Exception { if (!Arrays.equals(a, b)) { throw new Exception(testName + " failed, arrays are not equal"); } } private static void equalOrDie(String testName, String a, String b) throws Exception { if (!a.equals(b)) { throw new Exception(testName + " failed, arrays are not equal"); } } }