Skip to content

Commit c5231f0

Browse files
committed
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`
1 parent c2264ca commit c5231f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/enums/enums3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ mod tests {
5959
message: "hello world".to_string(),
6060
};
6161
state.process(Message::ChangeColor(255, 0, 255));
62-
state.process(Message::Echo(String::from("hello world")));
62+
state.process(Message::Echo(String::from("Hello world!")));
6363
state.process(Message::Move(Point { x: 10, y: 15 }));
6464
state.process(Message::Quit);
6565

6666
assert_eq!(state.color, (255, 0, 255));
6767
assert_eq!(state.position.x, 10);
6868
assert_eq!(state.position.y, 15);
6969
assert_eq!(state.quit, true);
70-
assert_eq!(state.message, "hello world");
70+
assert_eq!(state.message, "Hello world!");
7171
}
7272
}

0 commit comments

Comments
 (0)