-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Debug.Assert behavior to match xunit <2.0
- Loading branch information
Showing
4 changed files
with
52 additions
and
1 deletion.
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
File renamed without changes.
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,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Tests | ||
{ | ||
class TraceAssertListener : TraceListener | ||
{ | ||
public override void Fail( string message, string detailMessage ) | ||
{ | ||
throw new TraceAssertException( message, detailMessage ); | ||
} | ||
|
||
public override void Write( string message ) | ||
{ | ||
} | ||
|
||
public override void WriteLine( string message ) | ||
{ | ||
} | ||
} | ||
|
||
class TraceAssertException : Exception | ||
{ | ||
public string AssertMessage { get; private set; } | ||
public string AssertDetailedMessage { get; private set; } | ||
|
||
|
||
public TraceAssertException( string message, string detailMessage ) | ||
{ | ||
AssertMessage = message; | ||
AssertDetailedMessage = detailMessage; | ||
} | ||
} | ||
} |
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