Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef CUSTOMBINAXISTEST_H
#define CUSTOMBINAXISTEST_H
#include "CustomBinAxis.h"
#include "OutputDataIOHelper.h"
#include "Units.h"
#include "gtest/gtest.h"
#include <vector>
class CusomBinAxisTest: public ::testing::Test
{
protected:
CusomBinAxisTest()
: m_axis("name", 100, -1.0, 1.0){}
CustomBinAxis m_axis;
};
TEST_F(CusomBinAxisTest, CheckClone)
{
CustomBinAxis *clone=m_axis.clone();
EXPECT_TRUE(m_axis == *clone);
delete clone;
}
TEST_F(CusomBinAxisTest, IOStream)
{
std::ostringstream oss;
oss << m_axis;
CustomBinAxis *result = dynamic_cast<CustomBinAxis *>(OutputDataIOHelper::createFixedBinAxis(oss.str()));
EXPECT_TRUE(m_axis == *result);
delete result;
}
#endif