Some tests depend upon Clojure hash for ordering

Description

In particular there are several that do a topological sort of a dependency graph, and compare the returned node sequence against a single node order. In general there are many correct results for a topological sort, and the implementation's return order depends upon Clojure's hash function, recently changed.

Environment

None

Attachments

1

Activity

Show:

Stuart Sierra September 19, 2014 at 3:08 PM

Included in release 0.2.6

Stuart Sierra January 31, 2014 at 3:09 PM

Given that the current tests only use very small, hand-drawn graphs, I'm going to go with the brute-force approach for now.

But thanks for this patch. I'd like to hold on to it for possible future use with generated graphs and/or test.check.

Andy Fingerhut January 30, 2014 at 3:40 PM

Patch tns-16-v1.diff is one way to make the tests independent of Clojure's hash function. It implements a topo-check function that determines whether a particular node sequence order is in a valid dependency order, i.e. is a subsequence of at least one topological sorting of the nodes.

Completed

Details

Assignee

Reporter

Priority

Created January 30, 2014 at 3:37 PM
Updated September 19, 2014 at 3:08 PM
Resolved September 19, 2014 at 3:08 PM