Hi, You are right: with 0x1_00_00 we ensure that we fail at the right boundary and not at something bigger than 0xFF_FF. I’ll fix that.
Thanks, Sebastian > Am 22.02.2018 um 12:06 schrieb Justin Mclean <justinmcl...@me.com>: > > Hi, > >> I extended the test with duplicated hex variants to better visualize the >> boundaries: >> @Test >> public void checkUnsignedBoundsLongHex() { >> // Hex representation to visualize valid bounds in bytes >> ByteValue.checkUnsignedBounds(0x0_00_00, 2); >> ByteValue.checkUnsignedBounds(0x0_FF_FF, 2); >> } >> @Test(expected = IllegalArgumentException.class) >> public void checkUnsignedBoundsLongTooBigHex() { >> ByteValue.checkUnsignedBounds(0x1_FF_FF, 2); >> } > > Should that be 0x1_00_00 rather than 0x1_FF_FF? i.e. 0x0_FF_FF +1? > > Thanks, > Justin