mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
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:
@ -11,6 +11,7 @@
|
||||
#include "tests/config.h"
|
||||
#include <string>
|
||||
|
||||
namespace sls {
|
||||
// using namespace Catch::clara;
|
||||
using Opt = Catch::clara::Opt;
|
||||
using dt = slsDetectorDefs::detectorType;
|
||||
@ -23,18 +24,19 @@ dt type;
|
||||
auto GET = slsDetectorDefs::GET_ACTION;
|
||||
auto PUT = slsDetectorDefs::PUT_ACTION;
|
||||
} // namespace test
|
||||
} // namespace sls
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
test::my_ip = "undefined";
|
||||
sls::test::my_ip = "undefined";
|
||||
|
||||
Catch::Session session;
|
||||
auto cli =
|
||||
session.cli() |
|
||||
Opt(test::hostname, "hostname")["-hn"]["--hostname"](
|
||||
sls::Opt(sls::test::hostname, "hostname")["-hn"]["--hostname"](
|
||||
"Detector hostname for integration tests") |
|
||||
Opt(test::detector_type, "detector_type")["-dt"]["--detector_type"](
|
||||
sls::Opt(sls::test::detector_type, "detector_type")["-dt"]["--detector_type"](
|
||||
"Detector type for integration tests") |
|
||||
Opt(test::my_ip, "my_ip")["-hip"]["--host_ip"]("Host ip address");
|
||||
sls::Opt(sls::test::my_ip, "my_ip")["-hip"]["--host_ip"]("Host ip address");
|
||||
|
||||
session.cli(cli);
|
||||
|
||||
@ -43,11 +45,11 @@ int main(int argc, char *argv[]) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
test::type = slsDetectorDefs::GENERIC;
|
||||
if (!test::detector_type.empty()) {
|
||||
test::type =
|
||||
sls::StringTo<slsDetectorDefs::detectorType>(test::detector_type);
|
||||
sls::test::type = slsDetectorDefs::GENERIC;
|
||||
if (!sls::test::detector_type.empty()) {
|
||||
sls::test::type =
|
||||
sls::StringTo<slsDetectorDefs::detectorType>(sls::test::detector_type);
|
||||
}
|
||||
|
||||
return session.run();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user