Skip to content

Commit 3546861

Browse files
sync bob tests (#383)
1 parent 9b8e887 commit 3546861

2 files changed

Lines changed: 89 additions & 83 deletions

File tree

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

Lines changed: 46 additions & 43 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+
[66953780-165b-4e7e-8ce3-4bcb80b6385a]
46+
description = "multiple line question"
47+
include = false
4448

45-
[bb0011c5-cd52-4a5b-8bfb-a87b6283b0e2]
46-
description = "question with no letters"
49+
[2c7278ac-f955-4eb4-bf8f-e33eb4116a15]
50+
description = "multiple line question"
51+
reimplements = "66953780-165b-4e7e-8ce3-4bcb80b6385a"
52+
53+
[d6c98afd-df35-4806-b55e-2c457c3ab748]
54+
description = "shouting gibberish"
55+
56+
[3c954328-86fb-4c71-8961-e18d6a5e2517]
57+
description = "shouting a statement containing a question mark"
58+
59+
[a20e0c54-2224-4dde-8b10-bd2cdd4f61bc]
60+
description = "shouting numbers"
4761

4862
[496143c8-1c31-4c01-8a08-88427af85c66]
4963
description = "shouting with special characters"
5064

5165
[e6793c1c-43bd-4b8d-bc11-499aea73925f]
5266
description = "shouting with no exclamation mark"
5367

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-
6668
[d6c47565-372b-4b09-b1dd-c40552b8378b]
6769
description = "prolonged silence"
6870

6971
[4428f28d-4100-4d85-a902-e5a78cb0ecd3]
7072
description = "alternate silence"
7173

72-
[66953780-165b-4e7e-8ce3-4bcb80b6385a]
73-
description = "multiple line question"
74-
include = false
74+
[72bd5ad3-9b2f-4931-a988-dce1f5771de2]
75+
description = "other whitespace"
7576

76-
[5371ef75-d9ea-4103-bcfa-2da973ddec1b]
77-
description = "starting with whitespace"
77+
[c02f9179-ab16-4aa7-a8dc-940145c385f7]
78+
description = "talking forcefully"
7879

79-
[05b304d6-f83b-46e7-81e0-4cd3ca647900]
80-
description = "ending with whitespace"
80+
[153c0e25-9bb5-4ec5-966e-598463658bcd]
81+
description = "using acronyms in regular speech"
8182

82-
[72bd5ad3-9b2f-4931-a988-dce1f5771de2]
83-
description = "other whitespace"
83+
[f7bc4b92-bdff-421e-a238-ae97f230ccac]
84+
description = "no letters"
85+
86+
[aa8097cc-c548-4951-8856-14a404dd236a]
87+
description = "statement containing question mark"
88+
89+
[5371ef75-d9ea-4103-bcfa-2da973ddec1b]
90+
description = "starting with whitespace"
8491

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/test.sml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(* version 1.4.0 *)
1+
(* version 1.5.0 *)
22

33
use "bob.sml";
44
use "testlib.sml";
@@ -8,77 +8,80 @@ fun x |> f = f x
88

99
val testsuite =
1010
describe "bob" [
11-
test "stating something"
12-
(fn _ => response ("Tom-ay-to, tom-aaaah-to.") |> Expect.equalTo "Whatever."),
11+
test "asking a question"
12+
(fn _ => response ("Does this cryogenic chamber make me look fat?") |> Expect.equalTo "Sure."),
1313

1414
test "shouting"
1515
(fn _ => response ("WATCH OUT!") |> Expect.equalTo "Whoa, chill out!"),
1616

17-
test "shouting gibberish"
18-
(fn _ => response ("FCECDFCAAB") |> Expect.equalTo "Whoa, chill out!"),
17+
test "forceful question"
18+
(fn _ => response ("WHAT'S GOING ON?") |> Expect.equalTo "Calm down, I know what I'm doing!"),
1919

20-
test "asking a question"
21-
(fn _ => response ("Does this cryogenic chamber make me look fat?") |> Expect.equalTo "Sure."),
20+
test "silence"
21+
(fn _ => response ("") |> Expect.equalTo "Fine. Be that way!"),
22+
23+
test "stating something"
24+
(fn _ => response ("Tom-ay-to, tom-aaaah-to.") |> Expect.equalTo "Whatever."),
2225

2326
test "asking a numeric question"
2427
(fn _ => response ("You are, what, like 15?") |> Expect.equalTo "Sure."),
2528

2629
test "asking gibberish"
2730
(fn _ => response ("fffbbcbeab?") |> Expect.equalTo "Sure."),
2831

29-
test "talking forcefully"
30-
(fn _ => response ("Let's go make out behind the gym!") |> Expect.equalTo "Whatever."),
32+
test "question with no letters"
33+
(fn _ => response ("4?") |> Expect.equalTo "Sure."),
3134

32-
test "using acronyms in regular speech"
33-
(fn _ => response ("It's OK if you don't want to go to the DMV.") |> Expect.equalTo "Whatever."),
35+
test "non-letters with question"
36+
(fn _ => response (":) ?") |> Expect.equalTo "Sure."),
3437

35-
test "forceful question"
36-
(fn _ => response ("WHAT THE HELL WERE YOU THINKING?") |> Expect.equalTo "Calm down, I know what I'm doing!"),
38+
test "prattling on"
39+
(fn _ => response ("Wait! Hang on. Are you going to be OK?") |> Expect.equalTo "Sure."),
3740

38-
test "shouting numbers"
39-
(fn _ => response ("1, 2, 3 GO!") |> Expect.equalTo "Whoa, chill out!"),
41+
test "ending with whitespace"
42+
(fn _ => response ("Okay if like my spacebar quite a bit? ") |> Expect.equalTo "Sure."),
4043

41-
test "no letters"
42-
(fn _ => response ("1, 2, 3") |> Expect.equalTo "Whatever."),
44+
test "multiple line question"
45+
(fn _ => response ("\nDoes this cryogenic chamber make\n me look fat?") |> Expect.equalTo "Sure."),
4346

44-
test "question with only numbers"
45-
(fn _ => response ("4?") |> Expect.equalTo "Sure."),
47+
test "shouting gibberish"
48+
(fn _ => response ("FCECDFCAAB") |> Expect.equalTo "Whoa, chill out!"),
49+
50+
test "shouting a statement containing a question mark"
51+
(fn _ => response ("DO LIONS EAT PEOPLE? AHHHHH.") |> Expect.equalTo "Whoa, chill out!"),
52+
53+
test "shouting numbers"
54+
(fn _ => response ("1, 2, 3 GO!") |> Expect.equalTo "Whoa, chill out!"),
4655

4756
test "shouting with special characters"
4857
(fn _ => response ("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!") |> Expect.equalTo "Whoa, chill out!"),
4958

5059
test "shouting with no exclamation mark"
51-
(fn _ => response ("I HATE THE DMV") |> Expect.equalTo "Whoa, chill out!"),
52-
53-
test "statement containing question mark"
54-
(fn _ => response ("Ending with ? means a question.") |> Expect.equalTo "Whatever."),
55-
56-
test "non-letters with question"
57-
(fn _ => response (":) ?") |> Expect.equalTo "Sure."),
58-
59-
test "prattling on"
60-
(fn _ => response ("Wait! Hang on. Are you going to be OK?") |> Expect.equalTo "Sure."),
61-
62-
test "silence"
63-
(fn _ => response ("") |> Expect.equalTo "Fine. Be that way!"),
60+
(fn _ => response ("I HATE THE DENTIST") |> Expect.equalTo "Whoa, chill out!"),
6461

6562
test "prolonged silence"
6663
(fn _ => response (" ") |> Expect.equalTo "Fine. Be that way!"),
6764

6865
test "alternate silence"
6966
(fn _ => response ("\t\t\t\t\t\t\t\t\t\t") |> Expect.equalTo "Fine. Be that way!"),
7067

71-
test "multiple line question"
72-
(fn _ => response ("\nDoes this cryogenic chamber make\n me look fat?") |> Expect.equalTo "Sure."),
68+
test "other whitespace"
69+
(fn _ => response ("\n\r \t") |> Expect.equalTo "Fine. Be that way!"),
7370

74-
test "starting with whitespace"
75-
(fn _ => response (" hmmmmmmm...") |> Expect.equalTo "Whatever."),
71+
test "talking forcefully"
72+
(fn _ => response ("Hi there!") |> Expect.equalTo "Whatever."),
7673

77-
test "ending with whitespace"
78-
(fn _ => response ("Okay if like my spacebar quite a bit? ") |> Expect.equalTo "Sure."),
74+
test "using acronyms in regular speech"
75+
(fn _ => response ("It's OK if you don't want to go work for NASA.") |> Expect.equalTo "Whatever."),
7976

80-
test "other whitespace"
81-
(fn _ => response ("\n\r \t") |> Expect.equalTo "Fine. Be that way!"),
77+
test "no letters"
78+
(fn _ => response ("1, 2, 3") |> Expect.equalTo "Whatever."),
79+
80+
test "statement containing question mark"
81+
(fn _ => response ("Ending with ? means a question.") |> Expect.equalTo "Whatever."),
82+
83+
test "starting with whitespace"
84+
(fn _ => response (" hmmmmmmm...") |> Expect.equalTo "Whatever."),
8285

8386
test "non-question ending with whitespace"
8487
(fn _ => response ("This is a statement ending with whitespace ") |> Expect.equalTo "Whatever.")

0 commit comments

Comments
 (0)