Skip to content

Commit af28a4f

Browse files
Revert the error thrown by badj to NotImplementedError (#262)
1 parent 6756864 commit af28a4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/SimpleGraphs/SimpleGraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ edges(g::AbstractSimpleGraph) = SimpleEdgeIter(g)
142142
fadj(g::AbstractSimpleGraph) = g.fadjlist
143143
fadj(g::AbstractSimpleGraph, v::Integer) = g.fadjlist[v]
144144

145-
function badj end
145+
badj(x...) = _NI("badj")
146146

147147
# handles single-argument edge constructors such as pairs and tuples
148148
has_edge(g::AbstractSimpleGraph, x) = has_edge(g, edgetype(g)(x))

test/simplegraphs/simplegraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using Random: Random
99
@test @inferred(eltype(SimpleGraph(adjmx1))) == Int
1010
@test_throws ArgumentError SimpleGraph(adjmx2)
1111

12-
@test_throws MethodError badj(DummySimpleGraph())
12+
@test_throws Graphs.NotImplementedError badj(DummySimpleGraph())
1313

1414
@test @inferred(ne(SimpleGraph(path_digraph(5)))) == 4
1515
@test @inferred(!is_directed(SimpleGraph))

0 commit comments

Comments
 (0)