Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit de35b8a

Browse files
authored
Merge pull request #28 from JuliaGraphs/sbromberger/julia-1.0
Fixes to work with Julia 1.0 / LG 1.0.0
2 parents c3ad880 + fc929b8 commit de35b8a

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

REQUIRE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
julia 0.7
2-
LightGraphs 0.13
1+
julia 1.0
2+
LightGraphs 1.0

src/SimpleWeightedGraphs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ using Markdown
66
using SparseArrays
77

88
import Base:
9-
convert, eltype, show, ==, Pair, Tuple, copy, length, start, next, done, issubset, zero
9+
convert, eltype, show, ==, Pair, Tuple, copy, length, issubset, zero
1010

1111
import LightGraphs:
1212
_NI, AbstractGraph, AbstractEdge, AbstractEdgeIter,

src/persistence.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ function loadswg_mult(io::IO)
8686
graphs = Dict{String,AbstractGraph}()
8787
while !eof(io)
8888
line = strip(chomp(readline(io)))
89-
if startswith(line, "#") || line == ""
90-
next
91-
else
89+
if !(startswith(line, "#") || line == "")
9290
header = _parse_header(line)
9391
g = _swg_read_one_graph(io, header)
9492
graphs[header.name] = g

test/runtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ testdir = dirname(@__FILE__)
77
testgraphs(g) = [g, SimpleWeightedGraph{UInt8,Float64}(g), SimpleWeightedGraph{Int16,Float32}(g)]
88
testdigraphs(g) = [g, SimpleWeightedDiGraph{UInt8,Float64}(g), SimpleWeightedDiGraph{Int16,Float32}(g)]
99

10+
testsimplegraphs(g) = [g, LightGraphs.SimpleGraph{UInt8}(g), LightGraphs.SimpleGraph{Int16}(g)]
11+
testsimpledigraphs(g) = [g, LightGraphs.SimpleDiGraph{UInt8}(g), LightGraphs.SimpleDiGraph{Int16}(g)]
12+
1013
tests = [
1114
"simpleweightededge",
1215
"simpleweightedgraph",

test/simpleweightedgraph.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,12 @@ using SimpleWeightedGraphs
185185
@test sum(weights(g)) == ne(g) * 4.0
186186

187187
gx = Graph(4,3)
188-
for g in testgraphs(gx)
188+
for g in testsimplegraphs(gx)
189189
@test eltype(SimpleWeightedGraph(g)) == eltype(g)
190190
end
191191

192192
gx = DiGraph(4,3)
193-
for g in testdigraphs(gx)
193+
for g in testsimpledigraphs(gx)
194194
@test eltype(SimpleWeightedGraph(g)) == eltype(g)
195195
end
196196

0 commit comments

Comments
 (0)