Consolidate emitted IL `for`-loop tests
Description
As noted in #17040:
In a followup PR, I may consolidate the copied "realsig±" test source files using a technique similar to that used in #16795.
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:
- Removed:
-
tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/RealInternalSignatureOff/ForLoop.fs -
tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/RealInternalSignatureOn/ForLoop.fs
-
- Added:
-
tests/FSharp.Compiler.ComponentTests/EmittedIL/ForLoop/ForLoop.fs- This consolidates the other two files by duplicating each test function and adding
.RealInternalSignatureOff/.RealInternalSignatureOnsuffixes to the generated baselines.
- This consolidates the other two files by duplicating each test function and adding
-
- Updated:
-
tests/FSharp.Test.Utilities/ILChecker.fs- This is now unifying the assembly version for
netstandardin the IL baselines, which lets us reuse more tests for bothnet472andnet8.0.
- This is now unifying the assembly version for
-
Checklist
- This shouldn't need release notes.
Notes
These tests have always had some .opt-suffixed tests and some not, but verifyCompilation actually always calls withOptimize (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.