Add test for unreachable vertices

d(i,j) = Infinity if j is unreachable from i.