mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
@ -38,7 +38,8 @@ int main(int argc, char **argv) {
|
||||
for (int i = 0; i != 100; ++i) {
|
||||
std::cout << "Sending: " << i << "\n";
|
||||
auto socket = sls::ClientSocket("test", hostname, port);
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_int) << " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_int)
|
||||
<< " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(i) << " bytes\n";
|
||||
}
|
||||
|
||||
@ -46,7 +47,8 @@ int main(int argc, char **argv) {
|
||||
for (int i = 0; i != 5; ++i) {
|
||||
std::cout << "Sending data\n";
|
||||
auto socket = sls::ClientSocket("test", hostname, port);
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_data) << " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_data)
|
||||
<< " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(data.get(), sls::DATA_SIZE)
|
||||
<< " bytes\n";
|
||||
}
|
||||
@ -54,7 +56,8 @@ int main(int argc, char **argv) {
|
||||
// Send too little data
|
||||
{
|
||||
auto socket = sls::ClientSocket("test", hostname, port);
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_data) << " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_data)
|
||||
<< " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(data.get(), sls::DATA_SIZE / 2)
|
||||
<< " bytes\n";
|
||||
}
|
||||
@ -71,7 +74,8 @@ int main(int argc, char **argv) {
|
||||
for (int i = 0; i != 10; ++i) {
|
||||
std::cout << "Sending: " << i << "\n";
|
||||
auto socket = sls::ClientSocket("test", hostname, port);
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_int) << " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(sls::func_id::read_int)
|
||||
<< " bytes\n";
|
||||
std::cout << "Sent: " << socket.Send(i) << " bytes\n";
|
||||
}
|
||||
|
||||
|
@ -30,13 +30,14 @@ int main(int argc, char *argv[]) {
|
||||
sls::test::my_ip = "undefined";
|
||||
|
||||
Catch::Session session;
|
||||
auto cli =
|
||||
session.cli() |
|
||||
sls::Opt(sls::test::hostname, "hostname")["-hn"]["--hostname"](
|
||||
"Detector hostname for integration tests") |
|
||||
sls::Opt(sls::test::detector_type, "detector_type")["-dt"]["--detector_type"](
|
||||
"Detector type for integration tests") |
|
||||
sls::Opt(sls::test::my_ip, "my_ip")["-hip"]["--host_ip"]("Host ip address");
|
||||
auto cli = session.cli() |
|
||||
sls::Opt(sls::test::hostname, "hostname")["-hn"]["--hostname"](
|
||||
"Detector hostname for integration tests") |
|
||||
sls::Opt(sls::test::detector_type,
|
||||
"detector_type")["-dt"]["--detector_type"](
|
||||
"Detector type for integration tests") |
|
||||
sls::Opt(sls::test::my_ip,
|
||||
"my_ip")["-hip"]["--host_ip"]("Host ip address");
|
||||
|
||||
session.cli(cli);
|
||||
|
||||
@ -47,8 +48,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
sls::test::type = slsDetectorDefs::GENERIC;
|
||||
if (!sls::test::detector_type.empty()) {
|
||||
sls::test::type =
|
||||
sls::StringTo<slsDetectorDefs::detectorType>(sls::test::detector_type);
|
||||
sls::test::type = sls::StringTo<slsDetectorDefs::detectorType>(
|
||||
sls::test::detector_type);
|
||||
}
|
||||
|
||||
return session.run();
|
||||
|
Reference in New Issue
Block a user