Skip to content

Commit dff9ce1

Browse files
committed
test for adj mat
1 parent cbbe55a commit dff9ce1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SQLiteGraph"
22
uuid = "de2defd0-d76e-464a-9029-1d71e199ae58"
33
authors = ["joshday <[email protected]> and contributors"]
4-
version = "0.2.1"
4+
version = "0.2.2"
55

66
[deps]
77
DBInterface = "a10d1c49-ce27-4219-8d33-6db1a4562965"

Diff for: test/runtests.jl

+10
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,14 @@ end
6060
@test length(collect(db[:,:,"type"])) == 2
6161
@test length(collect(db[:,:,:])) == 3
6262
end
63+
@testset "Adj Matrix" begin
64+
m = SQLiteGraph.adjacency_matrix(db, "type")
65+
@test sum(m) == 2
66+
@test m[1, 2]
67+
@test m[1, 3]
68+
69+
m2 = SQLiteGraph.adjacency_matrix(db, "type 2")
70+
@test sum(m2) == 1
71+
@test m2[1, 4]
72+
end
6373
end

0 commit comments

Comments
 (0)