Skip to content

Commit 04e05a6

Browse files
juliohmsbromberger
authored andcommitted
Use Base.Test instead of FactCheck (#42)
1 parent 31ab8e0 commit 04e05a6

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

test/REQUIRE

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/runtests.jl

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using FactCheck
21
using GraphPlot
32
using LightGraphs
43
using Colors
54
using Compose
5+
using Base.Test
66

77
g = graphfamous("karate")
88
h = LightGraphs.WheelGraph(10)
@@ -11,29 +11,28 @@ nodelabel = collect(1:nv(g))
1111
nodesize = outdegree(g) .* 1.0
1212

1313
cachedout = joinpath(Pkg.dir("GraphPlot"), "test", "examples")
14-
facts("karate network (undirected), nodesize is proportion to its degree") do
14+
15+
@testset "Undirected Karate Net" begin
1516
filename = joinpath(cachedout, "karate_different_nodesize.svg")
1617
draw(SVG(filename, 8inch, 8inch), gplot(g, nodesize=nodesize.^0.3, nodelabel=nodelabel, nodelabelsize=nodesize.^0.3))
1718
end
1819

19-
facts("karate network as directed") do
20-
FactCheck.context("straight line edge") do
21-
filename = joinpath(cachedout, "karate_straight_directed.svg")
22-
draw(SVG(filename, 10inch, 10inch), gplot(g, arrowlengthfrac=0.02, nodelabel=nodelabel))
23-
end
20+
@testset "Directed Karate Net" begin
21+
filename = joinpath(cachedout, "karate_straight_directed.svg")
22+
draw(SVG(filename, 10inch, 10inch), gplot(g, arrowlengthfrac=0.02, nodelabel=nodelabel))
2423
end
2524

26-
facts("Nodes in different memberships have different colors (karate network)") do
25+
@testset "Membership" begin
2726
# nodes membership
28-
membership = [1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,1,1,2,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2]
29-
nodecolor = [colorant"lightseagreen", colorant"orange"]
30-
# membership color
31-
nodefillc = nodecolor[membership]
27+
membership = [1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,1,1,2,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2]
28+
nodecolor = [colorant"lightseagreen", colorant"orange"]
29+
# membership color
30+
nodefillc = nodecolor[membership]
3231
filename = joinpath(cachedout, "karate_groups.svg")
3332
draw(SVG(filename, 8inch, 8inch), gplot(g, nodelabel=nodelabel, nodefillc=nodefillc))
3433
end
3534

36-
facts("LightGraphs test") do
35+
@testset "WheelGraph" begin
3736
filename = joinpath(cachedout, "LightGraphs_wheel10.svg")
3837
draw(SVG(filename, 8inch, 8inch), gplot(h))
3938
end

0 commit comments

Comments
 (0)