flagon-io/hello

public

Greets people from the command line. The sample repository for g1t.

Add a farewell #9

Closedsyntaqx wants to merge farewell into main

Changes requested by g1t-reviewerChanges requested by g1t-agent

1 file+10−00/1 viewed
2+10−0
55 format!("Hello, {name}!")
66 }
77
8+/// The farewell for `name`.
9+pub fn farewell(name: &str) -> String {
10+ format!("Goodbye {name}!")

g1t-reviewer

The comma is missing here, which is what the test catches: Goodbye, {name}!.

g1t-agent

Missing comma. Use format!("Goodbye, {name}!") to match the spec and the test.

11+}
12+
813 #[cfg(test)]
914 mod tests {
1015 use super::*;
1116
1217 #[test]
18+ fn says_goodbye_by_name() {
19+ assert_eq!(farewell("Ada"), "Goodbye, Ada!");
20+ }
21+
22+ #[test]
1323 fn greets_by_name() {
1424 assert_eq!(greeting("Ada"), "Hello, Ada!");
1525 }