Skip to content

Commit

Permalink
fix: new integration tests results
Browse files Browse the repository at this point in the history
  • Loading branch information
dupdob committed Nov 22, 2024
1 parent 1736132 commit bfec606
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public async Task CSharp_NetCore_SingleTestProject()

var report = await JsonReportSerialization.DeserializeJsonReportAsync(strykerRunOutput);

CheckReportMutants(report, total: 601, ignored: 247, survived: 4, killed: 9, timeout: 2, nocoverage: 308);
CheckReportMutants(report, total: 606, ignored: 252, survived: 4, killed: 9, timeout: 2, nocoverage: 308);
CheckReportTestCounts(report, total: 11);
}

Expand Down Expand Up @@ -141,7 +141,7 @@ public async Task CSharp_NetCore_SolutionRun()

var report = await JsonReportSerialization.DeserializeJsonReportAsync(strykerRunOutput);

CheckReportMutants(report, total: 601, ignored: 247, survived: 4, killed: 9, timeout: 2, nocoverage: 308);
CheckReportMutants(report, total: 606, ignored: 252, survived: 4, killed: 9, timeout: 2, nocoverage: 308);
CheckReportTestCounts(report, total: 23);
}

Expand Down
12 changes: 8 additions & 4 deletions src/Stryker.Core/Stryker.Core/Helpers/RoslynHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Expand Down Expand Up @@ -71,8 +72,8 @@ public static T WithCleanTrivia<T>(this T node) where T : SyntaxNode
/// <returns>a <paramref name="node"/> copy with some trivia from <paramref name="triviaSource"/>.</returns>
/// <remarks>Current implementation only applies whitespacetrivia (no comment, no attribute nor directives)</remarks>
public static T WithCleanTriviaFrom<T>(this T node, T triviaSource) where T: SyntaxNode
=> node.WithLeadingTrivia(triviaSource.GetLeadingTrivia().Where(t=>t.IsKind(SyntaxKind.WhitespaceTrivia)))
.WithTrailingTrivia(triviaSource.GetTrailingTrivia().Where(t=>t.IsKind(SyntaxKind.WhitespaceTrivia)));
=> node.WithLeadingTrivia(CleanupTrivia(triviaSource.GetLeadingTrivia()))
.WithTrailingTrivia(CleanupTrivia(triviaSource.GetTrailingTrivia()));

/// <summary>
/// Inject cleaned up trivia from another syntax node.
Expand All @@ -82,8 +83,11 @@ public static T WithCleanTriviaFrom<T>(this T node, T triviaSource) where T: Syn
/// <returns>a <paramref name="node"/> copy with some trivia from <paramref name="triviaSource"/>.</returns>
/// <remarks>Current implementation only applies whitespacetrivia (no comment, no attribute nor directives)</remarks>
public static SyntaxToken WithCleanTriviaFrom(this SyntaxToken token, SyntaxToken triviaSource)
=> token.WithLeadingTrivia(triviaSource.LeadingTrivia.Where(t=>t.IsKind(SyntaxKind.WhitespaceTrivia)))
.WithTrailingTrivia(triviaSource.TrailingTrivia.Where(t=>t.IsKind(SyntaxKind.WhitespaceTrivia)));
=> token.WithLeadingTrivia(CleanupTrivia(triviaSource.LeadingTrivia))
.WithTrailingTrivia(CleanupTrivia(triviaSource.TrailingTrivia));

private static IEnumerable<SyntaxTrivia> CleanupTrivia(SyntaxTriviaList list)
=> list.Where(t=>t.IsKind(SyntaxKind.WhitespaceTrivia) || t.IsKind(SyntaxKind.EndOfLineTrivia));

/// <summary>
/// Gets the return 'type' of a (get/set) accessor
Expand Down

0 comments on commit bfec606

Please sign in to comment.