[webkit-dev] C++ unit tests for WebKit?

Hans Muller hmuller at adobe.com
Wed Jul 11 14:23:10 PDT 2012


Bear Travis, Alexandru Chiculita, and I have been working on the WebKit CSS Exclusions implementation.   I've been working on a set of C++ classes that are used to compute the layout of inline content around or within exclusion shapes.  When I got started, before attempting to integrate the code with WebKit, I wrote a pile of unit tests.  This was helpful for the usual reasons but there doesn't appear to be a place for low level unit tests in WebKit.  Naturally what I've done will be tested in terms of the Exclusions public JavaScript and CSS APIs, so adding lower level unit tests will not drastically change our confidence about the overall feature working correctly.  On the other hand, unit tests can be useful for isolating problems and for implicitly specifying interface semantics that wouldn't otherwise be documented.

Have the merits of C++ unit tests been debated before?  I noticed that a bug representing as much has been around since 2008 (https://bugs.webkit.org/show_bug.cgi?id=21010).  The last comment (2009) concludes with: "I'd be interested to hear other's thoughts."   Personally, I'd like to be able to include unit tests with worthy C++ classes, however I would also like to hear other's thoughts.


Thanks,
- Hans


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120711/807845e3/attachment.html>


More information about the webkit-dev mailing list