Skip to content

Commit

Permalink
Make tests more comprehensible
Browse files Browse the repository at this point in the history
  • Loading branch information
cblp committed Sep 7, 2018
1 parent dfb0af6 commit 7fa6db8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions ff-test/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tests:
- text
- time
- unordered-containers
- vector
# project
- ff-core
# package
Expand Down
10 changes: 6 additions & 4 deletions ff-test/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Data.String.Interpolate.IsString (i)
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Time (Day, UTCTime (..), fromGregorian)
import qualified Data.Vector as Vector
import GitHub (Issue (..), IssueState (..), Milestone (..), URL (..))
import GitHub.Data.Definitions (SimpleUser (..))
import GitHub.Data.Id (Id (..))
Expand Down Expand Up @@ -119,10 +120,8 @@ prop_new (NoContainNul newText) newStart newEnd =
]
, case fs' of
(toList -> [toList -> [toList -> [decode -> Just (Object note)]]]) -> conjoin
[ case note ! "status" of
Array (toList -> ["Active", Number _, Number 314159])
-> ok
status -> failProp $ "status = " ++ show status
[ note ! "status"
=== array ["Active", Number 17091260, Number 314159]
, case note ! "text" of
Array (toList ->
[Array (toList ->
Expand Down Expand Up @@ -280,3 +279,6 @@ case_json2ron = do
(-:) :: a -> b -> (a, b)
a -: b = (a, b)
infixr 0 -:

array :: [Value] -> Value
array = Array . Vector.fromList

0 comments on commit 7fa6db8

Please sign in to comment.