all tests are green
This commit is contained in:
@@ -877,10 +877,10 @@ instance Serialize ElemSegment where
|
|||||||
putVec $ map Expr elements
|
putVec $ map Expr elements
|
||||||
|
|
||||||
get = do
|
get = do
|
||||||
op <- getWord8
|
|
||||||
let funcIndexes = map ((:[]) . RefFunc . unIndex) <$> getVec
|
let funcIndexes = map ((:[]) . RefFunc . unIndex) <$> getVec
|
||||||
let elemKind = byteGuard 0x00 >> return FuncRef
|
let elemKind = byteGuard 0x00 >> return FuncRef
|
||||||
case op of
|
op <- getULEB128 32
|
||||||
|
case (op :: Word8) of
|
||||||
0x00 -> do
|
0x00 -> do
|
||||||
offset <- getExpression
|
offset <- getExpression
|
||||||
ElemSegment FuncRef (Active 0 offset) <$> funcIndexes
|
ElemSegment FuncRef (Active 0 offset) <$> funcIndexes
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ main = do
|
|||||||
files <-
|
files <-
|
||||||
filter (not . List.isPrefixOf "simd") . filter (List.isSuffixOf ".wast")
|
filter (not . List.isPrefixOf "simd") . filter (List.isSuffixOf ".wast")
|
||||||
<$> Directory.listDirectory "tests/spec"
|
<$> Directory.listDirectory "tests/spec"
|
||||||
-- let files = ["ref_func.wast"]
|
-- let files = ["binary-leb128.wast"]
|
||||||
scriptTestCases <- (`mapM` files) $ \file -> do
|
scriptTestCases <- (`mapM` files) $ \file -> do
|
||||||
test <- LBS.readFile ("tests/spec/" ++ file)
|
test <- LBS.readFile ("tests/spec/" ++ file)
|
||||||
return $ testCase file $ do
|
return $ testCase file $ do
|
||||||
|
|||||||
Reference in New Issue
Block a user