Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enumerative and random testing for macro compiler #40

Open
1 of 2 tasks
plaidfinch opened this issue Feb 23, 2021 · 0 comments
Open
1 of 2 tasks

Enumerative and random testing for macro compiler #40

plaidfinch opened this issue Feb 23, 2021 · 0 comments
Assignees
Labels

Comments

@plaidfinch
Copy link
Contributor

plaidfinch commented Feb 23, 2021

In support of #36, we want enumerative testing to test both the parser and the code generation of the macro compiler. Two different testing regimens are suggested:

  • Test in the dialectic-compiler crate that (1) parse ; print is idempotent and (2) print ; parse is identity. This can be accomplished with random testing, which will cover more cases more efficiently than enumeration testing.
  • Test in the dialectic crate that valid invocations of the Session! macro result in valid session types satisfying the Session trait. This can be done using build.rs to enumerate such invocations at compile time.

Tentatively, if we build a decompiler (which would also be useful for parsing error messages), we could test that (1) compile ; decompile is idempotent and (2) decompile ; compile is identity, also in the dialectic-compiler crate, also using random testing. However, this requires building a decompiler, which we may wish to postpone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant