ProteoWizard
VendorReaderTestHarness.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu>
6//
7// Copyright 2009 Vanderbilt University - Nashville, TN 37232
8//
9// Licensed under the Apache License, Version 2.0 (the "License");
10// you may not use this file except in compliance with the License.
11// You may obtain a copy of the License at
12//
13// http://www.apache.org/licenses/LICENSE-2.0
14//
15// Unless required by applicable law or agreed to in writing, software
16// distributed under the License is distributed on an "AS IS" BASIS,
17// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18// See the License for the specific language governing permissions and
19// limitations under the License.
20//
21
22
25#include <boost/optional.hpp>
26#include <string>
27#include <vector>
28
29
30namespace pwiz {
31namespace util {
32
33
34/// test implementations derive from this to define which paths should be tested
36{
37 /// returns true iff the given rawpath is a real path to test/generate
38 virtual bool operator() (const std::string& rawpath) const = 0;
39
40 virtual ~TestPathPredicate() {}
41};
42
43
45{
46 ReaderTestConfig() : peakPicking(false) {}
47 std::string resultFilename(const std::string& baseFilename) const;
49 boost::optional<std::pair<int, int>> indexRange;
50};
51
52/// A common test harness for vendor readers;
55 const std::vector<std::string>& args,
56 bool testAcceptOnly, bool requireUnicodeSupport,
57 const TestPathPredicate& isPathTestable,
58 const ReaderTestConfig& config = ReaderTestConfig());
59
60
61} // namespace util
62} // namespace pwiz
#define PWIZ_API_DECL
Definition Export.hpp:32
void testReader()
interface for file readers
Definition Reader.hpp:39
Reader configuration.
Definition Reader.hpp:45
std::string resultFilename(const std::string &baseFilename) const
boost::optional< std::pair< int, int > > indexRange
test implementations derive from this to define which paths should be tested