From da5d59a7ad1645a61d4d8943bbfe7280126d505a Mon Sep 17 00:00:00 2001
From: Julien Osman <julien.osman@csgroup.eu>
Date: Fri, 10 Jul 2020 17:31:40 +0200
Subject: [PATCH] BUG: Update the test ioTuMetaDataKeyTest according to last
 changes in class MetaDataKey

---
 Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt     |  7 +++----
 Modules/Core/Metadata/test/otbImageMetadataTest.cxx | 11 -----------
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt b/Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt
index d4a93664c0..4135f61fa7 100644
--- a/Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt
+++ b/Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt
@@ -1,5 +1,4 @@
 mytime : 2009-08-10T10:30:08.142149Z
-mytime : 2009-08-10T10:30:08.142149Z
-First try size: 512
-Second try size: 264
-Third try size: 264
\ No newline at end of file
+First try size: 608
+Second try size: 312
+Third try size: 312
diff --git a/Modules/Core/Metadata/test/otbImageMetadataTest.cxx b/Modules/Core/Metadata/test/otbImageMetadataTest.cxx
index 2eabc05320..e263b1bc27 100644
--- a/Modules/Core/Metadata/test/otbImageMetadataTest.cxx
+++ b/Modules/Core/Metadata/test/otbImageMetadataTest.cxx
@@ -63,20 +63,9 @@ void otbMetadataKeyTest(char* argv[])
   std::ofstream outfile(outFileName);
 
   MetaData::Time mytime;
-  char buffer[] = "2009-08-10T10:30:08.142149Z";
 
   std::string bufferStr("2009-08-10T10:30:08.142149Z");
 
-  try
-  {
-    mytime = boost::lexical_cast<MetaData::Time>(buffer);
-  }
-  catch(boost::bad_lexical_cast&)
-  {
-    outfile << "Bad cast into MetaData::Time\n";
-  }
-  outfile << "mytime : "<< mytime << "\n";
-
   try
   {
     mytime = Utils::LexicalCast<MetaData::Time,std::string>(bufferStr, std::string("T"));
-- 
GitLab