if (UNKNOWN != (value = getSize())) f.format(", size=%d", value); if (UNKNOWN != (value = getExternalAttributes())) f.format(", ea=0x%08X", value);
@Test public void testExternalAttributes() { try { entry.setExternalAttributes(UNKNOWN - 1); fail(); } catch (IllegalArgumentException expected) { } try { entry.setExternalAttributes(UInt.MAX_VALUE + 1); fail(); } catch (IllegalArgumentException expected) { } assertEquals(UNKNOWN, entry.getExternalAttributes()); entry.setExternalAttributes(UInt.MIN_VALUE); assertEquals(UInt.MIN_VALUE, entry.getExternalAttributes()); entry.setExternalAttributes(UInt.MAX_VALUE); assertEquals(UInt.MAX_VALUE, entry.getExternalAttributes()); entry.setExternalAttributes(UNKNOWN); assertEquals(UNKNOWN, entry.getExternalAttributes()); }