fix EdgeWeightedDirectedCycle add tests