Skip to content

Commit 30f093e

Browse files
committed
fix(knot-diagrams): resolve bitwise overflow and test syntax error
1 parent d66bb8d commit 30f093e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

KnotDiagrams/src/smoothing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Returns a vector of `(state, num_circles)` pairs.
6161
"""
6262
function enumerate_states(gc::GaussCode)
6363
n = gc.num_crossings
64-
total = 1 << n # 2^n
64+
total = UInt(1) << n # 2^n
6565
results = Vector{Tuple{UInt,Int}}(undef, total)
6666

6767
for s in UInt(0):UInt(total - 1)

KnotDiagrams/test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ using KnotDiagrams
202202
diagrams = prime_knots_up_to_7()
203203
for d in diagrams
204204
fd = fragment_distribution(d)
205-
@test fd.summary.classification == :spread "$(d.name) should be spread"
205+
@test fd.summary.classification == :spread
206206
end
207207
end
208208

0 commit comments

Comments
 (0)