tests add to namespace sls (#466)

* tests add to namespace sls

* fixed for tests

* finish up namespace sls for tests
This commit is contained in:
Dhanya Thattil
2022-05-23 16:17:32 +02:00
committed by GitHub
parent 8656eeec25
commit d61741c28b
44 changed files with 360 additions and 236 deletions

View File

@ -6,6 +6,8 @@
#include "tests/globals.h"
#include <iostream>
namespace sls {
class MultiDetectorFixture {
protected:
DetectorImpl d;
@ -136,7 +138,7 @@ TEST_CASE_METHOD(MultiDetectorFixture, "Get ID", "[.eigerintegration][cli]") {
std::string hn = test::hostname;
hn.erase(std::remove(begin(hn), end(hn), 'b'), end(hn));
hn.erase(std::remove(begin(hn), end(hn), 'e'), end(hn));
auto hostnames = sls::split(hn, '+');
auto hostnames = split(hn, '+');
CHECK(hostnames.size() == d.getNumberOfDetectors());
for (int i = 0; i != d.getNumberOfDetectors(); ++i) {
CHECK(d.getId(defs::DETECTOR_SERIAL_NUMBER, 0) ==
@ -198,3 +200,5 @@ TEST_CASE_METHOD(MultiDetectorFixture, "rate correction",
d.setRateCorrection(200);
CHECK(d.getRateCorrection() == 200);
}
} // namespace sls