Ported port and enum analyzers and tests; improved diagnostic tests: now checks that the correct diagnostic is emitted, checking the diagnostic id, its source span as well as its message