You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit efed7e4
Browse filesBrowse the repository at this point in the historyBrowse files
Test number and text formatting across eight cultures
A guard asserts the suite runs under the invariant culture, and a theory
switches to en-US, fr-FR, de-DE, de-CH, nb-NO, ru-RU, tr-TR and ja-JP in turn, checking that sizes, percentages and grouped counts match the culture's own formatting and that strings come from its translation or the nearest fallback.
Expected values are computed from the culture, not hard-coded.
Copy file name to clipboardExpand all lines: SpaceSharp.Tests/LocalizationTests.cs
+50-1Lines changed: 50 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ public void FormatUsesTheCurrentCultureForNumbers()
146
146
}
147
147
148
148
/// <summary>Sizes, percentages and resources follow the user's culture: a French Windows sees a decimal comma and French text.</summary>
149
-
/// <remarks>The rest of the suite runs under the invariant culture (see <see cref="TestCulture"/>); this is the one test that asserts the other way.</remarks>
149
+
/// <remarks>The rest of the suite runs under the invariant culture (see <see cref="TestCulture"/>); this and <see cref="FormattingFollowsTheCurrentCulture"/> assert the other way.</remarks>
150
150
[Fact]
151
151
publicvoidFrenchCultureFormatsWithADecimalComma()
152
152
{
@@ -161,4 +161,53 @@ public void FrenchCultureFormatsWithADecimalComma()
/// <summary>The suite runs under the invariant culture whatever the machine is set to, so expected English text and decimal points hold everywhere.</summary>
166
+
/// <remarks>Fails if <see cref="TestCulture"/> is removed or stops running before the tests.</remarks>
0 commit comments