Package org.jbls.util

Source Code of org.jbls.util.ByteFromIntArrayTest

/**
* This file is distributed under the GPL
* $Id: ByteFromIntArrayTest.java 1612 2008-09-15 16:16:53Z scotta $
*/
package org.jbls.util;

import junit.framework.TestCase;
import net.bnubot.util.ByteArray;

/**
* @author scotta
*/
public class ByteFromIntArrayTest extends TestCase {
  public void test() {
    int []test = { 0x01234567, 0x89abcdef };
    ByteFromIntArray bfia = new ByteFromIntArray(false);
    assertEquals(new ByteArray(
        new byte[] { 0x01, 0x23, 0x45, 0x67, (byte)0x89, (byte)0xab, (byte)0xcd, (byte)0xef }),
        bfia.getByteArray(test));
  }
}
TOP

Related Classes of org.jbls.util.ByteFromIntArrayTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.