Add tests for static diagnostics