Skip to content

Commit ecd25dd

Browse files
authored
Merge pull request #263 from stevenhuey/FixIssue255
Fix issue #255
2 parents 5d98acc + ee90e78 commit ecd25dd

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

exercises/bob/Sources/BobExample.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ private extension String {
5959
struct Bob {
6060
static func hey(_ input: String) -> String {
6161
if input.trimWhiteSpace().isEmpty {
62-
return "Fine, be that way."
62+
return "Fine. Be that way!"
6363
} else if input.isShouting {
64-
return "Woah, chill out!"
64+
return "Whoa, chill out!"
6565
} else if input.isQuestion {
6666
return "Sure."
6767
} else {

exercises/bob/Tests/BobTests/BobTests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class BobTests: XCTestCase {
1212

1313
func testShouting() {
1414
let input = "WATCH OUT!"
15-
let expected = "Woah, chill out!"
15+
let expected = "Whoa, chill out!"
1616
let result = Bob.hey(input)
1717
XCTAssertEqual(expected, result)
1818
}
@@ -40,14 +40,14 @@ class BobTests: XCTestCase {
4040

4141
func testForcefulQuestions() {
4242
let input = "WHAT THE HELL WERE YOU THINKING?"
43-
let expected = "Woah, chill out!"
43+
let expected = "Whoa, chill out!"
4444
let result = Bob.hey(input)
4545
XCTAssertEqual(expected, result)
4646
}
4747

4848
func testShoutingNumbers() {
4949
let input = "1, 2, 3 GO!"
50-
let expected = "Woah, chill out!"
50+
let expected = "Whoa, chill out!"
5151
let result = Bob.hey(input)
5252
XCTAssertEqual(expected, result)
5353
}
@@ -68,14 +68,14 @@ class BobTests: XCTestCase {
6868

6969
func testShoutingWithSpecialCharacters() {
7070
let input = "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"
71-
let expected = "Woah, chill out!"
71+
let expected = "Whoa, chill out!"
7272
let result = Bob.hey(input)
7373
XCTAssertEqual(expected, result)
7474
}
7575

7676
func testShoutingWithUmlautsCharacters() {
7777
let input = "ÄMLÄTS!"
78-
let expected = "Woah, chill out!"
78+
let expected = "Whoa, chill out!"
7979
let result = Bob.hey(input)
8080
XCTAssertEqual(expected, result)
8181
}
@@ -89,7 +89,7 @@ class BobTests: XCTestCase {
8989

9090
func testShoutingWithNoExclamationmark() {
9191
let input = "I HATE YOU"
92-
let expected = "Woah, chill out!"
92+
let expected = "Whoa, chill out!"
9393
let result = Bob.hey(input)
9494
XCTAssertEqual(expected, result)
9595
}
@@ -110,14 +110,14 @@ class BobTests: XCTestCase {
110110

111111
func testSilence() {
112112
let input = ""
113-
let expected = "Fine, be that way."
113+
let expected = "Fine. Be that way!"
114114
let result = Bob.hey(input)
115115
XCTAssertEqual(expected, result)
116116
}
117117

118118
func testProlongedSilence() {
119119
let input = " "
120-
let expected = "Fine, be that way."
120+
let expected = "Fine. Be that way!"
121121
let result = Bob.hey(input)
122122
XCTAssertEqual(expected, result)
123123
}

0 commit comments

Comments
 (0)