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

Support testing under both 4.03 and 4.02 #92

Merged
merged 3 commits into from
Apr 19, 2016
Merged

Support testing under both 4.03 and 4.02 #92

merged 3 commits into from
Apr 19, 2016

Conversation

aantron
Copy link
Owner

@aantron aantron commented Apr 16, 2016

This abstracts the compiler version away somewhat from the testing framework, mainly by running reference files through the OCaml parser, and then printing the AST as source using Pprintast. Diffs are then run against these re-printed reference files.

Resolves #91.

Some of the tests implicitly checked for the absence of warnings, because warnings were printed to STDERR together with the output of -dsource. They are no longer printed, so we will have to write separate tests for warnings later.

Before this commit, warnings end up mixed in with -dsource output. This
makes it difficult to compare -dsource output with output of Pprintast,
which never includes warnings.

Warnings should be handled separately in testing. This will be taken
care of in a future commit.
Reference files that are compared against -dsource output are now first
parsed and printed (as if by -dsource). The re-printed output is then
used to compare against -dsource output.

This should make the comparison resistant against formatting changes in
-dsource between compiler versions.
These are represented as top-level expressions in 4.02, but bindings in
4.03. The difference was causing spurious failures in report testing.
@aantron aantron merged commit a83db52 into master Apr 19, 2016
@aantron aantron deleted the 4.03-diffs branch April 19, 2016 15:31
aantron added a commit that referenced this pull request Jun 17, 2016
The match expression rewriter inserts expressions that can cause
spurious warnings. These warnings would be especially surprising to a
user, because they would be coming from generated code.

The test checks that these warnings are properly suppressed. We were
checking this implicitly until #92.

Closes #94.
aantron added a commit that referenced this pull request Jun 17, 2016
The match expression rewriter inserts expressions that can cause
spurious warnings. These warnings would be especially surprising to a
user, because they would be coming from generated code.

The test checks that these warnings are properly suppressed. We were
checking this implicitly until #92.

Closes #94.
aantron added a commit that referenced this pull request Jun 17, 2016
The match expression rewriter inserts expressions that can cause
spurious warnings. These warnings would be especially surprising to a
user, because they would be coming from unseen generated code.

The new tests check that these warnings are properly suppressed. We
were checking this implicitly until #92.

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

Successfully merging this pull request may close these issues.

None yet

1 participant