source: trunk/test/dna_reverse_complement.cc @ 3517

Last change on this file since 3517 was 3517, checked in by Peter, 6 years ago

Use boost iterator concepts (refs #803); avoid two loops in dna_reverse_comlement_copy.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1// $Id: dna_reverse_complement.cc 3517 2016-08-16 09:40:30Z peter $
2
3/*
4  Copyright (C) 2016 Peter Johansson
5
6  This file is part of the yat library, http://dev.thep.lu.se/yat
7
8  The yat library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 3 of the
11  License, or (at your option) any later version.
12
13  The yat library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with yat. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#include <config.h>
23
24#include "Suite.h"
25
26#include "yat/omic/algorithm.h"
27
28#include <boost/concept_archetype.hpp>
29#include <boost/iterator/iterator_archetypes.hpp>
30
31using namespace theplu::yat;
32using namespace omic;
33int main(int argc, char* argv[])
34{
35  test::Suite suite(argc, argv);
36
37  if (false) { // do not run compiler tests
38    using namespace boost::iterator_archetypes;
39    using boost::iterator_archetype;
40    boost::input_iterator_archetype<char> input;
41    boost::detail::dummy_constructor arg;
42    boost::output_iterator_archetype<char> output(arg);
43    boost::mutable_forward_iterator_archetype<char> forward;
44    boost::mutable_bidirectional_iterator_archetype<char> bidirect;
45
46    boost::iterator_archetype<char
47      , boost::iterator_archetypes::readable_iterator_t
48      , boost::bidirectional_traversal_tag> const_bidirect;
49
50    dna_complement(input, input, output);
51    dna_reverse_complement(bidirect, bidirect);
52    dna_reverse_complement_copy(const_bidirect, const_bidirect, output);
53  }
54
55  return suite.return_value();
56}
Note: See TracBrowser for help on using the repository browser.