Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

[ Create a new account ]

JetScootr (319545)

JetScootr
  (email not shown publicly)

Journal of JetScootr (319545)

Thuds, new iteration 1"I Thud, therefore I am."

[ #141275 ]
Saturday August 05 2006, @06:53PM
Programming

Design
Thuds are a standard linked list, and this will use only the routine methods for calloc, free, adding and removing things from linked lists.
Unit Test Plan
  • Add, get_first, remove a thud. Possible errors:
    • Create doesn't
    • get_first() returns null or invalid. (Invalid will likely crash the program).
    • Destroy doesn't, or it doesn't null the pointer provided.
    • Count of thuds doesn't go to 1 then to 0.

  • Add a bunch of thuds, then remove all of them in an arbitrary order. Possible errors are:
    • All of the above, plus:
    • relink in forward or reverse order fails or disagrees as to the order or content.
    • First and/or last links incorrect.
    • Destroyed thud still accessible.

Review:
Aug/05/2006 - 4 hours. This is more like it. I ran thru a normal (for me) coding session, had the usual number of whoopsies (bugs I'm familiar with that are little more than typos). It took longer to code the tests than the product; I'm sure it's cuz I'm well familiar with linked lists, and less with tests for linked lists that I intend to keep around in working order forever.

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.