TuttleOFX
1
|
00001 #include <detector.hpp> 00002 00003 #define BOOST_TEST_MODULE FileSequenceDetector 00004 00005 #include <iostream> 00006 #include <iomanip> 00007 #include <fstream> 00008 #include <cstdio> 00009 00010 #include <boost/test/unit_test.hpp> 00011 #include <boost/filesystem.hpp> 00012 #include <boost/foreach.hpp> 00013 00014 using boost::unit_test::test_suite; 00015 00016 void copyFile( std::string src, std::string dst ) 00017 { 00018 if( !boost::filesystem::exists( dst ) ) 00019 boost::filesystem::copy_file( src, dst ); 00020 } 00021 00022 void createTmpDiretoriesFilesAndSequences() 00023 { 00024 boost::filesystem::create_directories( "tmpTestSequence/root/film/" ); 00025 boost::filesystem::create_directories( "tmpTestSequence/root/film/noStrictPadding" ); 00026 boost::filesystem::create_directories( "tmpTestSequence/root/film/strictPadding" ); 00027 boost::filesystem::create_directories( "tmpTestSequence/root/trash/" ); 00028 boost::filesystem::create_directories( "tmpTestSequence/root/trash/dpx" ); 00029 boost::filesystem::create_directories( "tmpTestSequence/root/trash/dpx/negative" ); 00030 00031 std::ofstream dummyFile; 00032 dummyFile.open( "tmpTestSequence/root/trash/img.jpg" ); 00033 dummyFile << "This is a dummy Jpeg file.\n"; 00034 dummyFile.close(); 00035 00036 dummyFile.open( "tmpTestSequence/root/trash/dpx/img.dpx" ); 00037 dummyFile << "This is a dummy Dpx file.\n"; 00038 dummyFile.close(); 00039 00040 // no strict padding: 0000, 0001, 0010, 0020, 0100 00041 for( int i = 0; i < 100; i++ ) 00042 { 00043 char numberName[20]; 00044 sprintf( numberName, "%04d", i ); 00045 std::string outputFilename = "tmpTestSequence/root/film/strictPadding/img." + std::string( numberName ) + ".dpx"; 00046 copyFile( "tmpTestSequence/root/trash/dpx/img.dpx", outputFilename ); 00047 } 00048 00049 for( int i = 0; i < 100; i++ ) 00050 { 00051 char numberName[20]; 00052 sprintf( numberName, "%04d", i ); 00053 std::string outputFilename = "tmpTestSequence/root/film/strictPadding/.img." + std::string( numberName ) + ".dpx"; 00054 copyFile( "tmpTestSequence/root/trash/dpx/img.dpx", outputFilename ); 00055 } 00056 00057 for( int i = 0; i < 100; i++ ) 00058 { 00059 char numberName[20]; 00060 sprintf( numberName, "%04d", i ); 00061 std::string outputFilename = "tmpTestSequence/root/film/strictPadding/img." + std::string( numberName ) + ".jpg"; 00062 copyFile( "tmpTestSequence/root/trash/img.jpg", outputFilename ); 00063 } 00064 00065 for( int i = 0; i < 100; i++ ) 00066 { 00067 char numberName[20]; 00068 sprintf( numberName, "%04d", i ); 00069 std::string outputFilename = "tmpTestSequence/root/film/strictPadding/imgBroken." + std::string( numberName ) + ".jpg"; 00070 copyFile( "tmpTestSequence/root/trash/img.jpg", outputFilename ); 00071 if( i == 2 ) i = 9; 00072 if( i == 55 ) i = 99; 00073 } 00074 00075 // no strict padding: 0, 1, 10, 20, 100 00076 for( int i = 0; i < 100; i++ ) 00077 { 00078 char numberName[20]; 00079 sprintf( numberName, "%d", i ); 00080 std::string outputFilename = "tmpTestSequence/root/film/noStrictPadding/img." + std::string( numberName ) + ".dpx"; 00081 copyFile( "tmpTestSequence/root/trash/dpx/img.dpx", outputFilename ); 00082 } 00083 00084 for( int i = 0; i < 100; i++ ) 00085 { 00086 char numberName[20]; 00087 sprintf( numberName, "%d", i ); 00088 std::string outputFilename = "tmpTestSequence/root/film/noStrictPadding/.img." + std::string( numberName ) + ".dpx"; 00089 copyFile( "tmpTestSequence/root/trash/dpx/img.dpx", outputFilename ); 00090 } 00091 00092 for( int i = 0; i < 100; i++ ) 00093 { 00094 char numberName[20]; 00095 sprintf( numberName, "%d", i ); 00096 std::string outputFilename = "tmpTestSequence/root/film/noStrictPadding/img." + std::string( numberName ) + ".jpg"; 00097 copyFile( "tmpTestSequence/root/trash/img.jpg", outputFilename ); 00098 } 00099 00100 for( int i = 0; i < 101; i++ ) 00101 { 00102 char numberName[20]; 00103 sprintf( numberName, "%d", i ); 00104 std::string outputFilename = "tmpTestSequence/root/film/noStrictPadding/imgBroken." + std::string( numberName ) + ".jpg"; 00105 copyFile( "tmpTestSequence/root/trash/img.jpg", outputFilename ); 00106 if( i == 2 ) i = 9; 00107 if( i == 55 ) i = 99; 00108 } 00109 for( int i = 0; i < 100; i++ ) 00110 { 00111 char numberName[20]; 00112 sprintf( numberName, "%04d", i ); 00113 std::string outputFilename = "tmpTestSequence/root/trash/dpx/negative/img.-" + std::string( numberName ) + ".dpx"; 00114 copyFile( "tmpTestSequence/root/trash/dpx/img.dpx", outputFilename ); 00115 } 00116 for( int i = 0; i < 100; i++ ) 00117 { 00118 char numberName[20]; 00119 sprintf( numberName, "%d", i ); 00120 std::string outputFilename = "tmpTestSequence/root/trash/dpx/negative/seqTest.-" + std::string( numberName ) + ".dpx"; 00121 copyFile( "tmpTestSequence/root/trash/dpx/img.dpx", outputFilename ); 00122 } 00123 } 00124 00125 void clearTmp() 00126 { 00127 boost::filesystem::remove_all( "tmpTestSequence" ); 00128 } 00129 00130 bool testFindObjectInDiretory( const char* path, const size_t numberOfFolders, const size_t numberOfFiles, const size_t numberOfSequences, const size_t numberOfFileObjects ) 00131 { 00132 boost::ptr_vector<sequenceParser::FileObject> listFileObject; 00133 boost::ptr_vector<sequenceParser::Folder> listFolder; 00134 boost::ptr_vector<sequenceParser::File> listFile; 00135 boost::ptr_vector<sequenceParser::Sequence> listSequence; 00136 00137 listFileObject = sequenceParser::fileObjectInDirectory( path, (sequenceParser::EMaskType)( sequenceParser::eMaskTypeDirectory | sequenceParser::eMaskTypeFile | sequenceParser::eMaskTypeSequence ) ); 00138 listFolder = sequenceParser::folderInDirectory( path ); 00139 listFile = sequenceParser::fileInDirectory( path ); 00140 listSequence = sequenceParser::sequenceInDirectory( path ); 00141 00142 BOOST_CHECK_EQUAL( listFileObject.size(), numberOfFileObjects ); 00143 BOOST_CHECK_EQUAL( listFolder.size(), numberOfFolders ); 00144 BOOST_CHECK_EQUAL( listFile.size(), numberOfFiles ); 00145 BOOST_CHECK_EQUAL( listSequence.size(), numberOfSequences ); 00146 00147 if( listFileObject.size() != numberOfFileObjects || 00148 listFolder.size() != numberOfFolders || 00149 listFile.size() != numberOfFiles || 00150 listSequence.size() != numberOfSequences ) 00151 { 00152 //BOOST_FOREACH( const sequenceParser::FileObject& f, listFileObject ) 00153 //{ 00154 // std::cout << "f: " << f << ", " << f.getMaskType() << std::endl; 00155 //} 00156 std::cout << "test path: " << std::left << std::setw( 75 ) << path << std::right 00157 << listFolder.size() << " -> " << numberOfFolders << " | " 00158 << listFile.size() << " -> " << numberOfFiles << " | " 00159 << listSequence.size() << " -> " << numberOfSequences << " | " 00160 << listFileObject.size() << " -> " << numberOfFileObjects 00161 << std::endl; 00162 return false; 00163 } 00164 return true; 00165 // boost::ptr_vector<sequenceParser::Sequence>::iterator it; 00166 // for(it=listSequence.begin() ; it != listSequence.end(); it++) 00167 // std::cout << (*it)->getAbsoluteStandardPattern() << std::endl; 00168 } 00169 00170 bool testFindObjectInDiretory( const char* path, const sequenceParser::EMaskOptions options, const size_t numberOfFolders, const size_t numberOfFiles, const size_t numberOfSequences, const size_t numberOfFileObjects ) 00171 { 00172 boost::ptr_vector<sequenceParser::FileObject> listFileObject; 00173 boost::ptr_vector<sequenceParser::Folder> listFolder; 00174 boost::ptr_vector<sequenceParser::File> listFile; 00175 boost::ptr_vector<sequenceParser::Sequence> listSequence; 00176 00177 listFileObject = sequenceParser::fileObjectInDirectory( path, ( sequenceParser::EMaskType ) ( sequenceParser::eMaskTypeDirectory | sequenceParser::eMaskTypeFile | sequenceParser::eMaskTypeSequence ), options ); 00178 listFolder = sequenceParser::folderInDirectory( path, options ); 00179 listFile = sequenceParser::fileInDirectory( path, options ); 00180 listSequence = sequenceParser::sequenceInDirectory( path, options ); 00181 00182 BOOST_CHECK_EQUAL( listFileObject.size(), numberOfFileObjects ); 00183 BOOST_CHECK_EQUAL( listFolder.size(), numberOfFolders ); 00184 BOOST_CHECK_EQUAL( listFile.size(), numberOfFiles ); 00185 BOOST_CHECK_EQUAL( listSequence.size(), numberOfSequences ); 00186 00187 if( listFileObject.size() != numberOfFileObjects || 00188 listFolder.size() != numberOfFolders || 00189 listFile.size() != numberOfFiles || 00190 listSequence.size() != numberOfSequences ) 00191 { 00192 //BOOST_FOREACH( const sequenceParser::FileObject& f, listFileObject ) 00193 //{ 00194 // std::cout << "f: " << f << std::endl; 00195 //} 00196 std::cout << "test path [" << options << "]: " 00197 << std::left << std::setw( 75 ) << path << std::right 00198 << listFolder.size() << " -> " << numberOfFolders << " | " 00199 << listFile.size() << " -> " << numberOfFiles << " | " 00200 << listSequence.size() << " -> " << numberOfSequences << " | " 00201 << listFileObject.size() << " -> " << numberOfFileObjects 00202 << std::endl; 00203 return false; 00204 } 00205 00206 return true; 00207 // boost::ptr_vector<sequenceParser::Sequence>::iterator it; 00208 // for(it=listSequence.begin() ; it != listSequence.end(); it++) 00209 // std::cout << (*it)->getAbsoluteStandardPattern() << std::endl; 00210 } 00211 00212 bool testFirstSequenceLimits( const char* path, const int minValue, const int maxValue ) 00213 { 00214 boost::ptr_vector<sequenceParser::Sequence> listSequence; 00215 00216 listSequence = sequenceParser::sequenceInDirectory( path ); 00217 00218 BOOST_CHECK( !listSequence.empty() ); 00219 if( listSequence.empty() ) 00220 return false; // There is no sequence... so nothing to check 00221 00222 sequenceParser::Sequence& seq = listSequence.front(); 00223 00224 if( seq.getFirstTime() != minValue || seq.getLastTime() != maxValue ) 00225 { 00226 std::cout << "test sequence: " << path << " : set " << minValue << " -> " << maxValue 00227 << " found " << seq.getFirstTime() << " -> " << seq.getLastTime() 00228 << std::endl; 00229 return false; 00230 } 00231 00232 BOOST_CHECK_EQUAL( seq.getFirstTime(), minValue ); 00233 BOOST_CHECK_EQUAL( seq.getLastTime(), maxValue ); 00234 return true; 00235 } 00236 00237 bool testFirstSequenceLimits( const char* path, const sequenceParser::EMaskOptions options, const int minValue, const int maxValue ) 00238 { 00239 boost::ptr_vector<sequenceParser::Sequence> listSequence; 00240 00241 listSequence = sequenceParser::sequenceInDirectory( path, options ); 00242 00243 BOOST_CHECK( !listSequence.empty() ); 00244 if( listSequence.empty() ) 00245 return false; // There is no sequence... so nothing to check 00246 00247 sequenceParser::Sequence& seq = listSequence.front(); 00248 if( seq.getFirstTime() != minValue || seq.getLastTime() != maxValue ) 00249 { 00250 std::cout << "test sequence: " << path << " : set = " << minValue << " -> " << maxValue << " found " 00251 << seq.getFirstTime() << " -> " << seq.getLastTime() 00252 << std::endl; 00253 return false; 00254 } 00255 BOOST_CHECK_EQUAL( seq.getFirstTime(), minValue ); 00256 BOOST_CHECK_EQUAL( seq.getLastTime(), maxValue ); 00257 return true; 00258 } 00259 00260 BOOST_AUTO_TEST_CASE( TestSequence ) 00261 { 00262 createTmpDiretoriesFilesAndSequences(); 00263 00264 std::cout << std::setw( 85 ) << " " << " Folder | File | Sequence | FileObjects" << std::endl; 00265 00266 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence" , 1, 0, 0, 1 ) ); 00267 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root" , 2, 0, 0, 2 ) ); 00268 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/" , 1, 1, 0, 2 ) ); 00269 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/" , 1, 1, 0, 2 ) ); 00270 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/" , 0, 0, 2, 2 ) ); 00271 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/img.####.dpx" , 0, 0, 0, 0 ) ); 00272 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/img.#####.dpx" , 0, 0, 0, 0 ) ); 00273 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/img.-####.dpx" , 0, 0, 1, 1 ) ); 00274 BOOST_CHECK( testFirstSequenceLimits ( "tmpTestSequence/root/trash/dpx/negative/img.-####.dpx" , 0, 99 ) ); 00275 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/seqTest.@.dpx" , 0, 0, 0, 0 ) ); 00276 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/seqTest.-@.dpx" , 0, 0, 1, 1 ) ); 00277 BOOST_CHECK( testFirstSequenceLimits ( "tmpTestSequence/root/trash/dpx/negative/seqTest.-@.dpx" , 0, 99 ) ); 00278 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/" , sequenceParser::eMaskOptionsNegativeIndexes , 0, 0, 2, 3 ) ); // should be (0, 0, 2, 2) // ERROR -0 is not detected in the sequence 00279 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/seqTest.@.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , 0, 0, 1, 1 ) ); 00280 BOOST_CHECK( testFirstSequenceLimits ( "tmpTestSequence/root/trash/dpx/negative/seqTest.@.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , -99, -1 ) ); 00281 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/seqTest.-@.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , 0, 0, 1, 1 ) ); 00282 BOOST_CHECK( testFirstSequenceLimits ( "tmpTestSequence/root/trash/dpx/negative/seqTest.-@.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , -99, -1 ) ); 00283 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/img.#### .dpx" , sequenceParser::eMaskOptionsNegativeIndexes , 0, 0, 0, 0 ) ); 00284 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/img.####.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , 0, 0, 1, 1 ) ); 00285 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/img.#####.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , 0, 0, 0, 0 ) ); 00286 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/trash/dpx/negative/img.-####.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , 0, 0, 1, 1 ) ); 00287 BOOST_CHECK( testFirstSequenceLimits ( "tmpTestSequence/root/trash/dpx/negative/img.-####.dpx" , sequenceParser::eMaskOptionsNegativeIndexes , -99, 0 ) ); 00288 00289 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/" , 0, 0, 3, 3 ) ); 00290 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/" , sequenceParser::eMaskOptionsDotFile , 0, 0, 4, 4 ) ); 00291 00292 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.####.dpx" , 0, 0, 1, 1 ) ); 00293 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.0050.dpx" , 0, 1, 0, 1 ) ); // don't work, but should detect the sequence instead 00294 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*.0050.dpx" , 0, 1, 0, 1 ) ); 00295 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*0050.dpx" , 0, 1, 0, 1 ) ); 00296 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/???.0050.dpx" , 0, 1, 0, 1 ) ); 00297 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/????0050.dpx" , 0, 1, 0, 1 ) ); 00298 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*.####.dpx" , 0, 0, 1, 1 ) ); 00299 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*.@.dpx" , 0, 0, 1, 1 ) ); 00300 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/???.####.dpx" , 0, 0, 1, 1 ) ); 00301 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/???.@.dpx" , 0, 0, 1, 1 ) ); 00302 00303 boost::filesystem::current_path("tmpTestSequence/root/film/strictPadding/"); 00304 // BOOST_CHECK( testFindObjectInDiretory( "./img.0050.dpx" , 0, 1, 0, 1 ) ); 00305 // BOOST_CHECK( testFindObjectInDiretory( "img.0050.dpx" , 0, 1, 0, 1 ) ); 00306 boost::filesystem::current_path("../../../../"); 00307 00308 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.0050.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00309 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*.0050.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00310 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*0050.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00311 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/???.0050.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00312 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/????0050.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00313 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*.####.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00314 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/*.@.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00315 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/???.####.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00316 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/???.@.dpx" , sequenceParser::eMaskOptionsSequenceBasedOnFilename, 0, 0, 1, 1 ) ); 00317 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.0050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 1, 0, 1 ) ); 00318 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.50.dpx" , 0, 0, 0, 0 ) ); 00319 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.50.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00320 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.0500.dpx" , 0, 0, 0, 0 ) ); 00321 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.0500.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00322 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.000050.dpx" , 0, 0, 0, 0 ) ); 00323 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.000050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00324 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.####.dpx" , 0, 0, 1, 1 ) ); 00325 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00326 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.###.dpx" , 0, 0, 0, 0 ) ); 00327 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.###.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00328 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.#####.dpx" , 0, 0, 0, 0 ) ); 00329 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.#####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00330 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.%04d.dpx" , 0, 0, 1, 1 ) ); 00331 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.%04d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00332 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.%03d.dpx" , 0, 0, 0, 0 ) ); 00333 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.%03d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00334 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.%05d.dpx" , 0, 0, 0, 0 ) ); 00335 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.%05d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00336 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.@.dpx" , 0, 0, 1, 1 ) ); 00337 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/img.@.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00338 00339 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.0050.dpx" , 0, 0, 0, 0 ) ); 00340 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.0050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 1, 0, 1 ) ); 00341 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.50.dpx" , 0, 0, 0, 0 ) ); 00342 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.50.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00343 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.0500.dpx" , 0, 0, 0, 0 ) ); 00344 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.0500.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00345 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.000050.dpx" , 0, 0, 0, 0 ) ); 00346 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.000050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00347 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.####.dpx" , 0, 0, 0, 0 ) ); 00348 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00349 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.###.dpx" , 0, 0, 0, 0 ) ); 00350 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.###.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00351 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.#####.dpx" , 0, 0, 0, 0 ) ); 00352 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.#####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00353 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.%04d.dpx" , 0, 0, 0, 0 ) ); 00354 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.%04d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00355 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.%03d.dpx" , 0, 0, 0, 0 ) ); 00356 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.%03d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00357 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.%05d.dpx" , 0, 0, 0, 0 ) ); 00358 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.%05d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00359 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.@.dpx" , 0, 0, 0, 0 ) ); 00360 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/strictPadding/.img.@.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00361 00362 00363 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/" , 0, 0, 3, 3 ) ); 00364 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/" , sequenceParser::eMaskOptionsDotFile , 0, 0, 4, 4 ) ); 00365 00366 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.0050.dpx" , 0, 0, 0, 0 ) ); 00367 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.0050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00368 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.50.dpx" , 0, 1, 0, 1 ) ); 00369 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.50.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 1, 0, 1 ) ); 00370 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.0500.dpx" , 0, 0, 0, 0 ) ); 00371 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.0500.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00372 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.0050.dpx" , 0, 0, 0, 0 ) ); 00373 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.0050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00374 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.####.dpx" , 0, 0, 0, 0 ) ); 00375 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00376 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.###.dpx" , 0, 0, 0, 0 ) ); 00377 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.###.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00378 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.#####.dpx" , 0, 0, 0, 0 ) ); 00379 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.#####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00380 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.%04d.dpx" , 0, 0, 0, 0 ) ); 00381 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.%04d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00382 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.%05d.dpx" , 0, 0, 0, 0 ) ); 00383 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.%05d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00384 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.%03d.dpx" , 0, 0, 0, 0 ) ); 00385 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.%03d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00386 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.@.dpx" , 0, 0, 1, 1 ) ); 00387 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/img.@.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00388 00389 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.0050.dpx" , 0, 0, 0, 0 ) ); 00390 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.0050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00391 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.50.dpx" , 0, 0, 0, 0 ) ); 00392 // BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.50.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 1, 0, 1 ) ); 00393 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.0500.dpx" , 0, 0, 0, 0 ) ); 00394 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.0500.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00395 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.0050.dpx" , 0, 0, 0, 0 ) ); 00396 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.0050.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00397 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.####.dpx" , 0, 0, 0, 0 ) ); 00398 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00399 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.###.dpx" , 0, 0, 0, 0 ) ); 00400 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.###.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00401 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.#####.dpx" , 0, 0, 0, 0 ) ); 00402 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.#####.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00403 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.%04d.dpx" , 0, 0, 0, 0 ) ); 00404 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.%04d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00405 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.%05d.dpx" , 0, 0, 0, 0 ) ); 00406 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.%05d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00407 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.%03d.dpx" , 0, 0, 0, 0 ) ); 00408 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.%03d.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 0, 0 ) ); 00409 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.@.dpx" , 0, 0, 0, 0 ) ); 00410 BOOST_CHECK( testFindObjectInDiretory( "tmpTestSequence/root/film/noStrictPadding/.img.@.dpx" , sequenceParser::eMaskOptionsDotFile , 0, 0, 1, 1 ) ); 00411 00412 //clearTmp(); 00413 }