It turns out that my spec wasn't working as expected at all because of (a) an incorrect use of hasOwnProperty (which, to be honest, I don't fully understand) and (b) a misunderstanding of how for...in works in JavaScript. I thought it would give me the *elements* of the array (like it owuld in Java), but intead it gives me the *indices* of the array (essentially the keys in the hash). The combination of the two meant that I wasn't actually checking that the cities were instances of Google's LatLng class like I thought I was.
It turns out that my spec wasn't working as expected at all because of (a)
an incorrect use of hasOwnProperty (which, to be honest, I don't fully
understand) and (b) a misunderstanding of how for...in works in JavaScript.
I thought it would give me the *elements* of the array (like it owuld in
Java), but intead it gives me the *indices* of the array (essentially the
keys in the hash). The combination of the two meant that I wasn't actually
checking that the cities were instances of Google's LatLng class like I thought
I was.

NicMcPhee/EvoTSP,NicMcPhee/EvoTSP