3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.openflow.util;
12 import junit.framework.TestCase;
14 public class U32Test extends TestCase {
16 * Tests that we correctly translate unsigned values in and out of an int
19 public void test() throws Exception {
20 long val = 0xffffffffL;
21 TestCase.assertEquals(-1, U32.t(val));
22 TestCase.assertEquals(val, U32.f(-1));