Add tests for metaprogram constructors

Also move xml parsing tests to a separate test file