diff options
author | Marco Ceresa <ceresa@gmail.com> | 2009-12-12 10:52:47 +0000 |
---|---|---|
committer | Marco Ceresa <ceresa@gmail.com> | 2009-12-12 10:52:47 +0000 |
commit | b792124f5d80e8dfbaa6574dda1d5636820674b6 (patch) | |
tree | 6654078e16915adbf242b98f28f5a8a2c91b2f87 /test/ipaddress/ipv4_test.rb | |
parent | 25f2223a5ae0de9c5e4204205bbb53201cae2fce (diff) | |
download | ipaddress-b792124f5d80e8dfbaa6574dda1d5636820674b6.tar.gz |
Completed ::summarize documentation
Diffstat (limited to 'test/ipaddress/ipv4_test.rb')
-rw-r--r-- | test/ipaddress/ipv4_test.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/ipaddress/ipv4_test.rb b/test/ipaddress/ipv4_test.rb index 3d82c59..d28082b 100644 --- a/test/ipaddress/ipv4_test.rb +++ b/test/ipaddress/ipv4_test.rb @@ -280,24 +280,24 @@ class IPv4Test < Test::Unit::TestCase ip2 = @klass.new("172.16.11.2/24") assert_equal "172.16.10.0/23", @klass.summarize(ip1,ip2).to_s - ip1 = IPAddress("10.0.0.1/24") - ip2 = IPAddress("10.0.1.1/24") - ip3 = IPAddress("10.0.2.1/24") - ip4 = IPAddress("10.0.3.1/24") + ip1 = @klass.new("10.0.0.1/24") + ip2 = @klass.new("10.0.1.1/24") + ip3 = @klass.new("10.0.2.1/24") + ip4 = @klass.new("10.0.3.1/24") assert_equal "10.0.0.0/22", @klass.summarize(ip1,ip2,ip3,ip4).to_s # Summarize non homogeneous networks - ip1 = IPAddress("10.0.1.1/24") - ip2 = IPAddress("10.0.2.1/24") - ip3 = IPAddress("10.0.3.1/24") - ip4 = IPAddress("10.0.4.1/24") + ip1 = @klass.new("10.0.1.1/24") + ip2 = @klass.new("10.0.2.1/24") + ip3 = @klass.new("10.0.3.1/24") + ip4 = @klass.new("10.0.4.1/24") result = ["10.0.1.0/24","10.0.2.0/23","10.0.4.0/24"] assert_equal result, @klass.summarize(ip1,ip2,ip3,ip4).map{|i| i.to_s} - ip1 = IPAddress("10.0.1.1/24") - ip2 = IPAddress("10.10.2.1/24") - ip3 = IPAddress("172.16.0.1/24") - ip4 = IPAddress("172.16.1.1/24") + ip1 = @klass.new("10.0.1.1/24") + ip2 = @klass.new("10.10.2.1/24") + ip3 = @klass.new("172.16.0.1/24") + ip4 = @klass.new("172.16.1.1/24") result = ["10.0.1.0/24","10.10.2.0/24","172.16.0.0/23"] assert_equal result, @klass.summarize(ip1,ip2,ip3,ip4).map{|i| i.to_s} |