views:

104

answers:

2

For fun, I'm going to write my own implementations of common data structures like Linked List or Binary Sorted Tree. Are there any good test suites that already exist that I can use to make sure they are fully living up to their contracts?

(It probably wouldn't be that hard to test them myself, but if it's already been done I don't want to reinvent the wheel.)

(And yes, I know that writing a linked list implementation is reinventining the wheel, and if this were a project I would just use Java's linkedlist and be done with it.)

+1  A: 

I'd suggest writing your own test suite as well. Many of the tests can be reused for different data structures by writing generic tests for the Collection and List interfaces, with more tests added for each specific data structure you implement.

Bill the Lizard
A: 

You could look at the Harmony project, they have tests for a linked list.

Michael Barker