GetEmitOutput And Testfiles

Though diagnostic can have warning as well. So shouldn't we check to make sure that diagnostic is really an error?