1 package org.openflow.codec.util;
3 import java.math.BigInteger;
5 import org.openflow.codec.util.U64;
7 import junit.framework.TestCase;
9 public class U64Test extends TestCase {
11 * Tests that we correctly translate unsigned values in and out of a long
15 public void test() throws Exception {
16 BigInteger val = new BigInteger("ffffffffffffffff", 16);
17 TestCase.assertEquals(-1, U64.t(val));
18 TestCase.assertEquals(val, U64.f(-1));