Testing progress : Part 1/4 completed

Hi everyone !

As everyone following this blog knows by now, I’ve finished to code my memory manager and am currently in the process of testing it to make sure that no obvious bugs remain — as bugs in memory management are a nightmare to spot and debug.

Today, I’ve finished the first of the (currently) four parts of my test suite : progressively initializing memory management, carefully checking the initial state of each component for correctness. Initially, I planned to initialize and test each component separately. But as it turns out, I ironically need memory allocation in order to test memory management in depth, which obviously requires it to be already initialized.

In the process, I’ve proven this testing process to be worth the time spent on it, by uncovering quite a few things that needed to be polished. Some were just minor, easy to spot issues, like a function always returning NULL because I had put a dummy “return NULL;” at the end of it when I started coding it and forgot to replace it with the real result when I was done. But other bugs were much more serious. In particular, I’ve spent most of last evening fighting with a nasty one : the behaviour of some code seemed to be totally random and illogical, I just couldn’t figure out what was wrong. As it turns out, a header was duplicated in the tree for some reason, and the compiler was thus using the old, duplicate version of it…

Now, onto the next part !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s