1
// -*- mode: C++; tab-width: 2; -*-
4
// --------------------------------------------------------------------------
5
// OpenMS Mass Spectrometry Framework
6
// --------------------------------------------------------------------------
7
// Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
9
// This library is free software; you can redistribute it and/or
10
// modify it under the terms of the GNU Lesser General Public
11
// License as published by the Free Software Foundation; either
12
// version 2.1 of the License, or (at your option) any later version.
14
// This library is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
// Lesser General Public License for more details.
19
// You should have received a copy of the GNU Lesser General Public
20
// License along with this library; if not, write to the Free Software
21
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
// --------------------------------------------------------------------------
24
// $Maintainer: Clemens Groepl $
26
// --------------------------------------------------------------------------
28
#include <OpenMS/CONCEPT/ClassTest.h>
30
///////////////////////////
32
#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/GaussFitter1D.h>
34
///////////////////////////
36
using namespace OpenMS;
39
START_TEST(GaussFitter1D, "$Id: GaussFitter1D_test.C 8210 2011-03-28 13:19:52Z aiche $")
41
/////////////////////////////////////////////////////////////
42
/////////////////////////////////////////////////////////////
44
GaussFitter1D* ptr = 0;
45
GaussFitter1D* nullPointer = 0;
46
START_SECTION(GaussFitter1D())
48
ptr = new GaussFitter1D();
49
TEST_EQUAL(ptr->getName(), "GaussFitter1D")
50
TEST_NOT_EQUAL(ptr, nullPointer)
54
START_SECTION((GaussFitter1D(const GaussFitter1D &source)))
58
param.setValue( "tolerance_stdev_bounding_box", 1.0);
59
param.setValue( "statistics:mean", 680.1 );
60
param.setValue( "statistics:variance", 2.0 );
61
param.setValue( "interpolation_step", 1.0 );
62
gf1.setParameters(param);
64
GaussFitter1D gf2(gf1);
66
gf3.setParameters(param);
67
gf1 = GaussFitter1D();
68
TEST_EQUAL(gf3.getParameters(), gf2.getParameters())
71
START_SECTION((virtual ~GaussFitter1D()))
75
START_SECTION((virtual GaussFitter1D& operator=(const GaussFitter1D &source)))
79
param.setValue( "tolerance_stdev_bounding_box", 1.0);
80
param.setValue( "statistics:mean", 680.1 );
81
param.setValue( "statistics:variance", 2.0 );
82
param.setValue( "interpolation_step", 1.0 );
83
gf1.setParameters(param);
89
gf3.setParameters(param);
91
gf1 = GaussFitter1D();
92
TEST_EQUAL(gf3.getParameters(), gf2.getParameters())
95
START_SECTION((QualityType fit1d(const RawDataArrayType &range, InterpolationModel *&model)))
100
START_SECTION((Fitter1D* create()))
102
Fitter1D* ptr = GaussFitter1D::create();
103
TEST_EQUAL(ptr->getName(), "GaussFitter1D")
104
TEST_NOT_EQUAL(ptr, nullPointer)
108
START_SECTION((const String getProductName()))
110
TEST_EQUAL(GaussFitter1D::getProductName(),"GaussFitter1D")
111
TEST_EQUAL(GaussFitter1D().getName(),"GaussFitter1D")
116
/////////////////////////////////////////////////////////////
117
/////////////////////////////////////////////////////////////