File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
src/test/java/com/thealgorithms/conversions Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments