B2G/gecko/netwerk/test/unit/test_net_addr.js
/**
 * Helper function.
 * Compares two nsINetAddr objects and ensures they are logically equivalent.
 */
Helper function.
Compares two nsINetAddr objects and ensures they are logically equivalent.
Helper function . Compares two nsINetAddr objects and ensures they are logically equivalent .
function checkAddrEqual(lhs, rhs) {
  do_check_eq(lhs.family, rhs.family);
  if (lhs.family === Ci.nsINetAddr.FAMILY_INET) {
    do_check_eq(lhs.address, rhs.address);
    do_check_eq(lhs.port, rhs.port);
  }
}
function checkAddrEqual ( lhs , rhs ) { do_check_eq ( lhs . family , rhs . family ) ; if ( lhs . family === Ci . nsINetAddr . FAMILY_INET ) { do_check_eq ( lhs . address , rhs . address ) ; do_check_eq ( lhs . port , rhs . port ) ; } }
Helper function.
Helper function .
/* TODO: fully support ipv6 and local */