-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added some Modify tests * Remove only to allow all tests to run * Stop setR from reversing its arguments * Added documentation to setL and setR * Moved docs out from Pivot.Modify to Pivot
- Loading branch information
1 parent
45979cb
commit 9c65618
Showing
4 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module Modify exposing (..) | ||
|
||
import Common.Units as Fuzz exposing (pivot) | ||
import Expect | ||
import Fuzz | ||
import Pivot | ||
import Test exposing (Test, describe) | ||
|
||
|
||
setL : Test | ||
setL = | ||
describe "setL" | ||
[ Test.fuzz (Fuzz.pivot Fuzz.int) "setL (getL a) a == a" <| | ||
\pivot -> | ||
Pivot.setL (Pivot.getL pivot) pivot | ||
|> Expect.equal pivot | ||
, Test.fuzz2 (Fuzz.list Fuzz.int) (Fuzz.pivot Fuzz.int) "getL (setL l a) == l" <| | ||
\list pivot -> | ||
Pivot.getL (Pivot.setL list pivot) | ||
|> Expect.equal list | ||
] | ||
|
||
|
||
setR : Test | ||
setR = | ||
describe "setR" | ||
[ Test.fuzz (Fuzz.pivot Fuzz.int) "setR (getR a) == a" <| | ||
\pivot -> | ||
Pivot.setR (Pivot.getR pivot) pivot | ||
|> Expect.equal pivot | ||
, Test.fuzz2 (Fuzz.list Fuzz.int) (Fuzz.pivot Fuzz.int) "getR (setR l a) == l" <| | ||
\list pivot -> | ||
Pivot.getR (Pivot.setR list pivot) | ||
|> Expect.equal list | ||
, Test.fuzz3 Fuzz.int (Fuzz.list Fuzz.int) (Fuzz.pivot Fuzz.int) "goR (setR (x :: xs) a) == Just (setR xs (appendGoR x a))" <| | ||
\x xs pivot -> | ||
Pivot.goR (Pivot.setR (x :: xs) pivot) | ||
|> Expect.equal (Just (Pivot.setR xs (Pivot.appendGoR x pivot))) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters