This commit is contained in:
Looly
2023-03-05 17:05:40 +08:00
parent ca59e1471d
commit 1eb629bc3b
4 changed files with 70 additions and 394 deletions

View File

@@ -196,8 +196,8 @@ public class Ipv4UtilTest {
public void getMaskBitByIpRange() {
final String ip = "192.168.100.2";
for (int i = 1; i <= 32; i++) {
String beginIpStr = Ipv4Util.getBeginIpStr(ip, i);
String endIpStr = Ipv4Util.getEndIpStr(ip, i);
final String beginIpStr = Ipv4Util.getBeginIpStr(ip, i);
final String endIpStr = Ipv4Util.getEndIpStr(ip, i);
Assert.assertEquals(Ipv4Util.getMaskByMaskBit(i), Ipv4Util.getMaskByIpRange(beginIpStr, endIpStr));
}
}