Skip to content

Commit ade67fa

Browse files
committed
Stabilize AppVeyor testing.
1 parent 3007cb2 commit ade67fa

File tree

4 files changed

+114
-0
lines changed

4 files changed

+114
-0
lines changed

test/MsgPack.UnitTest/TimestampTest.Parse.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,12 @@ public void TestParseExact_Distinguishable_o_null_CurrentCultureIsUsed()
20592059
Thread.CurrentThread.CurrentCulture =
20602060
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
20612061
new LegacyJapaneseCultureInfo();
2062+
2063+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2064+
{
2065+
Assert.Ignore( "This platform does not support custom culture correctly." );
2066+
}
2067+
20622068
Assert.That(
20632069
Timestamp.ParseExact(
20642070
"1234-05-06T07:08:09.123456789Z",
@@ -2092,6 +2098,12 @@ public void TestTryParseExact_Distinguishable_o_null_CurrentCultureIsUsed()
20922098
Thread.CurrentThread.CurrentCulture =
20932099
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
20942100
new LegacyJapaneseCultureInfo();
2101+
2102+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2103+
{
2104+
Assert.Ignore( "This platform does not support custom culture correctly." );
2105+
}
2106+
20952107
Timestamp result;
20962108
Assert.That(
20972109
Timestamp.TryParseExact(
@@ -2163,6 +2175,12 @@ public void TestParseExact_Distinguishable_s_null_CurrentCultureIsUsed()
21632175
Thread.CurrentThread.CurrentCulture =
21642176
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
21652177
new LegacyJapaneseCultureInfo();
2178+
2179+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2180+
{
2181+
Assert.Ignore( "This platform does not support custom culture correctly." );
2182+
}
2183+
21662184
Assert.That(
21672185
Timestamp.ParseExact(
21682186
"1234-05-06T07:08:09Z",
@@ -2196,6 +2214,12 @@ public void TestTryParseExact_Distinguishable_s_null_CurrentCultureIsUsed()
21962214
Thread.CurrentThread.CurrentCulture =
21972215
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
21982216
new LegacyJapaneseCultureInfo();
2217+
2218+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2219+
{
2220+
Assert.Ignore( "This platform does not support custom culture correctly." );
2221+
}
2222+
21992223
Timestamp result;
22002224
Assert.That(
22012225
Timestamp.TryParseExact(
@@ -2267,6 +2291,12 @@ public void TestParseExact_YearMinus1_o_null_CurrentCultureIsUsed()
22672291
Thread.CurrentThread.CurrentCulture =
22682292
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
22692293
new LegacyJapaneseCultureInfo();
2294+
2295+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2296+
{
2297+
Assert.Ignore( "This platform does not support custom culture correctly." );
2298+
}
2299+
22702300
Assert.That(
22712301
Timestamp.ParseExact(
22722302
"|0001-03-01T00:00:00.000000000Z",
@@ -2300,6 +2330,12 @@ public void TestTryParseExact_YearMinus1_o_null_CurrentCultureIsUsed()
23002330
Thread.CurrentThread.CurrentCulture =
23012331
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
23022332
new LegacyJapaneseCultureInfo();
2333+
2334+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2335+
{
2336+
Assert.Ignore( "This platform does not support custom culture correctly." );
2337+
}
2338+
23032339
Timestamp result;
23042340
Assert.That(
23052341
Timestamp.TryParseExact(
@@ -2371,6 +2407,12 @@ public void TestParseExact_YearMinus1_s_null_CurrentCultureIsUsed()
23712407
Thread.CurrentThread.CurrentCulture =
23722408
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
23732409
new LegacyJapaneseCultureInfo();
2410+
2411+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2412+
{
2413+
Assert.Ignore( "This platform does not support custom culture correctly." );
2414+
}
2415+
23742416
Assert.That(
23752417
Timestamp.ParseExact(
23762418
"|0001-03-01T00:00:00Z",
@@ -2404,6 +2446,12 @@ public void TestTryParseExact_YearMinus1_s_null_CurrentCultureIsUsed()
24042446
Thread.CurrentThread.CurrentCulture =
24052447
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
24062448
new LegacyJapaneseCultureInfo();
2449+
2450+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
2451+
{
2452+
Assert.Ignore( "This platform does not support custom culture correctly." );
2453+
}
2454+
24072455
Timestamp result;
24082456
Assert.That(
24092457
Timestamp.TryParseExact(

test/MsgPack.UnitTest/TimestampTest.Parse.tt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ foreach ( var @case in
316316
Thread.CurrentThread.CurrentCulture =
317317
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
318318
new LegacyJapaneseCultureInfo();
319+
320+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
321+
{
322+
Assert.Ignore( "This platform does not support custom culture correctly." );
323+
}
324+
319325
Assert.That(
320326
Timestamp.ParseExact(
321327
"<#= variation.Value #>",
@@ -349,6 +355,12 @@ foreach ( var @case in
349355
Thread.CurrentThread.CurrentCulture =
350356
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
351357
new LegacyJapaneseCultureInfo();
358+
359+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
360+
{
361+
Assert.Ignore( "This platform does not support custom culture correctly." );
362+
}
363+
352364
Timestamp result;
353365
Assert.That(
354366
Timestamp.TryParseExact(

test/MsgPack.UnitTest/TimestampTest.ToString.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,12 @@ public void TestToString_String_IFormatProvider_Distinguishable_o_null_CurrentCu
688688
Thread.CurrentThread.CurrentCulture =
689689
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
690690
new LegacyJapaneseCultureInfo();
691+
692+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
693+
{
694+
Assert.Ignore( "This platform does not support custom culture correctly." );
695+
}
696+
691697
Assert.That(
692698
new Timestamp(
693699
-23215049511,
@@ -735,6 +741,12 @@ public void TestToString_String_IFormatProvider_Distinguishable_s_null_CurrentCu
735741
Thread.CurrentThread.CurrentCulture =
736742
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
737743
new LegacyJapaneseCultureInfo();
744+
745+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
746+
{
747+
Assert.Ignore( "This platform does not support custom culture correctly." );
748+
}
749+
738750
Assert.That(
739751
new Timestamp(
740752
-23215049511,
@@ -782,6 +794,12 @@ public void TestToString_String_IFormatProvider_YearMinus1_o_null_CurrentCulture
782794
Thread.CurrentThread.CurrentCulture =
783795
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
784796
new LegacyJapaneseCultureInfo();
797+
798+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
799+
{
800+
Assert.Ignore( "This platform does not support custom culture correctly." );
801+
}
802+
785803
Assert.That(
786804
new Timestamp(
787805
-62193657600,
@@ -829,6 +847,12 @@ public void TestToString_String_IFormatProvider_YearMinus1_s_null_CurrentCulture
829847
Thread.CurrentThread.CurrentCulture =
830848
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
831849
new LegacyJapaneseCultureInfo();
850+
851+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
852+
{
853+
Assert.Ignore( "This platform does not support custom culture correctly." );
854+
}
855+
832856
Assert.That(
833857
new Timestamp(
834858
-62193657600,
@@ -889,6 +913,12 @@ public void TestToString_AsOFormatAndNullIFormatProvider()
889913
Thread.CurrentThread.CurrentCulture =
890914
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
891915
new LegacyJapaneseCultureInfo();
916+
917+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
918+
{
919+
Assert.Ignore( "This platform does not support custom culture correctly." );
920+
}
921+
892922
Assert.That(
893923
new Timestamp(
894924
-62193657600,
@@ -936,6 +966,12 @@ public void TestToString_String_AsNullIFormatProvider()
936966
Thread.CurrentThread.CurrentCulture =
937967
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
938968
new LegacyJapaneseCultureInfo();
969+
970+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
971+
{
972+
Assert.Ignore( "This platform does not support custom culture correctly." );
973+
}
974+
939975
Assert.That(
940976
new Timestamp(
941977
-62193657600,

test/MsgPack.UnitTest/TimestampTest.ToString.tt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ foreach ( var @case in
179179
Thread.CurrentThread.CurrentCulture =
180180
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
181181
new LegacyJapaneseCultureInfo();
182+
183+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
184+
{
185+
Assert.Ignore( "This platform does not support custom culture correctly." );
186+
}
187+
182188
Assert.That(
183189
new Timestamp(
184190
<#= @case.Seconds #>,
@@ -245,6 +251,12 @@ foreach ( var @case in
245251
Thread.CurrentThread.CurrentCulture =
246252
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
247253
new LegacyJapaneseCultureInfo();
254+
255+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
256+
{
257+
Assert.Ignore( "This platform does not support custom culture correctly." );
258+
}
259+
248260
Assert.That(
249261
new Timestamp(
250262
<#= StandardTestCases[ "YearMinus1" ].Seconds #>,
@@ -292,6 +304,12 @@ foreach ( var @case in
292304
Thread.CurrentThread.CurrentCulture =
293305
#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP
294306
new LegacyJapaneseCultureInfo();
307+
308+
if ( !( CultureInfo.CurrentCulture is LegacyJapaneseCultureInfo ) || CultureInfo.CurrentCulture.NumberFormat.NegativeSign != "\uFF0D" )
309+
{
310+
Assert.Ignore( "This platform does not support custom culture correctly." );
311+
}
312+
295313
Assert.That(
296314
new Timestamp(
297315
<#= StandardTestCases[ "YearMinus1" ].Seconds #>,

0 commit comments

Comments
 (0)