Packaging: Fully static Haskell builds and webapp
This commit is contained in:
38
test/Spec.hs
38
test/Spec.hs
@@ -2122,42 +2122,6 @@ binaryParserTests = testGroup "Binary Parser Tests"
|
||||
let input = "expectAscii \"hi\" [(104) (99)]"
|
||||
env = evalTricu lib (parseTricu input)
|
||||
result env @?= parserErr (ofNumber 2) (bytesT [104, 99])
|
||||
|
||||
, testCase "u16BE decodes big-endian" $ do
|
||||
lib <- evaluateFile "./lib/binary.tri"
|
||||
let input = "u16BE [(1) (0)]"
|
||||
env = evalTricu lib (parseTricu input)
|
||||
result env @?= ofNumber 256
|
||||
|
||||
, testCase "u16BE zero" $ do
|
||||
lib <- evaluateFile "./lib/binary.tri"
|
||||
let input = "u16BE [(0) (1)]"
|
||||
env = evalTricu lib (parseTricu input)
|
||||
result env @?= ofNumber 1
|
||||
|
||||
, testCase "u16LE decodes little-endian" $ do
|
||||
lib <- evaluateFile "./lib/binary.tri"
|
||||
let input = "u16LE [(1) (0)]"
|
||||
env = evalTricu lib (parseTricu input)
|
||||
result env @?= ofNumber 1
|
||||
|
||||
, testCase "u16LE zero" $ do
|
||||
lib <- evaluateFile "./lib/binary.tri"
|
||||
let input = "u16LE [(0) (1)]"
|
||||
env = evalTricu lib (parseTricu input)
|
||||
result env @?= ofNumber 256
|
||||
|
||||
, testCase "readU16BE parses and decodes" $ do
|
||||
lib <- evaluateFile "./lib/binary.tri"
|
||||
let input = "readU16BE [(0) (1) (2)]"
|
||||
env = evalTricu lib (parseTricu input)
|
||||
result env @?= parserOk (ofNumber 1) (bytesT [2])
|
||||
|
||||
, testCase "readU16LE parses and decodes" $ do
|
||||
lib <- evaluateFile "./lib/binary.tri"
|
||||
let input = "readU16LE [(1) (0) (2)]"
|
||||
env = evalTricu lib (parseTricu input)
|
||||
result env @?= parserOk (ofNumber 1) (bytesT [2])
|
||||
]
|
||||
|
||||
-- --------------------------------------------------------------------------
|
||||
@@ -3577,4 +3541,4 @@ ioOkResult :: T -> T
|
||||
ioOkResult val = Fork (Stem Leaf) (Fork val Leaf)
|
||||
|
||||
ioErrResult :: String -> T
|
||||
ioErrResult msg = Fork Leaf (Fork (ofString msg) Leaf)
|
||||
ioErrResult msg = Fork Leaf (Fork (ofString msg) Leaf)
|
||||
|
||||
Reference in New Issue
Block a user