10 #include "../../../tests/catch2/catch.hpp"
11 #include "../../../tests/testMacrosINDI.hpp"
13 #include "../userGainCtrl.hpp"
26 m_configName = device;
48 SCENARIO(
"Calculating Blocks",
"[userGainCtrl]" )
53 std::vector<uint16_t> blocks;
54 std::vector<std::string> names;
81 WHEN(
"Partial blocks")
110 WHEN(
"Full blocks, Zernikes in 1 block, no split")
112 rv =
blockModes(blocks, names, 24, 10,
false);
131 rv =
blockModes(blocks, names, 168, 23,
false);
144 WHEN(
"Full blocks, Zernikes in 2 blocks, no split")
146 rv =
blockModes(blocks, names, 24, 25,
false);
154 rv =
blockModes(blocks, names, 80, 25,
false);
163 rv =
blockModes(blocks, names, 168, 79,
false);
174 WHEN(
"Partial blocks, Zernikes in 1 block, no split")
176 rv =
blockModes(blocks, names, 25, 10,
false);
197 rv =
blockModes(blocks, names, 287, 23,
false);
211 WHEN(
"Partial blocks, Zernikes in 2 blocks, no split")
213 rv =
blockModes(blocks, names, 26, 25,
false);
222 rv =
blockModes(blocks, names, 85, 25,
false);
232 rv =
blockModes(blocks, names, 287, 79,
false);
245 WHEN(
"Full blocks, Zernikes in 1 block, with split")
268 rv =
blockModes(blocks, names, 168, 23,
true);
282 WHEN(
"Full blocks, Zernikes in 2 blocks, with split")
303 rv =
blockModes(blocks, names, 168, 79,
true);
315 WHEN(
"Partial blocks, Zernikes in 1 block, with split")
340 rv =
blockModes(blocks, names, 287, 23,
true);
355 WHEN(
"Partial blocks, Zernikes in 2 blocks, with split")
378 rv =
blockModes(blocks, names, 287, 79,
true);
393 WHEN(
"Partial blocks, Zernikes in 3 blocks, with split")
414 rv =
blockModes(blocks, names, 287, 100,
true);
427 WHEN(
"The Full MagAO-X")
429 rv =
blockModes(blocks, names, 2400, 10,
true);
userGainCtrl_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.
#define XWCTEST_INDI_ARBNEW_CALLBACK(testclass, callback, propname)
Catch-2 tests for whether an arbitrary callback properly validates the input property properly.
int blockModes(std::vector< uint16_t > &blocks, std::vector< std::string > &names, uint16_t Nmodes, uint16_t Nzern, bool splitTT)
Calculate the number of blocks and the number of modes per block.
SCENARIO("Calculating Blocks", "[userGainCtrl]")
#define XWCTEST_SETUP_INDI_NEW_PROP(propname)