зеркало из https://github.com/dotnet/winforms.git
Move NoAssertContext to Core test utilities (#12621)
This will allow it to be used in WPF as well.
This commit is contained in:
Родитель
0773d890f7
Коммит
516ddf1f87
|
@ -1,5 +1,6 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
global using System.Diagnostics;
|
||||
global using System.Diagnostics.CodeAnalysis;
|
||||
global using Xunit;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace System;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace System;
|
|
@ -1,8 +1,6 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System;
|
||||
|
||||
public sealed class ThrowingTraceListener : TraceListener
|
||||
|
@ -12,8 +10,9 @@ public sealed class ThrowingTraceListener : TraceListener
|
|||
public override void Fail(string? message, string? detailMessage)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
(string.IsNullOrEmpty(message) ? "Assertion failed" : message) +
|
||||
(string.IsNullOrEmpty(detailMessage) ? "" : Environment.NewLine + detailMessage));
|
||||
$"{(string.IsNullOrEmpty(message) ? "Assertion failed" : message)}{(string.IsNullOrEmpty(detailMessage)
|
||||
? ""
|
||||
: $"{Environment.NewLine}{detailMessage}")}");
|
||||
}
|
||||
|
||||
public override void Write(object? o)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
global using System.Diagnostics;
|
||||
global using System.Diagnostics.CodeAnalysis;
|
||||
global using Windows.Win32;
|
||||
global using Windows.Win32.Foundation;
|
||||
|
|
Загрузка…
Ссылка в новой задаче