Skip to content

Commit ad6fb1f

Browse files
committed
Improve debuggability of tests.
1 parent 1f890e0 commit ad6fb1f

13 files changed

Lines changed: 27 additions & 27 deletions

test/MsgPack.UnitTest.CodeDom/Serialization/ArrayCodeDomBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12616,12 +12616,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1261612616
#if MSTEST
1261712617
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1261812618
{
12619-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12619+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262012620
}
1262112621
#else
1262212622
catch( AssertionException ae )
1262312623
{
12624-
throw new AssertionException( i.ToString(), ae );
12624+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262512625
}
1262612626
#endif
1262712627
}

test/MsgPack.UnitTest.CodeDom/Serialization/MapCodeDomBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12622,12 +12622,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1262212622
#if MSTEST
1262312623
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1262412624
{
12625-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12625+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262612626
}
1262712627
#else
1262812628
catch( AssertionException ae )
1262912629
{
12630-
throw new AssertionException( i.ToString(), ae );
12630+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1263112631
}
1263212632
#endif
1263312633
}

test/MsgPack.UnitTest/Serialization/ArrayContextBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12616,12 +12616,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1261612616
#if MSTEST
1261712617
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1261812618
{
12619-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12619+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262012620
}
1262112621
#else
1262212622
catch( AssertionException ae )
1262312623
{
12624-
throw new AssertionException( i.ToString(), ae );
12624+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262512625
}
1262612626
#endif
1262712627
}

test/MsgPack.UnitTest/Serialization/ArrayExpressionBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12616,12 +12616,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1261612616
#if MSTEST
1261712617
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1261812618
{
12619-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12619+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262012620
}
1262112621
#else
1262212622
catch( AssertionException ae )
1262312623
{
12624-
throw new AssertionException( i.ToString(), ae );
12624+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262512625
}
1262612626
#endif
1262712627
}

test/MsgPack.UnitTest/Serialization/ArrayFieldBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12616,12 +12616,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1261612616
#if MSTEST
1261712617
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1261812618
{
12619-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12619+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262012620
}
1262112621
#else
1262212622
catch( AssertionException ae )
1262312623
{
12624-
throw new AssertionException( i.ToString(), ae );
12624+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262512625
}
1262612626
#endif
1262712627
}

test/MsgPack.UnitTest/Serialization/ArrayGenerationBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11437,12 +11437,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1143711437
#if MSTEST
1143811438
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1143911439
{
11440-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
11440+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1144111441
}
1144211442
#else
1144311443
catch( AssertionException ae )
1144411444
{
11445-
throw new AssertionException( i.ToString(), ae );
11445+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1144611446
}
1144711447
#endif
1144811448
}

test/MsgPack.UnitTest/Serialization/ArrayReflectionBasedAutoMessagePackSerializerTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
namespace MsgPack.Serialization
6060
{
6161
[TestFixture]
62-
//[Timeout( 60000 )]
62+
[Timeout( 60000 )]
6363
public class ArrayReflectionBasedReflectionMessagePackSerializerTest
6464
{
6565
private static SerializationContext GetSerializationContext()
@@ -12616,12 +12616,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1261612616
#if MSTEST
1261712617
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1261812618
{
12619-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12619+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262012620
}
1262112621
#else
1262212622
catch( AssertionException ae )
1262312623
{
12624-
throw new AssertionException( i.ToString(), ae );
12624+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262512625
}
1262612626
#endif
1262712627
}

test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.ttinclude

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,12 @@ private void GenerateTypesCore( bool forIos )
410410
#if MSTEST
411411
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
412412
{
413-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
413+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
414414
}
415415
#else
416416
catch( AssertionException ae )
417417
{
418-
throw new AssertionException( i.ToString(), ae );
418+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
419419
}
420420
#endif
421421
}

test/MsgPack.UnitTest/Serialization/MapContextBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12622,12 +12622,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1262212622
#if MSTEST
1262312623
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1262412624
{
12625-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12625+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262612626
}
1262712627
#else
1262812628
catch( AssertionException ae )
1262912629
{
12630-
throw new AssertionException( i.ToString(), ae );
12630+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1263112631
}
1263212632
#endif
1263312633
}

test/MsgPack.UnitTest/Serialization/MapExpressionBasedAutoMessagePackSerializerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12622,12 +12622,12 @@ private void TestCoreWithVerifiable<T>( T[] value, SerializationContext context
1262212622
#if MSTEST
1262312623
catch( Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException ae )
1262412624
{
12625-
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( i.ToString(), ae );
12625+
throw new Microsoft.VisualStudio.TestPlatform.UnitTestFramework.AssertFailedException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1262612626
}
1262712627
#else
1262812628
catch( AssertionException ae )
1262912629
{
12630-
throw new AssertionException( i.ToString(), ae );
12630+
throw new AssertionException( String.Format( "[{0}]:{1}", i, ae.Message ), ae );
1263112631
}
1263212632
#endif
1263312633
}

0 commit comments

Comments
 (0)