Vim code coverage is at 85% now

44 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Mar 20, 2020, 5:37:06 PM3/20/20
to vim_dev
Hi all,

With the recent addition of many new test cases, the Vim code coverage
has reached 85%:


Some statistics:
98 out of the 118 source files have greater than 80% code coverage.
47 source files have greater than 90% code coverage.

Regards,
Yegappan

Bram Moolenaar

unread,
Mar 20, 2020, 5:51:17 PM3/20/20
to vim...@googlegroups.com, Yegappan Lakshmanan

Yegappan wrote:

> With the recent addition of many new test cases, the Vim code coverage
> has reached 85%:
>
> https://codecov.io/gh/vim/vim/commits

That is quite an accomplishment! Thank you very much Yegappan for doing
most of this work.

Along the way we also found and fixed problems, thus it's not just a
nice number, it actually helps making Vim more reliable. Also, memory
leaks are discovered.

> Some statistics:
> 98 out of the 118 source files have greater than 80% code coverage.
> 47 source files have greater than 90% code coverage.

I hope we can reach 90%. Going above that will be relatively difficult.
Going above 95% will require checking out-of-memory situations, which is
even more tricky. Aiming for 90% appears to be a good goal.


--
Q: Why do ducks have flat feet?
A: To stamp out forest fires.

Q: Why do elephants have flat feet?
A: To stamp out flaming ducks.

/// Bram Moolenaar -- Br...@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 ///

Yegappan Lakshmanan

unread,
Jul 1, 2020, 1:31:10 PM7/1/20
to vim_dev
Hi all,

An update on this. Vim code coverage has now reached 88%.


Update on the statistics:
109 out of the 124 source files have greater than 80% code coverage.
73 source files have greater than 90% code coverage.
139,991 lines out of 159,080 lines are now covered.

Regards,
Yegappan

Bram Moolenaar

unread,
Jul 1, 2020, 2:58:18 PM7/1/20
to vim...@googlegroups.com, Yegappan Lakshmanan
A big thanks to Yegappan, who has added lots of tests!

I feel much more confident that if a patch causes problems it will be
caught by a test.

--
"Lisp has all the visual appeal of oatmeal with nail clippings thrown in."
-- Larry Wall

Yegappan Lakshmanan

unread,
May 25, 2021, 3:44:37 PM5/25/21
to vim_dev
Hi all,
An update on this. Vim code coverage has now reached 89.51%.

https://codecov.io/gh/vim/vim/commit/34fcb697240c1bc9e69417ed75db3b1a83479724/

Update on the statistics:
120 out of the 129 source files have greater than 80% code coverage.
86 source files have greater than 90% code coverage.
149,468 lines out of 166,980 lines are now covered by tests.

All the source files containing the core Vim functionality (except for the GUI
functionality) have > 80% code coverage.

Regards,
Yegappan

Bram Moolenaar

unread,
May 25, 2021, 5:14:48 PM5/25/21
to vim...@googlegroups.com, Yegappan Lakshmanan
That is very nice! It's getting more difficult to cover remaining code,
but we still see the coverage going up. Thanks for everybody helping
out, especially Yegappan and Dominique.

--
ARTHUR: Be quiet!
DENNIS: Well you can't expect to wield supreme executive power just 'cause
some watery tart threw a sword at you!
ARTHUR: Shut up!
DENNIS: I mean, if I went around sayin' I was an empereror just because some
moistened bint had lobbed a scimitar at me they'd put me away!
The Quest for the Holy Grail (Monty Python)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
Reply all
Reply to author
Forward
0 new messages