diff --git a/Project.toml b/Project.toml index 606d87e..2f636b8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DICOM" uuid = "a26e6606-dd52-5f6a-a97f-4f611373d757" -version = "0.10.0" +version = "0.10.1" [compat] julia = "0.7, 1" diff --git a/test/runtests.jl b/test/runtests.jl index bc7d6f1..42fd148 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -226,21 +226,23 @@ end @testset "Parse entire folder" begin # Following files have missing preamble and won't be parsed # ["OT_Implicit_Little_Headless.dcm", "CT_Implicit_Little_Headless_Retired.dcm"] - # and brain.bpm is not a DICOM file + # along with an invalid notdicom.dcm file which we will first create + notdicomfile = joinpath(data_folder, "notdicom.dcm") + open(notdicomfile, "w") do io + print(io, "!") + end + + # First, test the isdicom() function + fileDX = download_dicom("DX_Implicit_Little_Interleaved.dcm") + @test DICOM.isdicom(fileDX) == true + @test DICOM.isdicom(notdicomfile) == false + + # Second, test if all valid dicom file can be parsed dcms = dcmdir_parse(data_folder) @test issorted([dcm[tag"Instance Number"] for dcm in dcms]) @test length(dcms) == length(readdir(data_folder)) - 3 # -3 because of note above end -@testset "isdicom" begin - answer = DICOM.isdicom("test/testdata/brain.bmp") - @test answer === false - - fileDX = download_dicom("DX_Implicit_Little_Interleaved.dcm") - answer2 = DICOM.isdicom(fileDX) - @test answer2 == true -end - @testset "Test tag macro" begin @test tag"Modality" === (0x0008, 0x0060) === DICOM.fieldname_dict[:Modality] @test tag"Shutter Overlay Group" ===