@@ -8,6 +8,24 @@ fn just_a_number() {
88 assert_eq ! ( output, expected) ;
99}
1010
11+ #[ test]
12+ #[ ignore]
13+ fn just_a_zero ( ) {
14+ let input = "What is 0?" ;
15+ let output = answer ( input) ;
16+ let expected = Some ( 0 ) ;
17+ assert_eq ! ( output, expected) ;
18+ }
19+
20+ #[ test]
21+ #[ ignore]
22+ fn just_a_negative_number ( ) {
23+ let input = "What is -123?" ;
24+ let output = answer ( input) ;
25+ let expected = Some ( -123 ) ;
26+ assert_eq ! ( output, expected) ;
27+ }
28+
1129#[ test]
1230#[ ignore]
1331fn addition ( ) {
@@ -17,6 +35,24 @@ fn addition() {
1735 assert_eq ! ( output, expected) ;
1836}
1937
38+ #[ test]
39+ #[ ignore]
40+ fn addition_with_a_left_hand_zero ( ) {
41+ let input = "What is 0 plus 2?" ;
42+ let output = answer ( input) ;
43+ let expected = Some ( 2 ) ;
44+ assert_eq ! ( output, expected) ;
45+ }
46+
47+ #[ test]
48+ #[ ignore]
49+ fn addition_with_a_right_hand_zero ( ) {
50+ let input = "What is 3 plus 0?" ;
51+ let output = answer ( input) ;
52+ let expected = Some ( 3 ) ;
53+ assert_eq ! ( output, expected) ;
54+ }
55+
2056#[ test]
2157#[ ignore]
2258fn more_addition ( ) {
0 commit comments