[webkit-dev] testing changes to UString/String

Geoffrey Garen ggaren at apple.com
Mon Jan 12 13:40:43 PST 2009


Hi Dave.

We tend to write unit tests in HTML or JavaScript. If it's possible to  
trigger all of the relevant test conditions in HTML or JavaScript, I'd  
recommend that.

The next best thing to do is to write a C++ test function, add it to  
WebKitTools/DumpRenderTree, and invoke it during DumpRenderTree's  
initialization. This solution is not as good because you can't run it  
inside a web browser, and a failure in one test will cause all unit  
tests to appear to fail.

As a last resort, you could create a new build target specifically for  
your unit test. This solution is not as good because most WebKit  
developers will not run your test as a part of their daily development.

Cheers,
Geoff

On Jan 11, 2009, at 12:36 PM, David Levin wrote:

> I'm refactoring and improving UString and String. I want to write  
> tests for these classes. What's the best way to do this?
>
> Thanks,
> Dave
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090112/377fee26/attachment.html>


More information about the webkit-dev mailing list