Commit aeab5bbf authored by Markus Klinik's avatar Markus Klinik
Browse files

simplify error message

parent 455da912
......@@ -35,7 +35,7 @@ set[Message] aSnake_view_separated(M3 model)
, findClass(model, "Food")
, findClass(model, "World")
};
return { error("<getName(model, shapeClass)> is part of the user interface and should be moved to SnakeGame", createdClass)
return { error("<getName(model, shapeClass)>: only SnakeGame should use shapes", createdClass)
| createdClass <- createdClasses
, shapeClass <- shapeClasses
, shapeClass in model.extends[createdClass] || shapeClass in allTypeDependenciesLoc(model, createdClass)
......@@ -55,7 +55,7 @@ set[Message] aSnake_controller_separated(M3 model)
, findClass(model, "Food")
, findClass(model, "World")
};
return { error("<getName(model, eventClass)> is part of the input and should be moved to InputHandler", createdClass)
return { error("<getName(model, eventClass)>: only InputHandler should handle input events", createdClass)
| createdClass <- createdClasses
, eventClass <- eventClasses
, eventClass in allTypeDependenciesLoc(model, createdClass)
......
......@@ -20,8 +20,8 @@ test bool aSnakegraphicsNotInView()
M3 model = loadTestProject("assignment-snake-graphics-not-in-view");
errors = allAssignmentSnakeRules(model);
return
{ "Rectangle is part of the user interface and should be moved to SnakeGame"
, "Circle is part of the user interface and should be moved to SnakeGame"
{ "Rectangle: only SnakeGame should use shapes"
, "Circle: only SnakeGame should use shapes"
} == messages(errors);
}
......@@ -30,7 +30,7 @@ test bool aSnakeinputNotInController()
M3 model = loadTestProject("assignment-snake-input-not-in-controller");
errors = allAssignmentSnakeRules(model);
return
{ "KeyEvent is part of the input and should be moved to InputHandler"
, "MouseEvent is part of the input and should be moved to InputHandler"
{ "KeyEvent: only InputHandler should handle input events"
, "MouseEvent: only InputHandler should handle input events"
} == messages(errors);
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment