-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
For all failed tests the message should be added to the output. The junit XML format contains the following information for failures:
<testcase classname="ICSharpCode.Decompiler.Tests.PrettyTestRunner" name="LiftedOperators(UseRoslynLatest)" time="0.7345250">
<failure type="failure" message=" ...
 821 604 		}
 822 605 		public static long ReturnChainWithComputation(int? a, short? b, long? c, byte d)
 823 606 		{
 824 			//TODO: unnecessary casts
 825 			//return (a + 1) ?? (b + 2) ?? (c + 3) ?? (d + 4);
 826 607 			return 0L;
 827 608 		}
 828 609 	}
 829 	// dummy structure for testing custom operators
 830 610 	[StructLayout(LayoutKind.Sequential, Size = 1)]
 831 (-) 	public struct TS
 611 (+) 	public record struct TS
 832 612 	{
 833 		// unary
 834 613 		public static TS operator +(TS a)
 835 614 		{
 836 615 			throw null;
 837 616 		}
 838 617 		public static TS operator -(TS a)
 839 618 		{
 840 619 			throw null;
 841 620 		}
 ...
 894 672 		}
 895 673 		public static TS operator <<(TS a, int b)
 896 674 		{
 897 675 			throw null;
 898 676 		}
 899 677 		public static TS operator >>(TS a, int b)
 900 678 		{
 901 679 			throw null;
 902 680 		}
 903 		// comparisons
 904 - 		public static bool operator ==(TS a, TS b)
 905 - 		{
 906 - 			throw null;
 907 - 		}
 908 - 		public static bool operator !=(TS a, TS b)
 909 - 		{
 910 - 			throw null;
 911 - 		}
 912 681 		public static bool operator <(TS a, TS b)
 913 682 		{
 914 683 			throw null;
 915 684 		}
 916 685 		public static bool operator <=(TS a, TS b)
 917 686 		{
 918 687 			throw null;
 919 688 		}
 920 689 		public static bool operator >(TS a, TS b)
 921 690 		{
 922 691 			throw null;
 923 692 		}
 924 693 		public static bool operator >=(TS a, TS b)
 925 - 		{
 926 - 			throw null;
 927 - 		}
 928 - 		public override bool Equals(object obj)
 929 694 		{
 930 695 			throw null;
 931 696 		}
 932 697 		public override int GetHashCode()
 933 698 		{
 934 699 			throw null;
 935 700 		}
 936 701 	}
 937 702 }
">at ICSharpCode.Decompiler.Tests.Helpers.CodeAssert.AreEqual(String input1, String input2, String[] definedSymbols) in D:\a\ILSpy\ILSpy\ICSharpCode.Decompiler.Tests\Helpers\CodeAssert.cs:line 27
at ICSharpCode.Decompiler.Tests.Helpers.CodeAssert.FilesAreEqual(String fileName1, String fileName2, String[] definedSymbols) in D:\a\ILSpy\ILSpy\ICSharpCode.Decompiler.Tests\Helpers\CodeAssert.cs:line 19
at ICSharpCode.Decompiler.Tests.PrettyTestRunner.Run(String testName, AssemblerOptions asmOptions, CompilerOptions cscOptions, DecompilerSettings decompilerSettings) in D:\a\ILSpy\ILSpy\ICSharpCode.Decompiler.Tests\PrettyTestRunner.cs:line 747
at ICSharpCode.Decompiler.Tests.PrettyTestRunner.RunForLibrary(String testName, AssemblerOptions asmOptions, CompilerOptions cscOptions, DecompilerSettings decompilerSettings) in D:\a\ILSpy\ILSpy\ICSharpCode.Decompiler.Tests\PrettyTestRunner.cs:line 719
at ICSharpCode.Decompiler.Tests.PrettyTestRunner.LiftedOperators(CompilerOptions cscOptions) in D:\a\ILSpy\ILSpy\ICSharpCode.Decompiler.Tests\PrettyTestRunner.cs:line 320
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Execution.SimpleWorkItem.<>c__DisplayClass4_0.<PerformWork>b__0()
at NUnit.Framework.Internal.ContextUtils.<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _)</failure>
</testcase>Currently only the stack trace is added to the summary output, which is not very useful as it's almost always the same in our case. Adding the message and (even better) stdout/stderr would be a nice addition.
As for stdout/stderr, I don't think it's possible using the junit format as there is only one global system-out and system-err node.
Spaier, Dolton12, mohsenhatami96 and gstokkink
Metadata
Metadata
Assignees
Labels
No labels