mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 20:37:15 +02:00
Test
This commit is contained in:
@ -273,4 +273,29 @@ TEST_CASE("int or uin64_t to a string in hex") {
|
||||
REQUIRE(r == "[0xf4, 0xffff, 0x1900b6]");
|
||||
r = ToStringHex(temp, 8);
|
||||
REQUIRE(r == "[0x000000f4, 0x0000ffff, 0x001900b6]");
|
||||
}
|
||||
|
||||
TEST_CASE("Streaming of slsDetectorDefs::scanParameters") {
|
||||
using namespace sls;
|
||||
{
|
||||
defs::scanParameters t{};
|
||||
std::ostringstream oss;
|
||||
oss << t;
|
||||
REQUIRE(oss.str() == "[disabled]");
|
||||
}
|
||||
{
|
||||
defs::scanParameters t{defs::VTH2, 500, 1500, 500};
|
||||
std::ostringstream oss;
|
||||
oss << t;
|
||||
REQUIRE(oss.str() == "[enabled\ndac vth2\nstart 500\nstop 1500\nstep "
|
||||
"500\nsettleTime 1ms\n]");
|
||||
}
|
||||
{
|
||||
defs::scanParameters t{defs::VTH2, 500, 1500, 500,
|
||||
std::chrono::milliseconds{500}};
|
||||
std::ostringstream oss;
|
||||
oss << t;
|
||||
REQUIRE(oss.str() == "[enabled\ndac vth2\nstart 500\nstop 1500\nstep "
|
||||
"500\nsettleTime 0.5s\n]");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user