Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use SHA.jl instead of MD5.jl for testing #285

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ xrootdgo_jll = "^0.32.1"
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
MD5 = "6ac74813-4b46-53a4-afec-0b5dc9d7885c"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Pkg", "MD5", "InteractiveUtils", "Arrow", "DataFrames"]
test = ["Test", "Pkg", "SHA", "InteractiveUtils", "Arrow", "DataFrames"]
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Test
using UnROOT, LorentzVectors
using StaticArrays
using InteractiveUtils
using MD5, DataFrames
using DataFrames, SHA

const nthreads = UnROOT._maxthreadid()
nthreads == 1 && @warn "Running on a single thread. Please re-run the test suite with at least two threads (`julia --threads 2 ...`)"
Expand Down Expand Up @@ -136,10 +136,10 @@ end
end

@testset "readbasketsraw()" begin
array_md5 = [0xb4, 0xe9, 0x32, 0xe8, 0xfb, 0xff, 0xcf, 0xa0, 0xda, 0x75, 0xe0, 0x25, 0x34, 0x9b, 0xcd, 0xdf]
rootfile = ROOTFile(joinpath(SAMPLES_DIR, "km3net_online.root"))
array_sha1 = [0x45, 0xab, 0x2c, 0x2a, 0x68, 0x17, 0x1d, 0x32, 0x3b, 0x25, 0x1f, 0x39, 0x01, 0xbe, 0xb7, 0xf3, 0xc9, 0xbf, 0xd3, 0xd6]
rootfile = UnROOT.samplefile("km3net_online.root")
data, offsets = UnROOT.array(rootfile, "KM3NET_EVENT/KM3NET_EVENT/snapshotHits"; raw=true)
@test array_md5 == md5(data)
@test array_sha1 == sha1(data)
close(rootfile)

rootfile = ROOTFile(joinpath(SAMPLES_DIR, "tree_with_jagged_array.root"))
Expand Down
Loading