blog/static/files/algorithms/rb-trees/avl/test/AVL.cs
Matej Focko f46561653f
algorithms(avl): add WIP
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-02-04 13:58:41 +01:00

24 lines
422 B
C#

namespace avl.test;
public class AVL {
[Fact]
public void EmptyTree() {
var t = new AVL<int>();
Assert.Equal(0, t.Count);
for (int i = 0; i < 10; ++i) {
Assert.False(t.Contains(i));
}
}
[Fact]
public void OneNode() {
var t = new AVL<int> {
123
};
Assert.Equal(1, t.Count);
Assert.True(t.Contains(1));
}
}