Additional tests for cyclic structures

I earlier reported that my code did not pass the test for cyclic structures:

I fixed my code today. As I was half way through fixing the code, it passed 
that test and did not fail any others (well that part of the code).

A colleague argues that you should only write code to pass tests - so I wrote 
a few more tests to fail before writing the half of the cycle detection fix 
to my code.

These are:
    A cycle of unnamed individuals

   Well formed list comprehension
   A cylic list
   A list with itself inside an element.

The last three also investigate further the list comprehension rules.

(My code failed those tests and so I fixed it).

I imagine parsers such as Sean's and Peter's code cope with these no problem.


Received on Monday, 29 September 2003 12:03:32 UTC