make assertions more debug friendly
This commit is contained in:
parent
2e4570a560
commit
fd88bde403
|
|
@ -1,9 +1,12 @@
|
|||
global using static SimpleHttpServer.GlobalUsings;
|
||||
using SimpleHttpServer.Types.Exceptions;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace SimpleHttpServer;
|
||||
internal static class GlobalUsings {
|
||||
|
||||
[DebuggerHidden]
|
||||
internal static void Assert([DoesNotReturnIf(false)] bool b, string? message = null) {
|
||||
if (!b) {
|
||||
if (message == null)
|
||||
|
|
@ -13,5 +16,6 @@ internal static class GlobalUsings {
|
|||
}
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
internal static void AssertImplies(bool x, bool y, string? message = null) => Assert(!x || y, message);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user