I wrote:

> > > I has added a test for Farsi.  I can see in the Travis log that the
> > > tests are executed:
> > > 
> > >   Executing Test_farsi_map()
> > >   xecuting Test_farsi_toggle()
> > >   ...
> > >   Executed 2 tests
> > > 
> > > However, the reported coverage for src/farsi.c is zero.
> > > What is wrong here?
> > > 
> > > I have also noticed zero coverage being reported for main.c.
> > > It also only lists 290 lines are relevant.  Perhaps somehow valid source
> > > lines are considered not relevant?
> > 
> > So I changed the build to compile arabic.c and farsi.c separately, instead
> > of including them from main.c.  And now the coverage has increased
> > dramatically for farsi.c.
> > 
> > Also look at json.c: The json_encode() function is marked as "missed",
> > but I'm sure test_json invokes it.
> > 
> > It definitely looks like there is something fishy about how the
> > coverage is estimated.
> 
> I noticed that the new message unittest caused the coverage of the
> message.c file to drop radically.  I assume this is because when running
> the unittest the file is #included (to access static functions) and this
> causes the coverage information to be overwritten.
> 
> I have split the tests in scripttests and unittests.  I first only ran
> the scripttests and now the coverage of main.c makes sense!
> 
> I now try running unittests before scripttests.  If the coverage is
> indeed overwritten then this should not change the coverage
> information...  Nope, that doesn't work.
> 
> I'll add a separate target for running the unittests with coverage.
> Let's see if that works.  I have no experience with .travis.yml,
> please correct me if it can be improved.

OK, after fixing the mistakes it appears the coverage is now done
properly.  The hits from running scripttests and unittests are merged.
Now we can write tests for the missing pieces!

-- 
What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
meaning 'bloodsucking creatures'.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui