Changeset 3163
- Timestamp:
- Jan 15, 2014, 9:04:56 AM (10 years ago)
- Location:
- branches/0.11-stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11-stable
-
branches/0.11-stable/test/bam.cc
r3055 r3163 192 192 193 193 194 void test_write(test::Suite& suite, const BamHeader& header) 195 { 196 OutBamFile out; 197 BamRead read; 198 try { 199 // trying to write to a file not open 200 out.write(read); 201 suite.add(false); 202 suite.err() << "write(BamRead): did not throw\n"; 203 } 204 catch (utility::runtime_error& e) { 205 suite.err() << "expected exception: " << e.what() << "\n"; 206 } 207 } 208 209 194 210 void test1(test::Suite& suite) 195 211 { … … 239 255 test_sequence(suite, bam); 240 256 test_name(suite, bam); 241 } 242 #endif 257 test_write(suite, in.header()); 258 } 259 #endif -
branches/0.11-stable/yat/omic/BamFile.cc
r3080 r3163 140 140 void OutBamFile::write(const BamRead& read) 141 141 { 142 if ( !samwrite(sf_, read.bam_)) {142 if (samwrite(sf_, read.bam_)<=0) { 143 143 // FIXME if wanted perhaps we should throw an OutBamFile::error 144 144 // instead that can hold \a read
Note: See TracChangeset
for help on using the changeset viewer.