my-solutions/leetcode/1108-defanging-an-ip-address/test.rb

10 lines
251 B
Ruby
Raw Normal View History

2022-11-26 16:14:11 +05:00
require_relative 'main'
require 'test/unit'
2022-11-25 23:43:40 +05:00
class TestDefangIpAddr < Test::Unit::TestCase
def test_simple
2022-11-26 16:14:11 +05:00
assert_equal('1[.]1[.]1[.]1', defang_i_paddr('1.1.1.1'))
assert_equal('255[.]100[.]50[.]0', defang_i_paddr('255.100.50.0'))
2022-11-25 23:43:40 +05:00
end
end