Parent

Methods

Class/Module Index [+]

Quicksearch

Rex::Socket::SubnetWalker::UnitTest

Constants

Klass

Public Instance Methods

test_walker() click to toggle source
# File lib/rex/socket/subnet_walker.rb.ut.rb, line 11
def test_walker
        s = Klass.new('10.0.0.0', '255.255.255.0')

        0.upto(255) { |x|
                assert_equal('10.0.0.' + x.to_s, s.next_ip)
        }
        assert_nil(s.next_ip)

        s.reset

        0.upto(255) { |x|
                assert_equal('10.0.0.' + x.to_s, s.next_ip)
        }
        assert_nil(s.next_ip)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.