1

我正在按照此博客中的示例测试我的 JSON 编码/解码,并遇到了深度嵌套 JSON 的问题。JSON 结构的排列太多,无法使用 quickcheck 成功测试。我在客户端 Elm 编码/解码模糊测试中遇到了类似的问题。我能够通过单独测试根节点下的两个分支来克服这个问题,然后在使用分支的常量值测试根节点时(因为它们已经过测试)。Elm 和 haskell 代码在这里

有没有可以应用于haskell的类似解决方案?

我的 Elm 代码中的注释:

-- Initially `round trip table` attempted to fuzz test the entire table structure.
-- This was conuming massive amounts of memory (>1.5G) until the node process ran
-- out of memory.  To overcome this I fuzz test the board and sprite structures
-- individually and then fuzz test the table structure using Fuzz.constant on the
-- board and sprite lists so that it does not consume too much memory on the
-- already fuzz tested structures.

示例要点

4

0 回答 0