File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " wordy"
3
- version = " 1.3 .0"
3
+ version = " 1.4 .0"
Original file line number Diff line number Diff line change 2
2
3
3
Parse and evaluate simple math word problems returning the answer as an integer.
4
4
5
+ ## Iteration 0 — Numbers
6
+
7
+ Problems with no operations simply evaluate to the number given.
8
+
9
+ > What is 5?
10
+
11
+ Evaluates to 5.
12
+
5
13
## Iteration 1 — Addition
6
14
7
15
Add two numbers together.
Original file line number Diff line number Diff line change @@ -3,6 +3,13 @@ extern crate wordy;
3
3
use wordy:: answer;
4
4
5
5
#[ test]
6
+ fn just_a_number ( ) {
7
+ let command = "What is 5?" ;
8
+ assert_eq ! ( Some ( 5 ) , answer( command) ) ;
9
+ }
10
+
11
+ #[ test]
12
+ #[ ignore]
6
13
fn addition ( ) {
7
14
let command = "What is 1 plus 1?" ;
8
15
assert_eq ! ( Some ( 2 ) , answer( command) ) ;
You can’t perform that action at this time.
0 commit comments