Consolidate emitted IL for
-loop tests
#17128
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As noted in #17040:
The test sources and baselines for these were duplicated in #15484 to test the realsig feature, but that meant that the test sources needed to be kept in sync by hand. This change reconsolidates the test sources by using the approach from #16795 instead: it reuses the same test source files and just adds duplicate tests to check the emitted IL with realsig- and realsig+.
A few realsig- baseline files are updated as well, since it looks like some tests in
/EmittedIL/ForLoop/RealInternalSignatureOff/ForLoop.fs
did not have|> withLangVersionPreview
, while their equivalents in/EmittedIL/ForLoop/RealInternalSignatureOn/ForLoop.fs
did (proof that requiring manual synchronization is bad :).For reviewers
The most important files:
tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/RealInternalSignatureOff/ForLoop.fs
tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/RealInternalSignatureOn/ForLoop.fs
tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs
.RealInternalSignatureOff
/.RealInternalSignatureOn
suffixes to the generated baselines.tests/FSharp.Test.Utilities/ILChecker.fs
netstandard
in the IL baselines, which lets us reuse more tests for bothnet472
andnet8.0
.Checklist
Notes
These tests have always had some
.opt
-suffixed tests and some not, butverifyCompilation
actually always callswithOptimize
(that's why I didn't add opt/nonopt duplicates of the tests I added in #16650 to begin with). That means that some of the existing duplicate tests could be deduplicated, but I haven't done that in this PR.