mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-25 06:57:31 -05:00
fix(enums3): modify message string in test
Otherwise it won't actually test the change of state.message and it would fail to check if the user missed changing state.message This happened to me as I had a catch-all line in `match`
This commit is contained in:
parent
c2264cabae
commit
c5231f0ce3
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ mod tests {
|
|||
message: "hello world".to_string(),
|
||||
};
|
||||
state.process(Message::ChangeColor(255, 0, 255));
|
||||
state.process(Message::Echo(String::from("hello world")));
|
||||
state.process(Message::Echo(String::from("Hello world!")));
|
||||
state.process(Message::Move(Point { x: 10, y: 15 }));
|
||||
state.process(Message::Quit);
|
||||
|
||||
|
@ -67,6 +67,6 @@ mod tests {
|
|||
assert_eq!(state.position.x, 10);
|
||||
assert_eq!(state.position.y, 15);
|
||||
assert_eq!(state.quit, true);
|
||||
assert_eq!(state.message, "hello world");
|
||||
assert_eq!(state.message, "Hello world!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue