Skip to content

Commit

Permalink
Fix expression to work with Unity 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Nov 4, 2024
1 parent c57005f commit 057ae32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Runtime/Reporters/JUnitXmlReporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ public override async UniTask PostReportAsync(string message, string stackTrace,

internal static string GetOutputPath(string outputPathField, Arguments args = null)
{
args ??= new Arguments();
if (args==null)
{
args = new Arguments();
}

string path;
if (args.JUnitReportPath.IsCaptured())
Expand Down
2 changes: 1 addition & 1 deletion Tests/Runtime/Reporters/JUnitXmlReporterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public async Task PostReportAsync_Error()
await sut.PostReportAsync("MESSAGE", "STACK TRACE", ExitCode.UnCatchExceptions);
Assert.That(outputPath, Does.Exist);

var actual = await File.ReadAllTextAsync(outputPath);
var actual = File.ReadAllText(outputPath);
var expected = @"<?xml version=""1.0"" encoding=""utf-8""?>
<testsuites name=""DeNA.Anjin""
disabled=""0""
Expand Down

0 comments on commit 057ae32

Please sign in to comment.