From 51e247bb627c2b73d3a4ad2a30b40f81b5ffcdca Mon Sep 17 00:00:00 2001 From: Simon Avery Date: Fri, 13 Oct 2023 14:45:59 -0700 Subject: [PATCH] Code coverage for checksum calculations --- test/runtests.jl | 1 + test/test_checksums.jl | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 test/test_checksums.jl diff --git a/test/runtests.jl b/test/runtests.jl index 33a292b..8b9a89f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,6 +12,7 @@ end include("test_api.jl") include("test_types.jl") +include("test_checksums.jl") include("test_SpdxAnnotation.jl") include("test_SpdxLicense.jl") include("test_SpdxRelationship.jl") diff --git a/test/test_checksums.jl b/test/test_checksums.jl new file mode 100644 index 0000000..9a29b19 --- /dev/null +++ b/test/test_checksums.jl @@ -0,0 +1,4 @@ +@testset "checksums" begin + checksum= spdxchecksum("SHA1", pkgdir(SPDX), String["SPDX.spdx.json"], String[".git"]) + @test checksum isa Vector{UInt8} # No good way to indepently verify that the calculation is correct. +end \ No newline at end of file