New command line app and removing slsDetectorCommand (#69)

* WIP

* WIP

* WIP

* WIP

* config2 working

* removed slsDetectorCommand

* WIP

* added test file

* more tests
This commit is contained in:
Erik Fröjdh
2019-11-18 09:29:17 +01:00
committed by Dhanya Thattil
parent 6a27207875
commit fa2c842745
23 changed files with 5964 additions and 1451 deletions

View File

@ -158,6 +158,25 @@ SCENARIO("Parsing strings with -h or --help", "[support]") {
}
}
TEST_CASE("Parsing consecutive strings resets not found det id"){
CmdLineParser p;
p.Parse("1:exptime 0.5");
REQUIRE(p.detector_id() == 1);
p.Parse("exptime 0.5");
REQUIRE(p.detector_id() == -1);
p.Parse("3:exptime 0.5");
REQUIRE(p.detector_id() == 3);
}
TEST_CASE("Parsing consecutive strings resets not found multi id"){
CmdLineParser p;
p.Parse("1-1:exptime 0.5");
REQUIRE(p.multi_id() == 1);
p.Parse("1:exptime 0.5");
REQUIRE(p.multi_id() == 0);
}
TEST_CASE("Parse with no arguments results in no command and default id",
"[support]") {
// build up argc and argv