DiffractionExperiment: Move internal variables to a C++ structure
This commit is contained in:
+11
-11
@@ -11,25 +11,25 @@ TEST_CASE("DetectorSetup_MismatchInSize") {
|
||||
|
||||
TEST_CASE("DetectorSetup_ProtoBuf") {
|
||||
DetectorSetup setup(DetectorGeometry(4), "JF", {"mx1","mx2","mx3","mx4"});
|
||||
JFJochProtoBuf::Detector detector = setup;
|
||||
REQUIRE(detector.description() == "JF");
|
||||
REQUIRE(detector.module_hostname_size() == 4);
|
||||
REQUIRE(detector.module_hostname(3) == "mx4");
|
||||
REQUIRE(detector.pixel_size_mm() == Approx(0.075));
|
||||
REQUIRE(detector.nmodules() == 4);
|
||||
REQUIRE(detector.geometry().module_geometry_size() == 4);
|
||||
|
||||
REQUIRE(setup.GetDescription() == "JF");
|
||||
REQUIRE(setup.GetDetectorModuleHostname().size() == 4);
|
||||
REQUIRE(setup.GetDetectorModuleHostname()[3] == "mx4");
|
||||
REQUIRE(setup.GetPixelSize_mm() == Approx(0.075));
|
||||
REQUIRE(setup.GetModulesNum() == 4);
|
||||
REQUIRE(setup.GetGeometry().GetModulesNum() == 4);
|
||||
}
|
||||
|
||||
TEST_CASE("DetectorSetup_ProtoBuf_FullSpeed") {
|
||||
DetectorSetup setup(DetectorGeometry(4), "JF", {"mx1","mx2","mx3","mx4"});
|
||||
JFJochProtoBuf::Detector detector = setup;
|
||||
REQUIRE(detector.udp_interface_count() == 2);
|
||||
|
||||
REQUIRE(setup.GetUDPInterfaceCount() == 2);
|
||||
REQUIRE_NOTHROW(setup.UDPInterfaceCount(1));
|
||||
REQUIRE_THROWS(setup.UDPInterfaceCount(0));
|
||||
REQUIRE_THROWS(setup.UDPInterfaceCount(5));
|
||||
REQUIRE_THROWS(setup.UDPInterfaceCount(-56));
|
||||
detector = setup;
|
||||
REQUIRE(detector.udp_interface_count() == 1);
|
||||
|
||||
REQUIRE(setup.GetUDPInterfaceCount() == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("DetectorSetup_LoadGainFile") {
|
||||
|
||||
Reference in New Issue
Block a user