This blog is a continuation of a series of blog on the test suite for the MouseLock API (For those new to this API, please refer to the API specifications). Sometime last week, Dave (Professor at Seneca College) posted a new patch to the MouseLock bug that had all the changes (I think) that was suggested by the reviewers. Now for the bad part, the new patch caused all our test cases to fail. This reminds me of the small note Dave suggested (the following were not his exact words, but somewhere on those lines):
The longer you linger on a bug with no patch, the more changes you have to make as other people post their patch.
This made a lot of sense as other code patch may cause crashes on the section where I am working at. It feels like the “survival of the fittest code”.
Fixing the Code
Every developer (NOT programmer) have their own coding style. Something that is highly evident while reviewing other people’s code. This causes a problem with code readability and review and is one of the reason why all contributors to code for Mozilla must stick to a specific coding style. It is also the same reason why it took me a long time to figure out some of the test suite coded by other people.
I felt like someone threw the “painsaw” at me (a term I learned from Ed which is a combination of pain and chainsaw). The code have weird indentation and the flow does not seem right. It may pass or fail the test, depending on when the code was executed by the machine.
I was working with Raymond on the test suite. Let’s hope he is having a better time than me. While I continue to fix more of these problems.
One Response to Mouselock API Test – Fixing and Reviewing