Fixing compiler test localization issues#25772
Fixing compiler test localization issues#25772jaredpar merged 11 commits intodotnet:features/spanish-queuefrom
Conversation
|
CC @dotnet/roslyn-compiler for review |
|
@jaredpar The PR is still marked for personal review |
| </errors> | ||
| CompilationUtils.AssertTheseDeclarationDiagnostics(compilation1, expectedErrors1) | ||
|
|
||
| Using New EnsureEnglishUICulture |
There was a problem hiding this comment.
Using New EnsureEnglishUICulture [](start = 8, length = 32)
The fact that you have to do this looks suspicious. I would expect AssertTheseDeclarationDiagnostics to take care of this #Closed
There was a problem hiding this comment.
The latter part of the message is controlled by the resource string CodeAnalysisResources.PEImageDoesntContainManagedMetadata. It's not added as a diagnostic argument but as the text of an exception. From PEModule.cs
throw new BadImageFormatException(CodeAnalysisResources.PEImageDoesntContainManagedMetadata);
Given it's an exception message I wouldn't expect the AssertTheseDeclarationDiagnostics method to be able to control it. Am I missing something?
In reply to: 177594598 [](ancestors = 177594598)
There was a problem hiding this comment.
| bool shouldRunOnServer = true) | ||
| { | ||
| var arguments = new List<string>(argumentsSingle.Split(' ')); | ||
| arguments.Add("/preferreduilang:en"); |
There was a problem hiding this comment.
It might be worth adding a comment here to the test that is validating that localization does work, just so somebody isn't thinking we never test that. #Resolved
| ''' Late-bound calls with ByRef return values not supported. | ||
| ''' </summary> | ||
| <Fact()> | ||
| <ConditionalFact(GetType(IsEnglishLocal))> |
There was a problem hiding this comment.
<ConditionalFact(GetType(IsEnglishLocal))> [](start = 8, length = 42)
Instead of doing this, we can change/restore CurrentCulture in the Main method of comp2. We should have examples of that.
|
Flagged compiler test are now passing. |
This fixes the localization issues we had in our tests as revealed by our Spanish run.