Ignore:
Timestamp:
Mar 6, 2017, 4:09:59 AM (6 years ago)
Author:
Peter
Message:

fixes #886

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.14-stable/test/dna_reverse_complement.cc

    r3517 r3625  
    22
    33/*
    4   Copyright (C) 2016 Peter Johansson
     4  Copyright (C) 2016, 2017 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3535  test::Suite suite(argc, argv);
    3636
     37  std::string random("ACGTATATATAGG");
     38  // test that reverse complement (in-place) and copy version yield same results
     39  std::string result1(random);
     40  dna_reverse_complement(result1.begin(), result1.end());
     41  std::string result2;
     42  dna_reverse_complement_copy(random.begin(), random.end(),
     43                              std::back_inserter(result2));
     44  if (result1 != result2) {
     45    suite.add(false);
     46    suite.err() << "input: " << random << "\n";
     47    suite.err() << "dna_reverse_complement: " << result1 << "\n";
     48    suite.err() << "dna_reverse_complement_copy: " << result2 << "\n";
     49  }
     50
    3751  if (false) { // do not run compiler tests
    3852    using namespace boost::iterator_archetypes;
Note: See TracChangeset for help on using the changeset viewer.