Changeset 3160 for trunk/test/bam.cc


Ignore:
Timestamp:
Jan 13, 2014, 8:08:30 AM (8 years ago)
Author:
Peter
Message:

closes #775

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/bam.cc

    r3055 r3160  
    11// $Id$
    22//
    3 // Copyright (C) 2013 Peter Johansson
     3// Copyright (C) 2013, 2014 Peter Johansson
    44//
    55// This program is free software; you can redistribute it and/or modify
     
    192192
    193193
     194void test_open3(test::Suite& suite, const BamHeader& header)
     195{
     196  OutBamFile out("yaya.bam", header, 0);
     197  out.close();
     198  out.open("yaya.bam", header, 9);
     199  out.close();
     200  try {
     201    out.open("yaya.bam", header, 10);
     202    suite.add(false);
     203    suite.err() << "open(\"yaya.bam\", header, 10): did not throw\n";
     204  }
     205  catch (std::invalid_argument& e) {
     206    suite.err() << "expected exception: " << e.what() << "\n";
     207  }
     208  out.close();
     209}
     210
     211
    194212void test1(test::Suite& suite)
    195213{
     
    239257  test_sequence(suite, bam);
    240258  test_name(suite, bam);
    241 }
    242 #endif
     259  test_open3(suite, in.header());
     260}
     261#endif
Note: See TracChangeset for help on using the changeset viewer.