Skip to content

Testing #16

Closed
Closed
@harpocrates

Description

@harpocrates

Here are some approaches to testing correctness of parsing and pretty printing

  • Hand written unit test
  • Use the unstable nightly -Z option for outputting a JSON of the AST, parse that JSON into our AST and diff them against the AST we get from regular parsing.
  • Parse, pretty print, re-parse it, and check that the two ASTs match.
  • Re-parse spanned sub-elements from the substring of the input, and check that the two ASTs match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions