Mercurial > hg > orthanc-postgresql
changeset 54:65dbced9e20a
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Aug 2015 21:23:04 +0200 |
parents | 56bd16143ec7 (current diff) 8175ea050eff (diff) |
children | 1070a1264022 |
files | CMakeLists.txt |
diffstat | 3 files changed, 33 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Fri Aug 07 21:22:50 2015 +0200 +++ b/NEWS Fri Aug 07 21:23:04 2015 +0200 @@ -1,8 +1,12 @@ Pending changes in the mainline =============================== + +Release 1.2 (2015/08/02) +======================== + * Inject version information into Windows binaries -* Option to prevent compiling the unit tests (if no PostgreSQL test server is available) +* CMake flag to prevent compiling the unit tests (if no PostgreSQL test server is available) * Update to Boost 1.58.0 for static and Windows builds * Support of OS X compilation
--- a/UnitTestsSources/PostgreSQLWrapperTests.cpp Fri Aug 07 21:22:50 2015 +0200 +++ b/UnitTestsSources/PostgreSQLWrapperTests.cpp Fri Aug 07 21:23:04 2015 +0200 @@ -187,9 +187,9 @@ db.AttachChild(a, c); ASSERT_EQ(3, db.GetTableRecordCount("Resources")); - ASSERT_EQ(0, db.GetResourceCount(OrthancPluginResourceType_Patient)); - ASSERT_EQ(1, db.GetResourceCount(OrthancPluginResourceType_Study)); - ASSERT_EQ(2, db.GetResourceCount(OrthancPluginResourceType_Series)); + ASSERT_EQ(0u, db.GetResourceCount(OrthancPluginResourceType_Patient)); + ASSERT_EQ(1u, db.GetResourceCount(OrthancPluginResourceType_Study)); + ASSERT_EQ(2u, db.GetResourceCount(OrthancPluginResourceType_Series)); ASSERT_FALSE(db.GetParentPublicId(s, a)); ASSERT_TRUE(db.GetParentPublicId(s, b)); ASSERT_EQ("study", s); @@ -205,26 +205,26 @@ std::list<std::string> cp; db.GetChildrenPublicId(cp, a); - ASSERT_EQ(2, cp.size()); + ASSERT_EQ(2u, cp.size()); ASSERT_TRUE(cp.front() == "series" || cp.front() == "series2"); ASSERT_TRUE(cp.back() == "series" || cp.back() == "series2"); ASSERT_NE(cp.front(), cp.back()); std::list<std::string> pub; db.GetAllPublicIds(pub, OrthancPluginResourceType_Patient); - ASSERT_EQ(0, pub.size()); + ASSERT_EQ(0u, pub.size()); db.GetAllPublicIds(pub, OrthancPluginResourceType_Study); - ASSERT_EQ(1, pub.size()); + ASSERT_EQ(1u, pub.size()); ASSERT_EQ("study", pub.front()); db.GetAllPublicIds(pub, OrthancPluginResourceType_Series); - ASSERT_EQ(2, pub.size()); + ASSERT_EQ(2u, pub.size()); ASSERT_TRUE(pub.front() == "series" || pub.front() == "series2"); ASSERT_TRUE(pub.back() == "series" || pub.back() == "series2"); ASSERT_NE(pub.front(), pub.back()); std::list<int64_t> ci; db.GetChildrenInternalId(ci, a); - ASSERT_EQ(2, ci.size()); + ASSERT_EQ(2u, ci.size()); ASSERT_TRUE(ci.front() == b || ci.front() == c); ASSERT_TRUE(ci.back() == b || ci.back() == c); ASSERT_NE(ci.front(), ci.back()); @@ -240,7 +240,7 @@ std::list<int32_t> md; db.ListAvailableMetadata(md, a); - ASSERT_EQ(2, md.size()); + ASSERT_EQ(2u, md.size()); ASSERT_TRUE(md.front() == MetadataType_ModifiedFrom || md.back() == MetadataType_ModifiedFrom); ASSERT_TRUE(md.front() == MetadataType_LastUpdate || md.back() == MetadataType_LastUpdate); std::string mdd; @@ -250,18 +250,18 @@ ASSERT_EQ("update", mdd); db.ListAvailableMetadata(md, b); - ASSERT_EQ(0, md.size()); + ASSERT_EQ(0u, md.size()); db.DeleteMetadata(a, MetadataType_LastUpdate); db.DeleteMetadata(b, MetadataType_LastUpdate); ASSERT_FALSE(db.LookupMetadata(s, a, MetadataType_LastUpdate)); db.ListAvailableMetadata(md, a); - ASSERT_EQ(1, md.size()); + ASSERT_EQ(1u, md.size()); ASSERT_EQ(MetadataType_ModifiedFrom, md.front()); - ASSERT_EQ(0, db.GetTotalCompressedSize()); - ASSERT_EQ(0, db.GetTotalUncompressedSize()); + ASSERT_EQ(0u, db.GetTotalCompressedSize()); + ASSERT_EQ(0u, db.GetTotalUncompressedSize()); std::list<int32_t> fc; @@ -286,15 +286,15 @@ db.AddAttachment(a, a1); db.ListAvailableAttachments(fc, a); - ASSERT_EQ(1, fc.size()); + ASSERT_EQ(1u, fc.size()); ASSERT_EQ(FileContentType_Dicom, fc.front()); db.AddAttachment(a, a2); db.ListAvailableAttachments(fc, a); - ASSERT_EQ(2, fc.size()); + ASSERT_EQ(2u, fc.size()); ASSERT_FALSE(db.LookupAttachment(b, FileContentType_Dicom)); - ASSERT_EQ(4284, db.GetTotalCompressedSize()); - ASSERT_EQ(4284, db.GetTotalUncompressedSize()); + ASSERT_EQ(4284u, db.GetTotalCompressedSize()); + ASSERT_EQ(4284u, db.GetTotalUncompressedSize()); expectedAttachment.reset(new OrthancPluginAttachment); expectedAttachment->uuid = "uuid1"; @@ -317,14 +317,14 @@ ASSERT_TRUE(db.LookupAttachment(a, FileContentType_DicomAsJson)); db.ListAvailableAttachments(fc, b); - ASSERT_EQ(0, fc.size()); + ASSERT_EQ(0u, fc.size()); db.DeleteAttachment(a, FileContentType_Dicom); db.ListAvailableAttachments(fc, a); - ASSERT_EQ(1, fc.size()); + ASSERT_EQ(1u, fc.size()); ASSERT_EQ(FileContentType_DicomAsJson, fc.front()); db.DeleteAttachment(a, FileContentType_DicomAsJson); db.ListAvailableAttachments(fc, a); - ASSERT_EQ(0, fc.size()); + ASSERT_EQ(0u, fc.size()); db.SetIdentifierTag(a, 0x0010, 0x0020, "patient"); @@ -343,12 +343,12 @@ db.LookupIdentifier(ci, 0x0010, 0x0020, "patient"); - ASSERT_EQ(1, ci.size()); + ASSERT_EQ(1u, ci.size()); ASSERT_EQ(a, ci.front()); db.LookupIdentifier(ci, 0x0010, 0x0020, "study"); - ASSERT_EQ(0, ci.size()); + ASSERT_EQ(0u, ci.size()); db.LookupIdentifier(ci, "study"); - ASSERT_EQ(1, ci.size()); + ASSERT_EQ(1u, ci.size()); ASSERT_EQ(a, ci.front()); @@ -372,10 +372,10 @@ db.GetExportedResources(done, 0, 10); - db.GetAllPublicIds(pub, OrthancPluginResourceType_Patient); ASSERT_EQ(0, pub.size()); - db.GetAllPublicIds(pub, OrthancPluginResourceType_Study); ASSERT_EQ(1, pub.size()); - db.GetAllPublicIds(pub, OrthancPluginResourceType_Series); ASSERT_EQ(2, pub.size()); - db.GetAllPublicIds(pub, OrthancPluginResourceType_Instance); ASSERT_EQ(0, pub.size()); + db.GetAllPublicIds(pub, OrthancPluginResourceType_Patient); ASSERT_EQ(0u, pub.size()); + db.GetAllPublicIds(pub, OrthancPluginResourceType_Study); ASSERT_EQ(1u, pub.size()); + db.GetAllPublicIds(pub, OrthancPluginResourceType_Series); ASSERT_EQ(2u, pub.size()); + db.GetAllPublicIds(pub, OrthancPluginResourceType_Instance); ASSERT_EQ(0u, pub.size()); ASSERT_EQ(3, db.GetTableRecordCount("Resources")); ASSERT_EQ(0, db.GetTableRecordCount("PatientRecyclingOrder")); // No patient was inserted
--- a/UnitTestsSources/UnitTestsMain.cpp Fri Aug 07 21:22:50 2015 +0200 +++ b/UnitTestsSources/UnitTestsMain.cpp Fri Aug 07 21:23:04 2015 +0200 @@ -55,7 +55,7 @@ { std::cerr << "Usage: " << argv[0] << " <host> <port> <username> <password> <database>" << std::endl << std::endl - << "Example: " << argv[0] << " localhost 5432 postgres postgres orthanctests" + << "Example: " << argv[0] << " localhost 5432 postgres postgres orthanctest" << std::endl << std::endl; return -1; }