Skip to content

Commit 1d5ba26

Browse files
committed
test: more coverage of interfaces
1 parent 59b26bc commit 1d5ba26

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

test/test_node_interface.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,26 @@
1010

1111
tree_branch_deg2 = x1 + sin(x2 * 3.5)
1212
tree_branch_deg1 = sin(x1)
13-
tree_leaf = x1
13+
tree_leaf_feature = x1
14+
tree_leaf_constant = Node{Float64}(; val=1.0)
1415
graph_tree_branch_deg2 = convert(GraphNode, tree_branch_deg2)
1516
graph_tree_branch_deg1 = convert(GraphNode, tree_branch_deg1)
16-
graph_tree_leaf = convert(GraphNode, tree_leaf)
17+
graph_tree_leaf_feature = convert(GraphNode, tree_leaf_feature)
18+
graph_tree_leaf_constant = convert(GraphNode, tree_leaf_constant)
1719

1820
@test Interfaces.test(
19-
NodeInterface, Node, [tree_branch_deg2, tree_branch_deg1, tree_leaf]
21+
NodeInterface,
22+
Node,
23+
[tree_branch_deg2, tree_branch_deg1, tree_leaf_feature, tree_leaf_constant],
2024
)
2125
@test Interfaces.test(
2226
NodeInterface,
2327
GraphNode,
24-
[graph_tree_branch_deg2, graph_tree_branch_deg1, graph_tree_leaf],
28+
[
29+
graph_tree_branch_deg2,
30+
graph_tree_branch_deg1,
31+
graph_tree_leaf_feature,
32+
graph_tree_leaf_constant,
33+
],
2534
)
2635
end

0 commit comments

Comments
 (0)