# HG changeset patch # User Sebastien Jodogne # Date 1590231034 -7200 # Node ID bd0af2e11325cdcb0a3eb0cb33514f7f062eca34 # Parent d86bddb509724cec072211febe76e322450a8510 fix for big-endian diff -r d86bddb50972 -r bd0af2e11325 UnitTestsSources/FromDcmtkTests.cpp --- a/UnitTestsSources/FromDcmtkTests.cpp Fri May 22 18:40:35 2020 +0200 +++ b/UnitTestsSources/FromDcmtkTests.cpp Sat May 23 12:50:34 2020 +0200 @@ -514,7 +514,9 @@ std::string s; ASSERT_TRUE(f.LookupTransferSyntax(s)); - ASSERT_EQ(s, GetTransferSyntaxUid(DicomTransferSyntax_LittleEndianExplicit)); + // The default transfer syntax depends on the OS endianness + ASSERT_TRUE(s == GetTransferSyntaxUid(DicomTransferSyntax_LittleEndianExplicit) || + s == GetTransferSyntaxUid(DicomTransferSyntax_BigEndianExplicit)); ASSERT_THROW(f.Replace(DICOM_TAG_ACCESSION_NUMBER, std::string("Accession"), false, DicomReplaceMode_ThrowIfAbsent, ""), OrthancException); diff -r d86bddb50972 -r bd0af2e11325 UnitTestsSources/ServerIndexTests.cpp --- a/UnitTestsSources/ServerIndexTests.cpp Fri May 22 18:40:35 2020 +0200 +++ b/UnitTestsSources/ServerIndexTests.cpp Sat May 23 12:50:34 2020 +0200 @@ -734,8 +734,10 @@ ASSERT_TRUE(instanceMetadata.find(MetadataType_Instance_TransferSyntax) != instanceMetadata.end()); ASSERT_TRUE(instanceMetadata.find(MetadataType_Instance_SopClassUid) != instanceMetadata.end()); - // By default, an Explicit VR Little Endian is used by Orthanc - ASSERT_EQ("1.2.840.10008.1.2.1", instanceMetadata[MetadataType_Instance_TransferSyntax]); + // The default transfer syntax depends on the OS endianness + std::string s = instanceMetadata[MetadataType_Instance_TransferSyntax]; + ASSERT_TRUE(s == "1.2.840.10008.1.2.1" || + s == "1.2.840.10008.1.2.2"); ASSERT_EQ("1.2.840.10008.5.1.4.1.1.1", instanceMetadata[MetadataType_Instance_SopClassUid]);