Sunday, 21 July 2013

Code coverage

Sunday, 21 July 2013 06:24
dmaks: (Default)
Code coverage is a good metric that influences the way I write code (TDD does that as well). I've had sleeper thread and its variables coupled with the other parts of the system, and didn't think much of it, but now I'm glad I've looked at code coverage (it was 30% and I decided to improve it), the resulting code is better!

What I did - I've moved sleeper thread defined within the main class into a separate class, and all of the interaction with the thread is made via new class. Makes code cleaner. A side-effect of that is that I no longer have @sleeperMutex - a mutex for the sleeper thread, now it's SleeperNotifier.mutex.

You can use Coveralls, an online service providing a coveralls badge for your project. Though it has ongoing problems as of now.

Badges like this: Coverage Status

Profile

dmaks: (Default)
Blog about programming, Linux and Mac

October 2013

S M T W T F S
  12345
6789101112
13141516171819
20212223 242526
2728293031  

Page Summary

Page generated Monday, 24 July 2017 04:28

Expand Cut Tags

No cut tags