|
1 | | -using TreeDataStructures |
| 1 | +using BinaryTrees |
2 | 2 | using AbstractTrees |
3 | 3 | using Test |
4 | 4 |
|
5 | | -@testset "TreeDataStructures.jl" begin |
| 5 | +@testset "BinaryTrees.jl" begin |
6 | 6 | @testset "AVLTree" begin |
7 | 7 | # insert |
8 | 8 | tree = AVLTree{Int,Int}() |
@@ -179,19 +179,14 @@ using Test |
179 | 179 | tree[4] = 40 |
180 | 180 | tree[1] = 10 |
181 | 181 | tree[5] = 50 |
182 | | - root = tree.root |
183 | | - @test children(root) === (root.left, root.right) |
184 | | - @test children(root.left) === (root.left.left,) |
185 | | - @test children(root.right) === (root.right.right,) |
186 | | - @test children(root.left.left) === () |
187 | | - @test children(root.right.right) === () |
188 | | - @test nodevalue(root) == 30 |
189 | | - @test nodevalue(root.left) == 20 |
190 | | - @test nodevalue(root.right) == 40 |
191 | | - @test nodevalue(root.left.left) == 10 |
192 | | - @test nodevalue(root.right.right) == 50 |
193 | | - @test NodeType(root) === HasNodeType() |
194 | | - @test nodetype(root) === typeof(root) |
| 182 | + @test children(tree.root) === (tree.root.left, tree.root.right) |
| 183 | + @test children(tree.root.left) === (tree.root.left.left,) |
| 184 | + @test children(tree.root.right) === (tree.root.right.right,) |
| 185 | + @test children(tree.root.left.left) === () |
| 186 | + @test children(tree.root.right.right) === () |
| 187 | + @test nodevalue(tree.root) === tree.root |
| 188 | + @test NodeType(tree.root) === HasNodeType() |
| 189 | + @test nodetype(tree.root) === typeof(tree.root) |
195 | 190 |
|
196 | 191 | # show |
197 | 192 | tree = AVLTree{Int,Int}() |
|
0 commit comments