Commit 6aeec190 authored by Samuel Jackson's avatar Samuel Jackson
Browse files

Fix warnings in tests

parent 7acfbcc1
......@@ -156,14 +156,12 @@ public:
void test_GetSetSample() {
ExperimentInfo ws;
TS_ASSERT(&ws.sample());
ws.mutableSample().setName("test");
TS_ASSERT_EQUALS(ws.sample().getName(), "test");
}
void test_GetSetRun() {
ExperimentInfo ws;
TS_ASSERT(&ws.run());
ws.mutableRun().setProtonCharge(1.234);
TS_ASSERT_DELTA(ws.run().getProtonCharge(), 1.234, 0.001);
}
......
......@@ -28,12 +28,12 @@ public:
AffineMatrixType product = parameter->getAffineMatrix();
// Check that matrix is recovered.
TSM_ASSERT(1, product[0][0]);
TSM_ASSERT(2, product[0][1]);
TSM_ASSERT(3, product[1][0]);
TSM_ASSERT(4, product[1][1]);
TSM_ASSERT(5, product[2][0]);
TSM_ASSERT(6, product[2][1]);
TS_ASSERT_EQUALS(1, product[0][0]);
TS_ASSERT_EQUALS(2, product[0][1]);
TS_ASSERT_EQUALS(3, product[1][0]);
TS_ASSERT_EQUALS(4, product[1][1]);
TS_ASSERT_EQUALS(5, product[2][0]);
TS_ASSERT_EQUALS(6, product[2][1]);
delete parameter;
}
......@@ -53,15 +53,15 @@ public:
AffineMatrixType product = parameter->getAffineMatrix();
// Check that matrix is recovered.
TSM_ASSERT(1, product[0][0]);
TSM_ASSERT(2, product[0][1]);
TSM_ASSERT(3, product[0][2]);
TSM_ASSERT(4, product[1][0]);
TSM_ASSERT(5, product[1][1]);
TSM_ASSERT(6, product[1][2]);
TSM_ASSERT(7, product[2][0]);
TSM_ASSERT(8, product[2][1]);
TSM_ASSERT(9, product[2][2]);
TS_ASSERT_EQUALS(1, product[0][0]);
TS_ASSERT_EQUALS(2, product[0][1]);
TS_ASSERT_EQUALS(3, product[0][2]);
TS_ASSERT_EQUALS(4, product[1][0]);
TS_ASSERT_EQUALS(5, product[1][1]);
TS_ASSERT_EQUALS(6, product[1][2]);
TS_ASSERT_EQUALS(7, product[2][0]);
TS_ASSERT_EQUALS(8, product[2][1]);
TS_ASSERT_EQUALS(9, product[2][2]);
delete parameter;
}
......@@ -81,18 +81,18 @@ public:
AffineMatrixType product = parameter->getAffineMatrix();
// Check that matrix is recovered.
TSM_ASSERT(1, product[0][0]);
TSM_ASSERT(2, product[0][1]);
TSM_ASSERT(3, product[0][2]);
TSM_ASSERT(4, product[0][3]);
TSM_ASSERT(5, product[1][0]);
TSM_ASSERT(6, product[1][1]);
TSM_ASSERT(7, product[1][2]);
TSM_ASSERT(8, product[1][3]);
TSM_ASSERT(9, product[2][0]);
TSM_ASSERT(10, product[2][1]);
TSM_ASSERT(11, product[2][2]);
TSM_ASSERT(12, product[2][3]);
TS_ASSERT_EQUALS(1, product[0][0]);
TS_ASSERT_EQUALS(2, product[0][1]);
TS_ASSERT_EQUALS(3, product[0][2]);
TS_ASSERT_EQUALS(4, product[0][3]);
TS_ASSERT_EQUALS(5, product[1][0]);
TS_ASSERT_EQUALS(6, product[1][1]);
TS_ASSERT_EQUALS(7, product[1][2]);
TS_ASSERT_EQUALS(8, product[1][3]);
TS_ASSERT_EQUALS(9, product[2][0]);
TS_ASSERT_EQUALS(10, product[2][1]);
TS_ASSERT_EQUALS(11, product[2][2]);
TS_ASSERT_EQUALS(12, product[2][3]);
delete parameter;
}
......@@ -117,4 +117,4 @@ public:
TS_ASSERT_THROWS(parser.createParameter(pRootElem), std::runtime_error);
}
};
#endif
\ No newline at end of file
#endif
......@@ -34,7 +34,7 @@ public:
outerBackgroundRadius);
// Act + Assert
TSM_ASSERT(radius, peak.getEffectiveRadius());
TS_ASSERT_EQUALS(radius, peak.getEffectiveRadius());
}
void test_getRadius_gets_outer_background_radius_if_background_is_shown() {
......@@ -49,7 +49,7 @@ public:
peak.showBackgroundRadius(true);
// Act + Assert
TSM_ASSERT(outerBackgroundRadius, peak.getEffectiveRadius());
TS_ASSERT_EQUALS(outerBackgroundRadius, peak.getEffectiveRadius());
}
void test_handle_outer_background_radius_zero() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment