summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Sadiq <sadiq@sadiqpk.org>2023-06-16 13:50:54 +0530
committerMohammed Sadiq <sadiq@sadiqpk.org>2023-06-16 13:50:54 +0530
commitc5231f0ce34092a8e92ee0e2eac157f9e0655e33 (patch)
tree9489bd87335bfe8b972dbe3f8dafedf9c4b358ea
parentc2264cabae976cf534be08942ff33f3a58f8795e (diff)
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`
-rw-r--r--exercises/enums/enums3.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/enums/enums3.rs b/exercises/enums/enums3.rs
index 5d28441..98da169 100644
--- a/exercises/enums/enums3.rs
+++ b/exercises/enums/enums3.rs
@@ -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!");
}
}