Fixes #1 : sort diagnostics errors to be platform independent in tests