On 02/10/14 11:20, Daniel Kolesa wrote:
> 2014-10-02 11:12 GMT+01:00 Daniel Zaoui <daniel.za...@samsung.com>:
>
>> Hi D5,
>>
>> Didn't we speak about having automatic tests to be sure it works as
>> expected? And don't tell me Lua checks it ;-)
>>
>
> I don't really think a test is necessary here, considering that whether it
> works or not is immediately visible from whether the generator creates a
> working output (for any eo file). If it didn't work, stuff wouldn't compile.


I strongly disagree. Covering all the functions, even the dead simple 
ones like this, even if not important for testing the code is important 
for the following three reasons:

1. Having 100% coverage reassures our users that our library is tested. 
72.9% and an asterisk saying "Oh, we covered all the important stuff" 
doesn't.
2. Knowing that we aim for 100% coverage gives us a mental goal that is 
more clear and easy to follow than some magic number between 50-70% 
which is always changing.
3. Letting people not write tests because they assume things work means 
you officially approve of assumptions, which is the mother of all 
fuck-ups. :)

Furthermore, even testing an api that has a simple strcpy can be useful. 
When used with valgrind (or memory sanitizer) it can detect use after 
free, off by 1 and etc.


Bottom line: write tests.

--
Tom.


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to