There's no way to check the correctness of generated code after making changes to the code generation module. I can highly recommend the "golden values" approach - generate code, make sure it's correct and store it in local files. Write tests that would generate code and compare it against the golden files. Update golden files whenever necessary (e.g. formatting changes, new features, etc.).
There's no way to check the correctness of generated code after making changes to the code generation module. I can highly recommend the "golden values" approach - generate code, make sure it's correct and store it in local files. Write tests that would generate code and compare it against the golden files. Update golden files whenever necessary (e.g. formatting changes, new features, etc.).