Closed Rans4ckeR closed 3 months ago
Using ValueTask return type causes a test to always succeed. It seems the ValueTask is not awaited.
Using Task this test correctly fails:
Task
[TestClass] public sealed class TestClassX { [TestMethod] public async Task TestMethodY() { await ValueTask.CompletedTask; Assert.Fail(); } }
Using ValueTask this same test succeeds:
ValueTask
[TestClass] public sealed class TestClassX { [TestMethod] public async ValueTask TestMethodY() { await ValueTask.CompletedTask; Assert.Fail(); } }
MSTest.Sdk/3.4.3
Hi @Rans4cker!
THanks for the bug report, I can reproduce the issue. We will work on a fix soon.
Describe the bug
Using ValueTask return type causes a test to always succeed. It seems the ValueTask is not awaited.
Steps To Reproduce
Using
Task
this test correctly fails:Using
ValueTask
this same test succeeds:Additional context
MSTest.Sdk/3.4.3