Skip to content

Commit

Permalink
new BitStr(vec_or_tuple) constructor (#44)
Browse files Browse the repository at this point in the history
* update

* fix nightly ci

* rm fix =true
  • Loading branch information
GiggleLiu authored Jul 15, 2022
1 parent 6b6964c commit 70293b6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/BitStr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const BitStr{N,T} = DitStr{2,N,T}
const BitStr64{N} = BitStr{N,Int64}
const LongBitStr{N} = BitStr{N,BigInt}
const BitStr{N}(x::T) where {N,T<:IntStorage} = DitStr{2,N}(x)
const BitStr(x::Union{Vector,Tuple}) = DitStr{2}(x)

# only for bitstr
for op in [:(>>), :(<<)]
Expand Down
1 change: 1 addition & 0 deletions test/BitStr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ using Test, BitBasis
Int64,
"10101010101010101010101010101010010101010101"^10,
)
@test BitStr([0, 0, 1, 1]) == bit"1100"
end

@testset "operations" begin
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ end
end

DocMeta.setdocmeta!(BitBasis, :DocTestSetup, :(using BitBasis); recursive=true)

Documenter.doctest(BitBasis; manual=false)

0 comments on commit 70293b6

Please sign in to comment.