Skip to content

Commit

Permalink
Major revision to the dropck_legal_cycles test.
Browse files Browse the repository at this point in the history
1. Added big comment block explaining the test framework.

2. Added tests exericising Rc and Arc. This was inspired by a comment
   from eefriedman on PR rust-lang#28861.

3. Made the cycle-detection not issue false-positives on acyclic dags.

   Doing this efficiently required revising the framework; instead of
   visiting all children (i.e. doing a traversal), now each test is
   responsible for supplying the path that will act as a witness to
   the cycle.

   Luckily for me, all of the pre-existing tests worked with a trivial
   path built from "always tke your first left", but new tests I added
   did require other input paths (i.e., "first turn right, then left".

   (The path representation is a bit-string and its branches are
    n-ary, not word phrases and binary branches as you might think
    from the outline above.)
  • Loading branch information
pnkfelix committed Oct 9, 2015
1 parent c298efd commit 098a7a0
Showing 1 changed file with 480 additions and 46 deletions.
Loading

0 comments on commit 098a7a0

Please sign in to comment.