Add tests for DiagnosticsEngine and Diagnostic.
Merge branch 'master' into oo-version