Skip to content

Commit fdb485d

Browse files
cleanup
1 parent 772fc42 commit fdb485d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/GNNGraphs/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function check_num_nodes(g::GNNGraph, x::AbstractArray)
2-
@assert g.num_nodes == size(x, ndims(x)) "Got $(size(x, ndims(x))) as last dimension size instead of num_edges=$(g.num_nodes)"
2+
@assert g.num_nodes == size(x, ndims(x)) "Got $(size(x, ndims(x))) as last dimension size instead of num_nodes=$(g.num_nodes)"
33
return true
44
end
55
function check_num_nodes(g::GNNGraph, x::Union{Tuple,NamedTuple})

test/msgpass.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,12 @@
138138
end
139139

140140
@testset "aggregate_neighbors" begin
141-
m = rand(2, g.num_edges-1)
142-
@test_throws AssertionError aggregate_neighbors(g, +, m)
141+
@testset "sizecheck" begin
142+
m = rand(2, g.num_edges-1)
143+
@test_throws AssertionError aggregate_neighbors(g, +, m)
143144

144-
m = (a=rand(2, g.num_edges+1), b=nothing)
145-
@test_throws AssertionError aggregate_neighbors(g, +, m)
145+
m = (a=rand(2, g.num_edges+1), b=nothing)
146+
@test_throws AssertionError aggregate_neighbors(g, +, m)
147+
end
146148
end
147149
end

0 commit comments

Comments
 (0)