Skip to content

Commit b534ab3

Browse files
authored
bob: sync (#2156)
There have been two recent PRs to the upstream data for these tests. One added a test, the other reordered the existing ones. The added test case doesn't seem important, so I'm adding: [no important files changed]
1 parent f254d21 commit b534ab3

2 files changed

Lines changed: 105 additions & 96 deletions

File tree

exercises/practice/bob/.meta/tests.toml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,82 +9,85 @@
99
# As user-added comments (using the # character) will be removed when this file
1010
# is regenerated, comments can be added via a `comment` key.
1111

12-
[e162fead-606f-437a-a166-d051915cea8e]
13-
description = "stating something"
12+
[8a2e771d-d6f1-4e3f-b6c6-b41495556e37]
13+
description = "asking a question"
1414

1515
[73a966dc-8017-47d6-bb32-cf07d1a5fcd9]
1616
description = "shouting"
1717

18-
[d6c98afd-df35-4806-b55e-2c457c3ab748]
19-
description = "shouting gibberish"
18+
[a5193c61-4a92-4f68-93e2-f554eb385ec6]
19+
description = "forceful question"
2020

21-
[8a2e771d-d6f1-4e3f-b6c6-b41495556e37]
22-
description = "asking a question"
21+
[bc39f7c6-f543-41be-9a43-fd1c2f753fc0]
22+
description = "silence"
23+
24+
[e162fead-606f-437a-a166-d051915cea8e]
25+
description = "stating something"
2326

2427
[81080c62-4e4d-4066-b30a-48d8d76920d9]
2528
description = "asking a numeric question"
2629

2730
[2a02716d-685b-4e2e-a804-2adaf281c01e]
2831
description = "asking gibberish"
2932

30-
[c02f9179-ab16-4aa7-a8dc-940145c385f7]
31-
description = "talking forcefully"
33+
[bb0011c5-cd52-4a5b-8bfb-a87b6283b0e2]
34+
description = "question with no letters"
3235

33-
[153c0e25-9bb5-4ec5-966e-598463658bcd]
34-
description = "using acronyms in regular speech"
36+
[9bfc677d-ea3a-45f2-be44-35bc8fa3753e]
37+
description = "non-letters with question"
3538

36-
[a5193c61-4a92-4f68-93e2-f554eb385ec6]
37-
description = "forceful question"
39+
[8608c508-f7de-4b17-985b-811878b3cf45]
40+
description = "prattling on"
3841

39-
[a20e0c54-2224-4dde-8b10-bd2cdd4f61bc]
40-
description = "shouting numbers"
42+
[05b304d6-f83b-46e7-81e0-4cd3ca647900]
43+
description = "ending with whitespace"
4144

42-
[f7bc4b92-bdff-421e-a238-ae97f230ccac]
43-
description = "no letters"
45+
[2c7278ac-f955-4eb4-bf8f-e33eb4116a15]
46+
description = "multiple line question"
47+
reimplements = "66953780-165b-4e7e-8ce3-4bcb80b6385a"
4448

45-
[bb0011c5-cd52-4a5b-8bfb-a87b6283b0e2]
46-
description = "question with no letters"
49+
[d6c98afd-df35-4806-b55e-2c457c3ab748]
50+
description = "shouting gibberish"
51+
52+
[3c954328-86fb-4c71-8961-e18d6a5e2517]
53+
description = "shouting a statement containing a question mark"
54+
55+
[a20e0c54-2224-4dde-8b10-bd2cdd4f61bc]
56+
description = "shouting numbers"
4757

4858
[496143c8-1c31-4c01-8a08-88427af85c66]
4959
description = "shouting with special characters"
5060

5161
[e6793c1c-43bd-4b8d-bc11-499aea73925f]
5262
description = "shouting with no exclamation mark"
5363

54-
[aa8097cc-c548-4951-8856-14a404dd236a]
55-
description = "statement containing question mark"
56-
57-
[9bfc677d-ea3a-45f2-be44-35bc8fa3753e]
58-
description = "non-letters with question"
59-
60-
[8608c508-f7de-4b17-985b-811878b3cf45]
61-
description = "prattling on"
62-
63-
[bc39f7c6-f543-41be-9a43-fd1c2f753fc0]
64-
description = "silence"
65-
6664
[d6c47565-372b-4b09-b1dd-c40552b8378b]
6765
description = "prolonged silence"
6866

6967
[4428f28d-4100-4d85-a902-e5a78cb0ecd3]
7068
description = "alternate silence"
7169

70+
[72bd5ad3-9b2f-4931-a988-dce1f5771de2]
71+
description = "other whitespace"
72+
73+
[c02f9179-ab16-4aa7-a8dc-940145c385f7]
74+
description = "talking forcefully"
75+
76+
[153c0e25-9bb5-4ec5-966e-598463658bcd]
77+
description = "using acronyms in regular speech"
78+
79+
[f7bc4b92-bdff-421e-a238-ae97f230ccac]
80+
description = "no letters"
81+
82+
[aa8097cc-c548-4951-8856-14a404dd236a]
83+
description = "statement containing question mark"
84+
7285
[66953780-165b-4e7e-8ce3-4bcb80b6385a]
7386
description = "multiple line question"
7487
include = false
7588

7689
[5371ef75-d9ea-4103-bcfa-2da973ddec1b]
7790
description = "starting with whitespace"
7891

79-
[05b304d6-f83b-46e7-81e0-4cd3ca647900]
80-
description = "ending with whitespace"
81-
82-
[72bd5ad3-9b2f-4931-a988-dce1f5771de2]
83-
description = "other whitespace"
84-
8592
[12983553-8601-46a8-92fa-fcaa3bc4a2a0]
8693
description = "non-question ending with whitespace"
87-
88-
[2c7278ac-f955-4eb4-bf8f-e33eb4116a15]
89-
description = "multiple line question"
90-
reimplements = "66953780-165b-4e7e-8ce3-4bcb80b6385a"

exercises/practice/bob/tests/bob.rs

Lines changed: 62 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
use bob::*;
22

33
#[test]
4-
fn stating_something() {
5-
assert_eq!(reply("Tom-ay-to, tom-aaaah-to."), "Whatever.");
4+
fn asking_a_question() {
5+
assert_eq!(
6+
reply("Does this cryogenic chamber make me look fat?"),
7+
"Sure."
8+
);
69
}
710

811
#[test]
@@ -13,17 +16,23 @@ fn shouting() {
1316

1417
#[test]
1518
#[ignore]
16-
fn shouting_gibberish() {
17-
assert_eq!(reply("FCECDFCAAB"), "Whoa, chill out!");
19+
fn forceful_question() {
20+
assert_eq!(
21+
reply("WHAT'S GOING ON?"),
22+
"Calm down, I know what I'm doing!"
23+
);
1824
}
1925

2026
#[test]
2127
#[ignore]
22-
fn asking_a_question() {
23-
assert_eq!(
24-
reply("Does this cryogenic chamber make me look fat?"),
25-
"Sure."
26-
);
28+
fn silence() {
29+
assert_eq!(reply(""), "Fine. Be that way!");
30+
}
31+
32+
#[test]
33+
#[ignore]
34+
fn stating_something() {
35+
assert_eq!(reply("Tom-ay-to, tom-aaaah-to."), "Whatever.");
2736
}
2837

2938
#[test]
@@ -40,44 +49,53 @@ fn asking_gibberish() {
4049

4150
#[test]
4251
#[ignore]
43-
fn talking_forcefully() {
44-
assert_eq!(reply("Hi there!"), "Whatever.");
52+
fn question_with_no_letters() {
53+
assert_eq!(reply("4?"), "Sure.");
4554
}
4655

4756
#[test]
4857
#[ignore]
49-
fn using_acronyms_in_regular_speech() {
50-
assert_eq!(
51-
reply("It's OK if you don't want to go work for NASA."),
52-
"Whatever."
53-
);
58+
fn non_letters_with_question() {
59+
assert_eq!(reply(":) ?"), "Sure.");
5460
}
5561

5662
#[test]
5763
#[ignore]
58-
fn forceful_question() {
64+
fn prattling_on() {
65+
assert_eq!(reply("Wait! Hang on. Are you going to be OK?"), "Sure.");
66+
}
67+
68+
#[test]
69+
#[ignore]
70+
fn ending_with_whitespace() {
71+
assert_eq!(reply("Okay if like my spacebar quite a bit? "), "Sure.");
72+
}
73+
74+
#[test]
75+
#[ignore]
76+
fn multiple_line_question() {
5977
assert_eq!(
60-
reply("WHAT'S GOING ON?"),
61-
"Calm down, I know what I'm doing!"
78+
reply("\nDoes this cryogenic chamber make\n me look fat?"),
79+
"Sure."
6280
);
6381
}
6482

6583
#[test]
6684
#[ignore]
67-
fn shouting_numbers() {
68-
assert_eq!(reply("1, 2, 3 GO!"), "Whoa, chill out!");
85+
fn shouting_gibberish() {
86+
assert_eq!(reply("FCECDFCAAB"), "Whoa, chill out!");
6987
}
7088

7189
#[test]
7290
#[ignore]
73-
fn no_letters() {
74-
assert_eq!(reply("1, 2, 3"), "Whatever.");
91+
fn shouting_a_statement_containing_a_question_mark() {
92+
assert_eq!(reply("DO LIONS EAT PEOPLE? AHHHHH."), "Whoa, chill out!");
7593
}
7694

7795
#[test]
7896
#[ignore]
79-
fn question_with_no_letters() {
80-
assert_eq!(reply("4?"), "Sure.");
97+
fn shouting_numbers() {
98+
assert_eq!(reply("1, 2, 3 GO!"), "Whoa, chill out!");
8199
}
82100

83101
#[test]
@@ -97,56 +115,53 @@ fn shouting_with_no_exclamation_mark() {
97115

98116
#[test]
99117
#[ignore]
100-
fn statement_containing_question_mark() {
101-
assert_eq!(reply("Ending with ? means a question."), "Whatever.");
102-
}
103-
104-
#[test]
105-
#[ignore]
106-
fn non_letters_with_question() {
107-
assert_eq!(reply(":) ?"), "Sure.");
118+
fn prolonged_silence() {
119+
assert_eq!(reply(" "), "Fine. Be that way!");
108120
}
109121

110122
#[test]
111123
#[ignore]
112-
fn prattling_on() {
113-
assert_eq!(reply("Wait! Hang on. Are you going to be OK?"), "Sure.");
124+
fn alternate_silence() {
125+
assert_eq!(reply("\t\t\t\t\t\t\t\t\t\t"), "Fine. Be that way!");
114126
}
115127

116128
#[test]
117129
#[ignore]
118-
fn silence() {
119-
assert_eq!(reply(""), "Fine. Be that way!");
130+
fn other_whitespace() {
131+
assert_eq!(reply("\n\r \t"), "Fine. Be that way!");
120132
}
121133

122134
#[test]
123135
#[ignore]
124-
fn prolonged_silence() {
125-
assert_eq!(reply(" "), "Fine. Be that way!");
136+
fn talking_forcefully() {
137+
assert_eq!(reply("Hi there!"), "Whatever.");
126138
}
127139

128140
#[test]
129141
#[ignore]
130-
fn alternate_silence() {
131-
assert_eq!(reply("\t\t\t\t\t\t\t\t\t\t"), "Fine. Be that way!");
142+
fn using_acronyms_in_regular_speech() {
143+
assert_eq!(
144+
reply("It's OK if you don't want to go work for NASA."),
145+
"Whatever."
146+
);
132147
}
133148

134149
#[test]
135150
#[ignore]
136-
fn starting_with_whitespace() {
137-
assert_eq!(reply(" hmmmmmmm..."), "Whatever.");
151+
fn no_letters() {
152+
assert_eq!(reply("1, 2, 3"), "Whatever.");
138153
}
139154

140155
#[test]
141156
#[ignore]
142-
fn ending_with_whitespace() {
143-
assert_eq!(reply("Okay if like my spacebar quite a bit? "), "Sure.");
157+
fn statement_containing_question_mark() {
158+
assert_eq!(reply("Ending with ? means a question."), "Whatever.");
144159
}
145160

146161
#[test]
147162
#[ignore]
148-
fn other_whitespace() {
149-
assert_eq!(reply("\n\r \t"), "Fine. Be that way!");
163+
fn starting_with_whitespace() {
164+
assert_eq!(reply(" hmmmmmmm..."), "Whatever.");
150165
}
151166

152167
#[test]
@@ -157,12 +172,3 @@ fn non_question_ending_with_whitespace() {
157172
"Whatever."
158173
);
159174
}
160-
161-
#[test]
162-
#[ignore]
163-
fn multiple_line_question() {
164-
assert_eq!(
165-
reply("\nDoes this cryogenic chamber make\n me look fat?"),
166-
"Sure."
167-
);
168-
}

0 commit comments

Comments
 (0)