Tweak test utility functions
Add test for compiling model from code
Add invalid model from code test