From 62b02e582e134360cf54e1f14a77114d8c092a84 Mon Sep 17 00:00:00 2001
From: Andreas Schenk <andreas_schenk@hms.harvard.edu>
Date: Tue, 12 Apr 2011 22:56:42 -0400
Subject: [PATCH] added more file formats to img io tests

---
 modules/io/tests/test_io_img.cc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/io/tests/test_io_img.cc b/modules/io/tests/test_io_img.cc
index 712dbb7e6..229b6293b 100644
--- a/modules/io/tests/test_io_img.cc
+++ b/modules/io/tests/test_io_img.cc
@@ -22,6 +22,8 @@
 #include <ost/img/alg/randomize.hh>
 #define BOOST_TEST_DYN_LINK
 #include <boost/test/unit_test.hpp>
+#include  <ost/io/img/map_io_df3_handler.hh>
+#include  <ost/io/img/map_io_dat_handler.hh>
 #include  <ost/io/img/map_io_dx_handler.hh>
 #include  <ost/io/img/map_io_spi_handler.hh>
 #include  <ost/io/img/map_io_mrc_handler.hh>
@@ -49,6 +51,9 @@ BOOST_AUTO_TEST_CASE(test_io_img)
   testimage+=0.01; //if all values are > 0.0 we can use close_at_tolerance
   const String fname("temp_img.tmp");
   std::map<String,ImageFormatBase*> float_formats;
+  float_formats["DX"]=new DX;
+  float_formats["Situs"]=new Situs;
+  float_formats["DAT (float)"]=new DAT(false,OST_FLOAT_FORMAT);
   float_formats["CCP4 (float)"]=new MRC;
   float_formats["MRC (float)"]=new MRC(false,MRC_OLD_FORMAT);
   float_formats["SPIDER"]= new Spider;
@@ -68,12 +73,13 @@ BOOST_AUTO_TEST_CASE(test_io_img)
       }
     }
     if(failed){
-      BOOST_ERROR("Image IO failed for plugin " << it->first << "at point " << ost::img::Point(eit)<< ". The values are: " << testimage.GetReal(eit)<< ","<< loadedimage.GetReal(eit) );
+      BOOST_ERROR("Image IO failed for plugin " << it->first << " at point " << ost::img::Point(eit)<< ". The values are: " << testimage.GetReal(eit)<< ","<< loadedimage.GetReal(eit) );
     }
     delete it->second;
   }
   //int 16 formats
   std::map<String,ImageFormatBase*> int_formats;
+  int_formats["DAT (16 bit)"]=new DAT(true,OST_BIT16_FORMAT);
   int_formats["TIF (16 bit)"]=new TIF;
   int_formats["JPK (16 bit)"]=new JPK;
   for(std::map<String,ImageFormatBase*>::iterator it=int_formats.begin();it!=int_formats.end();++it){
@@ -97,7 +103,9 @@ BOOST_AUTO_TEST_CASE(test_io_img)
 
   //byte formats  
   std::map<String,ImageFormatBase*> byte_formats;
+  byte_formats["DAT (byte)"]=new DAT(true,OST_BIT8_FORMAT);
   byte_formats["PNG"]=new PNG;
+  byte_formats["DF3"]=new DF3;
   byte_formats["JPK (byte)"]= new JPK(false,OST_BIT8_FORMAT);
   byte_formats["TIF (byte)"]= new TIF(false,OST_BIT8_FORMAT);
   for(std::map<String,ImageFormatBase*>::iterator it=byte_formats.begin();it!=byte_formats.end();++it){
-- 
GitLab