diff --git a/UnitTests/ViewTests.cs b/UnitTests/ViewTests.cs index 12335a3a4..9dd570375 100644 --- a/UnitTests/ViewTests.cs +++ b/UnitTests/ViewTests.cs @@ -911,12 +911,21 @@ namespace Terminal.Gui { int count = 0, count1 = 0, count2 = 0; bool log = false, log1 = false, log2 = false; + bool fromTopStillKnowFirstIsRunning = false; + bool fromTopStillKnowSecondIsRunning = false; + bool fromFirstStillKnowSecondIsRunning = false; Application.MainLoop.AddTimeout (TimeSpan.FromMilliseconds (100), (_) => { count++; if (count1 == 5) { log1 = true; } + if (count1 > 13 && count < 15) { + fromTopStillKnowFirstIsRunning = true; + } + if (count2 > 6 && count2 < 8) { + fromTopStillKnowSecondIsRunning = true; + } if (count == 30) { Assert.Equal (30, count); Assert.Equal (20, count1); @@ -926,6 +935,10 @@ namespace Terminal.Gui { Assert.True (log1); Assert.True (log2); + Assert.True (fromTopStillKnowFirstIsRunning); + Assert.True (fromTopStillKnowSecondIsRunning); + Assert.True (fromFirstStillKnowSecondIsRunning); + Application.RequestStop (); return false; } @@ -949,6 +962,9 @@ namespace Terminal.Gui { if (count2 == 5) { log2 = true; } + if (count2 > 3 && count2 < 5) { + fromFirstStillKnowSecondIsRunning = true; + } if (count1 == 20) { Assert.Equal (20, count1); Application.RequestStop ();