refactor(app): reorganize application structure and update includes
- Moved core components such as `Controller` and `Window` from `src/app/core/` to `src/app/` and `src/app/platform/`, respectively, to improve modularity and clarity. - Updated include paths across the codebase to reflect the new locations of these components. - Introduced a new foundational core library in `src/core/` for project management and ROM patching logic, enhancing the separation of concerns. - Adjusted CMake configurations to ensure proper compilation of the new core library and updated dependencies in various modules. Benefits: - Streamlines the application structure, making it easier to navigate and maintain. - Enhances code organization by clearly delineating core functionalities from application-specific logic. - Improves overall architecture by promoting a clearer separation of concerns between different components.
This commit is contained in:
53
src/app/test/test_script_parser.h
Normal file
53
src/app/test/test_script_parser.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#ifndef YAZE_APP_CORE_TESTING_TEST_SCRIPT_PARSER_H_
|
||||
#define YAZE_APP_CORE_TESTING_TEST_SCRIPT_PARSER_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/status/statusor.h"
|
||||
#include "absl/time/time.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace test {
|
||||
|
||||
struct TestScriptStep {
|
||||
std::string action;
|
||||
std::string target;
|
||||
std::string click_type;
|
||||
std::string text;
|
||||
bool clear_first = false;
|
||||
std::string condition;
|
||||
int timeout_ms = 0;
|
||||
std::string region;
|
||||
std::string format;
|
||||
bool expect_success = true;
|
||||
std::string expect_status;
|
||||
std::string expect_message;
|
||||
std::vector<std::string> expect_assertion_failures;
|
||||
std::map<std::string, int32_t> expect_metrics;
|
||||
};
|
||||
|
||||
struct TestScript {
|
||||
int schema_version = 1;
|
||||
std::string recording_id;
|
||||
std::string name;
|
||||
std::string description;
|
||||
absl::Time created_at = absl::InfinitePast();
|
||||
absl::Duration duration = absl::ZeroDuration();
|
||||
std::vector<TestScriptStep> steps;
|
||||
};
|
||||
|
||||
class TestScriptParser {
|
||||
public:
|
||||
static absl::Status WriteToFile(const TestScript& script,
|
||||
const std::string& path);
|
||||
|
||||
static absl::StatusOr<TestScript> ParseFromFile(const std::string& path);
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace yaze
|
||||
|
||||
#endif // YAZE_APP_CORE_TESTING_TEST_SCRIPT_PARSER_H_
|
||||
Reference in New Issue
Block a user