Hi Ben,

On Sun, Dec 27, 2015 at 8:57 PM, Ben Fritz <[email protected]> wrote:
> On Sunday, December 27, 2015 at 9:45:32 PM UTC-6, [email protected] wrote:
>> Hi all,
>>
>> Just in case anyone is looking for getting the code coverage information
>> for Vim, I used the following steps to get this.
>>
>> 1. Modify src/Makefile and add the following two lines:
>>
>>         CFLAGS=-g -O0 -fprofile-arcs -ftest-coverage
>>         LDFLAGS=--coverage
>>
>> 2. Run configure and build Vim as usual.
>> 3. Run "make test" to run the unit tests.
>> 4. The code coverage information will be generated in the src/objects 
>> directory.
>> 5. Use the following command to get the code coverage information for a
>>     particular source file:
>>
>>         $ cd src
>>         $ gcov -o objects <filename.c>
>>
>> The code coverage information will be in the <filename.c>.gcov file.
>>
>> - Yegappan
>
> I'm mildly curious (especially working in an industry with strict code 
> coverage requirements) but too lazy
> to try myself right now. What did you learn?
>

With the current set of tests, the overall code coverage is 57.5% and
71.3% of the functions are tested.

The following files have zero test coverage:
arabic.c, farsi.c, pty.c and version.c

The following files have < 1% test coverage:
hardcopy.c and if_cscope.c

The following files have < 10% test coverage:
digraph.c and netbeans.c

It will be good to create new tests for the above files.

- Yegappan

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui