Skip to content

Commit f6633ac

Browse files
committed
Add flaky test for inferred length in doc string
The parameter used for inferring the length is not deterministic because of the non-determinism of hash set. This leads to changing logic between builds, shown by this flaky test.
1 parent 43051dd commit f6633ac

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

MKL.NET.WrapperGenerator.Tests/GeneratorTest.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ public static unsafe extern void dummy(int M, int N,
4949

5050
generatorResult.Generator.Should().BeSameAs(generator);
5151
generatorResult.Diagnostics.Should().BeEmpty();
52-
generatorResult.GeneratedSources.Should().HaveCount(1);
52+
generatorResult.GeneratedSources.Should().ContainSingle()
53+
.Which.SourceText.ToString().Should().Contain(
54+
"///<remarks>" +
55+
"This version infers the length parameter <c>N</c> from <paramref name=\"A\" />'s length.</remarks>");
5356
generatorResult.Exception.Should().BeNull();
5457
}
5558

0 commit comments

Comments
 (0)