开发者

Test Suite for a Linked List Implementation? (and/or other data structures)

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 a开发者_运维技巧re 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.)


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜