Skip to content

Commit 838fa44

Browse files
committed
Fix
1 parent bdfa5f1 commit 838fa44

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/com/thealgorithms/conversions/IPConverterTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ public class IPConverterTest {
1010
public void testIpToBinary() {
1111
assertEquals("11000000.10101000.00000001.00000001", IPConverter.ipToBinary("192.168.1.1"));
1212
assertEquals("01111111.00000011.00000100.00000101", IPConverter.ipToBinary("127.3.4.5"));
13+
assertEquals("00000000.00000000.00000000.00000000", IPConverter.ipToBinary("0.0.0.0"));
1314
}
1415

1516
@Test
1617
public void testBinaryToIP() {
1718
assertEquals("192.168.1.1", IPConverter.binaryToIP("11000000.10101000.00000001.00000001"));
1819
assertEquals("127.3.4.5", IPConverter.binaryToIP("01111111.00000011.00000100.00000101"));
20+
assertEquals("0.0.0.0", IPConverter.binaryToIP("00000000.00000000.00000000.00000000"));
1921
}
2022
}

0 commit comments

Comments
 (0)