diff --git a/bin/json_schemas/complete_config_schema.json b/bin/json_schemas/complete_config_schema.json index af49f51a4d0..9aac372ec8c 100644 --- a/bin/json_schemas/complete_config_schema.json +++ b/bin/json_schemas/complete_config_schema.json @@ -915,22 +915,22 @@ "start_x" : { "description" : "(Optional) An integer starting x position for the mouse in window coordinates. Values will be clamped to within the window’s size. Defaults to zero.", "type" : "integer", - "minimum" : 1 + "minimum" : 0 }, "start_y" : { "description" : "(Optional) An integer starting y position for the mouse in window coordinates. Values will be clamped to within the window’s size. Defaults to zero.", "type" : "integer", - "minimum" : 1 + "minimum" : 0 }, "end_x" : { "description" : "(Optional) An integer ending x position for the mouse in window coordinates. Values will be clamped to within the window’s size. Defaults to zero.", "type" : "integer", - "minimum" : 1 + "minimum" : 0 }, "end_y" : { "description" : "(Optional) An integer ending y position for the mouse in window coordinates. Values will be clamped to within the window’s size. Defaults to zero.", "type" : "integer", - "minimum" : 1 + "minimum" : 0 }, "mouse_button" : { "description" : "(Optional) left, middle, or right. The mouse button to be clicked. Defaults to left.", diff --git a/grading/load_config_json.cpp b/grading/load_config_json.cpp index 368ff13f81c..b11419f5999 100644 --- a/grading/load_config_json.cpp +++ b/grading/load_config_json.cpp @@ -758,9 +758,8 @@ void FormatGraphicsActions(nlohmann::json &testcases, nlohmann::json &whole_conf validate_integer(action, "end_y", true, 0, 0); if(action["end_x"] == 0 && action["end_y"] == 0){ - std::cout << "ERROR: some movement must be specified in click and drag" << std::endl; + std::cout << "WARNING: some movement expected in click and drag" << std::endl; } - assert(action["end_x"] != 0 || action["end_y"] != 0); } //Click and drag delta can have an optional mouse button, and must have and end_x and end_y. @@ -772,11 +771,9 @@ void FormatGraphicsActions(nlohmann::json &testcases, nlohmann::json &whole_conf validate_integer(action, "end_y", true, -100000, 0); if(action["end_x"] == 0 && action["end_y"] == 0){ - std::cout << "ERROR: some movement must be specified in click and drag" << std::endl; + std::cout << "WARNING: some movement expected in click and drag delta" << std::endl; } - assert(action["end_x"] != 0 || action["end_y"] != 0); - } //Click has an optional mouse button. else if(action_name == "click"){