-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for running xunit systematic tests from cli (#481)
- Loading branch information
Showing
25 changed files
with
355 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using Microsoft.Coyote.Logging; | ||
|
||
namespace Microsoft.Coyote.SystematicTesting.Frameworks | ||
{ | ||
/// <summary> | ||
/// Logs all test output to the installed <see cref="ILogger"/>. | ||
/// </summary> | ||
internal interface ITestLog | ||
{ | ||
/// <summary> | ||
/// Logs messages using the installed <see cref="ILogger"/>. | ||
/// </summary> | ||
LogWriter LogWriter { get; set; } | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
Source/Test/SystematicTesting/Frameworks/Xunit/TestOutput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using Microsoft.Coyote.Logging; | ||
using Xunit.Abstractions; | ||
|
||
namespace Microsoft.Coyote.SystematicTesting.Frameworks.XUnit | ||
{ | ||
/// <summary> | ||
/// Redirects all xUnit test output to the installed <see cref="ILogger"/>. | ||
/// </summary> | ||
internal sealed class TestOutput : ITestOutputHelper, ITestLog | ||
{ | ||
/// <summary> | ||
/// Logs messages using the installed <see cref="ILogger"/>. | ||
/// </summary> | ||
public LogWriter LogWriter { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public void WriteLine(string message) | ||
{ | ||
this.LogWriter.WriteLine(message); | ||
} | ||
|
||
/// <inheritdoc/> | ||
public void WriteLine(string format, params object[] args) | ||
{ | ||
this.LogWriter.WriteLine(format, args); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.