Skip to content

Commit e233f14

Browse files
committed
Show points for failed tests
1 parent 11bb8b1 commit e233f14

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

API/API.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<Authors>TestMyCode</Authors>
1313
<RepositoryUrl>https://github.com/TMC-CSharp/tmc-csharp-runner.git</RepositoryUrl>
1414
<RepositoryType>git</RepositoryType>
15-
<Version>1.1</Version>
15+
<Version>1.1.1</Version>
1616
</PropertyGroup>
1717
</Project>

Bootstrap/Bootstrap.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<Authors>TestMyCode</Authors>
1414
<RepositoryUrl>https://github.com/TMC-CSharp/tmc-csharp-runner.git</RepositoryUrl>
1515
<RepositoryType>git</RepositoryType>
16-
<Version>1.1</Version>
16+
<Version>1.1.1</Version>
1717
</PropertyGroup>
1818

1919
<ItemGroup>

Core/Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Authors>TestMyCode</Authors>
1313
<RepositoryUrl>https://github.com/TMC-CSharp/tmc-csharp-runner.git</RepositoryUrl>
1414
<RepositoryType>git</RepositoryType>
15-
<Version>1.1</Version>
15+
<Version>1.1.1</Version>
1616
</PropertyGroup>
1717

1818
<ItemGroup>

Core/Test/MethodTestResult.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,16 @@ internal static MethodTestResult FromSuccess(TestPassedInfo info, HashSet<string
3636
};
3737
}
3838

39-
internal static MethodTestResult FromFail(TestFailedInfo info)
39+
internal static MethodTestResult FromFail(TestFailedInfo info, HashSet<string>? points = default)
4040
{
4141
return new MethodTestResult()
4242
{
4343
Passed = false,
4444

4545
Name = info.TestDisplayName,
46+
47+
Points = points ?? MethodTestResult.EMPTY_HASH_SET,
48+
4649
Message = info.ExceptionMessage,
4750

4851
ErrorStackTrace = StackTraceToList(info.ExceptionStackTrace)

Core/Test/ProjectTestRunner.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public void RunAssemblyTests(Assembly assembly)
4141

4242
runner.OnTestFailed += info =>
4343
{
44-
this.AddTestResult(MethodTestResult.FromFail(info));
44+
this.ProjectData.Points.TryGetValue(info.TestDisplayName, out HashSet<string>? points);
45+
46+
this.AddTestResult(MethodTestResult.FromFail(info, points));
4547
};
4648

4749
runner.OnTestPassed += info =>

0 commit comments

Comments
 (0)