10 #include "../../../tests/catch2/catch.hpp"
11 #include "../../tests/testMacrosINDI.hpp"
13 #include "../tcsInterface.hpp"
26 m_configName = device;
64 SCENARIO(
"Parsing times in x:m:s format",
"[tcsInterface]" )
66 GIVEN(
"A valid x:m:s string")
70 WHEN(
"Positive, double digit integers")
74 std::string tstr =
"12:20:50";
88 WHEN(
"Negative, double digit integers")
92 std::string tstr =
"-22:30:48";
106 WHEN(
"Positive, double digit, decimal seconds")
110 std::string tstr =
"12:20:50.267849";
124 WHEN(
"Negative, double digit integers")
128 std::string tstr =
"-22:30:48.8771819";
143 GIVEN(
"Invalid x:m:s strings")
151 std::string tstr =
"";
166 std::string tstr =
"12-20-50";
181 std::string tstr =
"12:20-50";
192 WHEN(
"two :, but one at beginning")
196 std::string tstr =
":12:20";
207 WHEN(
"two :, but no m")
211 std::string tstr =
"12::20";
222 WHEN(
"two :, but one at end")
226 std::string tstr =
"12:20:";
241 std::string tstr =
"x:20:80";
256 std::string tstr =
"-x:20:80";
271 std::string tstr =
"20:m:80";
286 std::string tstr =
"-12:m:80";
301 std::string tstr =
"20:23:s.ssy";
316 std::string tstr =
"-12:23:s.sye";
#define REQUIRE_THAT(arg, matcher)
The MagAO-X Clay Telescope TCS Interface.
int parse_xms(double &x, double &m, double &s, const std::string &xmsstr)
tcsInterface_test(const std::string device)
#define XWCTEST_INDI_NEW_CALLBACK(testclass, propname)
Catch-2 tests for whether a NEW callback properly validates the input property properly.
Floating::WithinAbsMatcher WithinAbs(double target, double margin)
SCENARIO("Parsing times in x:m:s format", "[tcsInterface]")
#define XWCTEST_SETUP_INDI_NEW_PROP(propname)