[webkit-dev] Testing changes to CodeGenerator*.pm

Alexey Proskuryakov ap at webkit.org
Thu Apr 29 10:39:15 PDT 2010

On 29.04.2010, at 10:27, Jeremy Orlow wrote:

> It's great to test end-to-end behavior, and unit tests can also also  
> useful sometimes, but why test that source code stays byte to byte  
> identical?
> When you make a change to the code generator, you should make a  
> corresponding change to the generated test code.  This allows the  
> reviewer to see how the change in CodeGenerator*.pm affects the  
> generated code and documents the change in SVN.  The hope is that  
> it'll be obvious if your change is going to have unintended  
> consequences on the generated code.  We've found this useful when  
> working on the V8 bindings.

For these goals to be achieved, we'd need to check all generated code,  
not just one custom test file for each language.

It would be great to have a tool that generates a diff of derived  
sources for inspection, but making it into a test for everyone to  
maintain feels like unnecessary burden. I certainly would feel bad  
about having to maintain a test that verifies source file content  
instead of behavior.

- WBR, Alexey Proskuryakov

More information about the webkit-dev mailing list