Skip to content

Commit

Permalink
wordy 1.5.0.8: Test question What is? with no operands or operators (
Browse files Browse the repository at this point in the history
…#779)

In keeping with [1.3.0][], we want to test that this fails in an
expected way rather than an unexpected way.

[1.3.0]: exercism/problem-specifications#1383

Specifically for Haskell, we want to make sure that this results in
`None` rather than accessing an out-of-bounds index due to always
assuming that the inputs will have at least three space-separated
elements (of the form "What is X...?").

exercism/problem-specifications#1401
  • Loading branch information
petertseng authored Nov 23, 2018
1 parent 1b73eaa commit 09fb29e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exercises/wordy/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wordy
version: 1.4.0.7
version: 1.5.0.8

dependencies:
- base
Expand Down
6 changes: 5 additions & 1 deletion exercises/wordy/test/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ cases = [ Case { description = "just a number"
, input = "Who is the President of the United States?"
, expected = Nothing
}
, Case { description = "reject incomplete problem"
, Case { description = "reject problem missing an operand"
, input = "What is 1 plus?"
, expected = Nothing
}
, Case { description = "reject problem with no operands or operators"
, input = "What is?"
, expected = Nothing
}
, Case { description = "reject two operations in a row"
, input = "What is 1 plus plus 2?"
, expected = Nothing
Expand Down

0 comments on commit 09fb29e

Please sign in to comment.