forked from OSS/graphql
Fix ambigious Int resolution in the lexer tests
This commit is contained in:
parent
2172de3729
commit
3cc38343db
12
stack.yaml.lock
Normal file
12
stack.yaml.lock
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# This file was autogenerated by Stack.
|
||||||
|
# You should not edit this file by hand.
|
||||||
|
# For more information, please see the documentation at:
|
||||||
|
# https://docs.haskellstack.org/en/stable/lock_files
|
||||||
|
|
||||||
|
packages: []
|
||||||
|
snapshots:
|
||||||
|
- completed:
|
||||||
|
size: 499889
|
||||||
|
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/26.yaml
|
||||||
|
sha256: ecb02ee16829df8d7219e7d7fe6c310819820bf335b0b9534bce84d3ea896684
|
||||||
|
original: lts-13.26
|
@ -6,7 +6,6 @@ module Language.GraphQL.LexerTest
|
|||||||
, reference
|
, reference
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Applicative (Alternative(..))
|
|
||||||
import Language.GraphQL.Lexer
|
import Language.GraphQL.Lexer
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Data.Void (Void)
|
import Data.Void (Void)
|
||||||
@ -58,11 +57,11 @@ reference = testGroup "Lexer"
|
|||||||
"""|] @?= Right "spans\n multiple\n lines"
|
"""|] @?= Right "spans\n multiple\n lines"
|
||||||
|
|
||||||
, testCase "lexes numbers" $ do
|
, testCase "lexes numbers" $ do
|
||||||
runParser integer "4" @?= Right 4
|
runParser integer "4" @?= Right (4 :: Int)
|
||||||
runParser float "4.123" @?= Right 4.123
|
runParser float "4.123" @?= Right 4.123
|
||||||
runParser integer "-4" @?= Right (-4)
|
runParser integer "-4" @?= Right (-4 :: Int)
|
||||||
runParser integer "9" @?= Right 9
|
runParser integer "9" @?= Right (9 :: Int)
|
||||||
runParser integer "0" @?= Right 0
|
runParser integer "0" @?= Right (0 :: Int)
|
||||||
runParser float "-4.123" @?= Right (-4.123)
|
runParser float "-4.123" @?= Right (-4.123)
|
||||||
runParser float "0.123" @?= Right 0.123
|
runParser float "0.123" @?= Right 0.123
|
||||||
runParser float "123e4" @?= Right 123e4
|
runParser float "123e4" @?= Right 123e4
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import Control.Monad.IO.Class (liftIO)
|
|
||||||
import qualified Data.GraphQL.Encoder as Encoder
|
import qualified Data.GraphQL.Encoder as Encoder
|
||||||
import qualified Language.GraphQL.LexerTest as LexerTest
|
import qualified Language.GraphQL.LexerTest as LexerTest
|
||||||
import qualified Data.GraphQL.Parser as Parser
|
import qualified Data.GraphQL.Parser as Parser
|
||||||
|
Loading…
Reference in New Issue
Block a user