Fix MultiRootInheritanceGraph not detecting circular inheritance (#5672)

* Fix

* This is better!

* Fixes
This commit is contained in:
beck-thompson
2025-02-22 13:08:31 -08:00
committed by GitHub
parent 685d002bb7
commit 11b24579a2
2 changed files with 10 additions and 0 deletions

View File

@@ -104,4 +104,11 @@ public sealed class MultiRootGraphTest
Assert.Throws<InvalidOperationException>(() => graph.Add(Id3, new[] { Id1 }));
}
[Test]
public void IsOwnParentTest()
{
var graph = new MultiRootInheritanceGraph<string>();
Assert.Throws<InvalidOperationException>(() => graph.Add(Id1, new []{ Id1 }));
}
}