1- (* version 1.4 .0 *)
1+ (* version 1.5 .0 *)
22
33use " bob.sml" ;
44use " testlib.sml" ;
@@ -8,77 +8,80 @@ fun x |> f = f x
88
99val 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 (" \n Does 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 (" \n Does 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