Test data structure for parameterized testing
| 18 | |
| 19 | // Test data structure for parameterized testing |
| 20 | struct ExternalCommandTestData { |
| 21 | std::string command; |
| 22 | std::string platform; // "windows", "linux", "macos", or "all" |
| 23 | bool should_succeed; |
| 24 | std::string description; |
| 25 | std::string working_directory; // Optional: if empty, uses SUNSHINE_SOURCE_DIR |
| 26 | bool xfail_condition = false; // Optional: condition for expected failure |
| 27 | std::string xfail_reason = ""; // Optional: reason for expected failure |
| 28 | |
| 29 | // Constructor with xfail parameters |
| 30 | ExternalCommandTestData(std::string cmd, std::string plat, const bool succeed, std::string desc, std::string work_dir = "", const bool xfail_cond = false, std::string xfail_rsn = ""): |
| 31 | command(std::move(cmd)), |
| 32 | platform(std::move(plat)), |
| 33 | should_succeed(succeed), |
| 34 | description(std::move(desc)), |
| 35 | working_directory(std::move(work_dir)), |
| 36 | xfail_condition(xfail_cond), |
| 37 | xfail_reason(std::move(xfail_rsn)) {} |
| 38 | }; |
| 39 | |
| 40 | class ExternalCommandTest: public ::testing::TestWithParam<ExternalCommandTestData> { |
| 41 | protected: |
nothing calls this directly
no outgoing calls
no test coverage detected