[TNS-16] Some tests depend upon Clojure hash for ordering Created: 30/Jan/14 Updated: 31/Jan/14 Resolved: 31/Jan/14
|Reporter:||Andy Fingerhut||Assignee:||Stuart Sierra|
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.
|Comment by Andy Fingerhut [ 30/Jan/14 9:40 AM ]|
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.
|Comment by Stuart Sierra [ 31/Jan/14 9:09 AM ]|
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.