mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-06 21:21:08 +01:00
Added avatar test.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3829 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
c22f731c6d
commit
6f832ddb99
2 changed files with 101 additions and 0 deletions
|
|
@ -349,4 +349,20 @@ public abstract class SmackTestCase extends TestCase {
|
|||
return "config/" + fullClassName.substring(firstChar) + ".xml";
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares two contents of two byte arrays to make sure that they are equal
|
||||
*
|
||||
* @param message The message to show in the case of failure
|
||||
* @param byteArray1 The first byte array.
|
||||
* @param byteArray2 The second byte array.
|
||||
*/
|
||||
public static void assertEquals(String message, byte [] byteArray1, byte [] byteArray2) {
|
||||
if(byteArray1.length != byteArray2.length) {
|
||||
fail(message);
|
||||
}
|
||||
for(int i = 0; i < byteArray1.length; i++) {
|
||||
assertEquals(message, byteArray1[i], byteArray2[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue