Re: Refactored BDecoderTest..

Hi Atul,

This patch is pushed to your public branch in revno 87. The tests look quite nice! Would you mind adding a short documentation for each test function saying what is being tested and what exactly is supposed to fail/pass? For example in testMalformedRead() it may not be clear at first what exactly is malformed. I also find this kind of documentation useful because it helps to figure out which cases have been covered and which not. Have you considered using my CppUnit extension for data tests? If using it you could write a single function for all int tests. It will also be great to get some usability feedback from someone other than me ;-). Have you checked my last Connection tests?

Best regards,

Peter

atul wrote:Hi all

Here I think is a better version. The methods are more cohesive IMHO. It is easier to reason about a test, put it in gdb etc…

With long methods it is easier to get lost… ( It is like an army of characters coming at you ;-)

I am planning to refactor testReadTorrent() too…
– cheerio atul

Would you like to post a relpy?


This post is a reply to:
Refactored BDecoderTest..
Hi all Here I think is a better version. The methods are more cohesive IMHO.  It is easier to reason about a test, put it in gdb etc... With long methods it (more...)

Follow-ups:
Re: Re: Refactored BDecoderTest..
Dear Peter Adding a short documentation is a very good suggestion Peter! It would be a very good refactoring ;-) You are right about the thinking that would go in ( and (more...)