1 package org.openflow.codec.util;
3 import org.openflow.codec.util.U16;
5 import junit.framework.TestCase;
7 public class U16Test extends TestCase {
9 * Tests that we correctly translate unsigned values in and out of a short
13 public void test() throws Exception {
15 TestCase.assertEquals((short) -1, U16.t(val));
16 TestCase.assertEquals((short) 32767, U16.t(0x7fff));
17 TestCase.assertEquals(val, U16.f((short) -1));