From 0f3a4b313ceba60828dfb37741c210024d18c205 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Tue, 9 May 2023 22:34:37 -0400 Subject: [PATCH] Uncomment test that should always fail --- .../ThreadingTests.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/Avalonia.Headless.UnitTests/ThreadingTests.cs b/tests/Avalonia.Headless.UnitTests/ThreadingTests.cs index 109f2ae981..403ff84f2c 100644 --- a/tests/Avalonia.Headless.UnitTests/ThreadingTests.cs +++ b/tests/Avalonia.Headless.UnitTests/ThreadingTests.cs @@ -16,14 +16,17 @@ public class ThreadingTests { Dispatcher.UIThread.VerifyAccess(); } - - // This test should always fail, uncomment to test if it fails. - // [AvaloniaFact] - // public void Should_Fail_Test_On_Delayed_Post_When_FlushDispatcher() - // { - // Dispatcher.UIThread.Post(() => throw new InvalidOperationException(), DispatcherPriority.Default); - // } +#if NUNIT + [AvaloniaTest(Ignore = "This test should always fail, enable to test if it fails")] +#elif XUNIT + [AvaloniaFact(Skip = "This test should always fail, enable to test if it fails")] +#endif + public void Should_Fail_Test_On_Delayed_Post_When_FlushDispatcher() + { + Dispatcher.UIThread.Post(() => throw new InvalidOperationException(), DispatcherPriority.Default); + } + #if NUNIT [AvaloniaTheory, Timeout(10000), TestCase(1), TestCase(10), TestCase(100)] #elif XUNIT