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