Skip to content

Commit

Permalink
Auto merge of #28929 - pnkfelix:expand-legal-cycles-test, r=alexcrichton
Browse files Browse the repository at this point in the history
Major revision to the dropck_legal_cycles test.

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 #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.)

cc PR #27185
  • Loading branch information
bors committed Oct 9, 2015
2 parents 3034541 + 098a7a0 commit e3376d8
Showing 1 changed file with 480 additions and 46 deletions.
Loading

0 comments on commit e3376d8

Please sign in to comment.