test: cache lazy properties, fix style nits
authorRod Vagg <rod@vagg.org>
Wed, 18 Mar 2015 22:27:26 +0000 (09:27 +1100)
committerRod Vagg <rod@vagg.org>
Thu, 19 Mar 2015 05:27:45 +0000 (16:27 +1100)
commitf600111d82ba208ff14c1b87ab0bef6eedeff4e7
treee294184a73abfc0e944b24c9dd6f059a0a427c4b
parent3038b8ee6ac6d07cbec678c4f4ee29ae7b9f60ff
test: cache lazy properties, fix style nits

inFreeBSDJail involves an execSync() and is used by localhost_ipv4 so
will be unnecessarily expensive, so cache both values and reuse
rather than re-evaluate each time.

Renamed localhost_ipv4 to localhostIPv4 for style consistency.

PR-URL: https://github.com/iojs/io.js/pull/1196
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
test/common.js
test/parallel/test-dgram-address.js
test/parallel/test-dgram-udp4.js
test/parallel/test-net-local-address-port.js
test/parallel/test-net-remote-address-port.js
test/sequential/test-net-server-address.js