Skip to content

Commit f7ebfd3

Browse files
committed
wordy 1.4.0: Test problems with zero operations
exercism/problem-specifications#1382
1 parent 5d5ee5a commit f7ebfd3

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

exercises/wordy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[package]
22
name = "wordy"
3-
version = "1.3.0"
3+
version = "1.4.0"

exercises/wordy/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Parse and evaluate simple math word problems returning the answer as an integer.
44

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+
513
## Iteration 1 — Addition
614

715
Add two numbers together.

exercises/wordy/tests/wordy.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ extern crate wordy;
33
use wordy::answer;
44

55
#[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]
613
fn addition() {
714
let command = "What is 1 plus 1?";
815
assert_eq!(Some(2), answer(command));

0 commit comments

Comments
 (0)