Testing kit for implementing Linked List? (and / or other data structures)

For fun, I'm going to write my own implementations of common data structures such as 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 consistent with their contracts?

(It might not be so difficult to test them yourself, but if it’s already done, I don’t want to reinvent the wheel.)

(And yes, I know that creating a linked list link is reusing the wheel, and if it were a project, I would just use the Java list associated with it and do with it.)

+3
source share
2 answers

I would suggest writing your own test suite. Many of the tests can be reused for different data structures by writing general tests for the Collection and List interfaces, and more tests are added for each specific data structure that you implement.

+1
source

You can see the Harmony project , they have tests for a linked list .

0
source

Source: https://habr.com/ru/post/1720140/


All Articles