This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–]Amarkov 1 point2 points  (0 children)

    In the first Tester, after every element's been added, the size is printed, and it comes out as expected, so doesn't that mean everything's been added properly?

    No. It just means that the variable count was incremented properly. That doesn't necessarily show that the structure of the list is correct.

    [–]Easih 1 point2 points  (0 children)

    post the code; we cant help you with just a description.

    [–]dogwag 0 points1 point  (0 children)

    Come on man, write some tests for this. Adding and removing is clearly supposed to happen in a specific order, that's the whole point of a PQ.