Revision 41:16908c2bd781 test/TestPeakInterpolator.cpp

View differences:

test/TestPeakInterpolator.cpp
98 98
    BOOST_CHECK_EQUAL(result, 1.5);
99 99
}
100 100

  
101
BOOST_AUTO_TEST_CASE(aboveHalfway)
102
{
103
    double data[] = { 1.0, 1.5, 2.0, 1.0 };
104
    PeakInterpolator p;
105
    double result = p.findPeakLocation(data, 4, 2);
106
    BOOST_CHECK(result > 1.5 && result < 2.0);
107
}
108

  
109
BOOST_AUTO_TEST_CASE(belowHalfway)
110
{
111
    double data[] = { 1.0, 2.0, 1.5, 1.0 };
112
    PeakInterpolator p;
113
    double result = p.findPeakLocation(data, 4, 1);
114
    BOOST_CHECK(result > 1.0 && result < 1.5);
115
}
116

  
101 117
BOOST_AUTO_TEST_SUITE_END()
102 118

  

Also available in: Unified diff