test: add more codegen tests, add copyright headers to all.

r? @pcwalton or someone