Skip to content

Commit f885a13

Browse files
authored
Fix seqexpression testcases (#16795)
* correct realsignature test cases for seqexpr tests * rename typo
1 parent 9788ff6 commit f885a13

File tree

22 files changed

+5193
-16
lines changed

22 files changed

+5193
-16
lines changed

tests/FSharp.Compiler.ComponentTests/EmittedIL/SeqExpressionStepping/SeqExpressionStepping.fs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,103 +14,102 @@ module SeqExpressionStepping =
1414
|> withNoOptimize
1515
|> withEmbeddedPdb
1616
|> withEmbedAllSource
17-
|> withRealInternalSignatureOn
1817
|> ignoreWarnings
1918
|> verifyILBaseline
2019

2120
//Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs -
22-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
21+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
2322
let ``SeqExpressionSteppingTest01_RealInternalSignatureOn_fs`` compilation =
2423
compilation
2524
|> withRealInternalSignatureOn
2625
|> verifyCompilation
2726

2827
//Retry SOURCE=SeqExpressionSteppingTest01.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest1.exe" # SeqExpressionSteppingTest1.fs -
29-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
28+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest01.fs"|])>]
3029
let ``SeqExpressionSteppingTest01_RealInternalSignatureOff_fs`` compilation =
3130
compilation
3231
|> withRealInternalSignatureOff
3332
|> verifyCompilation
3433

3534
// SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs -
36-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
35+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
3736
let ``SeqExpressionSteppingTest02_RealInternalSignatureOn_fs`` compilation =
3837
compilation
3938
|> withRealInternalSignatureOn
4039
|> verifyCompilation
4140

4241
// SOURCE=SeqExpressionSteppingTest02.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest2.exe" # SeqExpressionSteppingTest2.fs -
43-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
42+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest02.fs"|])>]
4443
let ``SeqExpressionSteppingTest02_RealInternalSignatureOff_fs`` compilation =
4544
compilation
4645
|> withRealInternalSignatureOff
4746
|> verifyCompilation
4847

4948
//SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs -
50-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
49+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
5150
let ``SeqExpressionSteppingTest03_RealInternalSignatureOn_fs`` compilation =
5251
compilation
5352
|> withRealInternalSignatureOn
5453
|> verifyCompilation
5554

5655
//SOURCE=SeqExpressionSteppingTest03.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest3.exe" # SeqExpressionSteppingTest3.fs -
57-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
56+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest03.fs"|])>]
5857
let ``SeqExpressionSteppingTest03_RealInternalSignatureOff_fs`` compilation =
5958
compilation
6059
|> withRealInternalSignatureOff
6160
|> verifyCompilation
6261

6362
// SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs -
64-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
63+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
6564
let ``SeqExpressionSteppingTest04_RealInternalSignatureOn_fs`` compilation =
6665
compilation
6766
|> withRealInternalSignatureOn
6867
|> verifyCompilation
6968

7069
// SOURCE=SeqExpressionSteppingTest04.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest4.exe" # SeqExpressionSteppingTest4.fs -
71-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
70+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest04.fs"|])>]
7271
let ``SeqExpressionSteppingTest04_RealInternalSignatureOff_fs`` compilation =
7372
compilation
7473
|> withRealInternalSignatureOff
7574
|> verifyCompilation
7675

7776
// SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs -
78-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
77+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
7978
let ``SeqExpressionSteppingTest05_RealInternalSignatureOn_fs`` compilation =
8079
compilation
8180
|> withRealInternalSignatureOn
8281
|> verifyCompilation
8382

8483
// SOURCE=SeqExpressionSteppingTest05.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest5.exe" # SeqExpressionSteppingTest5.fs -
85-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
84+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest05.fs"|])>]
8685
let ``SeqExpressionSteppingTest05_RealInternalSignatureOff_fs`` compilation =
8786
compilation
8887
|> withRealInternalSignatureOff
8988
|> verifyCompilation
9089

9190
// SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs -
92-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
91+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
9392
let ``SeqExpressionSteppingTest06_RealInternalSignatureOn_fs`` compilation =
9493
compilation
9594
|> withRealInternalSignatureOn
9695
|> verifyCompilation
9796

9897
// SOURCE=SeqExpressionSteppingTest06.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest6.exe" # SeqExpressionSteppingTest6.fs -
99-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
98+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest06.fs"|])>]
10099
let ``SeqExpressionSteppingTest06_RealInternalSignatureOff_fs`` compilation =
101100
compilation
102101
|> withRealInternalSignatureOff
103102
|> verifyCompilation
104103

105104
// SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs -
106-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
105+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOn", Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
107106
let ``SeqExpressionSteppingTest07_RealInternalSignatureOn_fs`` compilation =
108107
compilation
109108
|> withRealInternalSignatureOn
110109
|> verifyCompilation
111110

112111
// SOURCE=SeqExpressionSteppingTest07.fs SCFLAGS="-g --test:EmitFeeFeeAs100001 --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd SeqExpressionSteppingTest7.exe" # SeqExpressionSteppingTest7.fs -
113-
[<Theory; Directory(__SOURCE_DIRECTORY__, Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
112+
[<Theory; Directory(__SOURCE_DIRECTORY__, BaselineSuffix=".RealInternalSignatureOff", Includes=[|"SeqExpressionSteppingTest07.fs"|])>]
114113
let ``SeqExpressionSteppingTest07_RealInternalSignatureOff_fs`` compilation =
115114
compilation
116115
|> withRealInternalSignatureOff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
2+
3+
4+
5+
6+
.assembly extern runtime { }
7+
.assembly extern FSharp.Core { }
8+
.assembly assembly
9+
{
10+
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
11+
int32,
12+
int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )
13+
14+
15+
16+
17+
.hash algorithm 0x00008004
18+
.ver 0:0:0:0
19+
}
20+
.mresource public FSharpSignatureData.assembly
21+
{
22+
23+
24+
}
25+
.mresource public FSharpOptimizationData.assembly
26+
{
27+
28+
29+
}
30+
.module assembly.exe
31+
32+
.imagebase {value}
33+
.file alignment 0x00000200
34+
.stackreserve 0x00100000
35+
.subsystem 0x0003
36+
.corflags 0x00000001
37+
38+
39+
40+
41+
42+
.class public abstract auto ansi sealed SeqExpressionSteppingTest1
43+
extends [runtime]System.Object
44+
{
45+
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
46+
.class abstract auto ansi sealed nested public SeqExpressionSteppingTest1
47+
extends [runtime]System.Object
48+
{
49+
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
50+
.class auto autochar serializable sealed nested assembly beforefieldinit specialname f0@6
51+
extends class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1<int32>
52+
{
53+
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 )
54+
.field public int32 pc
55+
.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
56+
.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
57+
.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
58+
.field public int32 current
59+
.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
60+
.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
61+
.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
62+
.method public specialname rtspecialname
63+
instance void .ctor(int32 pc,
64+
int32 current) cil managed
65+
{
66+
67+
.maxstack 8
68+
IL_0000: ldarg.0
69+
IL_0001: ldarg.1
70+
IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
71+
IL_0007: ldarg.0
72+
IL_0008: ldarg.2
73+
IL_0009: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
74+
IL_000e: ldarg.0
75+
IL_000f: call instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1<int32>::.ctor()
76+
IL_0014: ret
77+
}
78+
79+
.method public strict virtual instance int32 GenerateNext(class [runtime]System.Collections.Generic.IEnumerable`1<int32>& next) cil managed
80+
{
81+
82+
.maxstack 8
83+
IL_0000: ldarg.0
84+
IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
85+
IL_0006: ldc.i4.1
86+
IL_0007: sub
87+
IL_0008: switch (
88+
IL_0017,
89+
IL_001a)
90+
IL_0015: br.s IL_001d
91+
92+
IL_0017: nop
93+
IL_0018: br.s IL_002e
94+
95+
IL_001a: nop
96+
IL_001b: br.s IL_0035
97+
98+
IL_001d: nop
99+
IL_001e: ldarg.0
100+
IL_001f: ldc.i4.1
101+
IL_0020: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
102+
IL_0025: ldarg.0
103+
IL_0026: ldc.i4.1
104+
IL_0027: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
105+
IL_002c: ldc.i4.1
106+
IL_002d: ret
107+
108+
IL_002e: ldarg.0
109+
IL_002f: ldc.i4.2
110+
IL_0030: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
111+
IL_0035: ldarg.0
112+
IL_0036: ldc.i4.0
113+
IL_0037: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
114+
IL_003c: ldc.i4.0
115+
IL_003d: ret
116+
}
117+
118+
.method public strict virtual instance void Close() cil managed
119+
{
120+
121+
.maxstack 8
122+
IL_0000: ldarg.0
123+
IL_0001: ldc.i4.2
124+
IL_0002: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
125+
IL_0007: ret
126+
}
127+
128+
.method public strict virtual instance bool get_CheckClose() cil managed
129+
{
130+
131+
.maxstack 8
132+
IL_0000: ldarg.0
133+
IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc
134+
IL_0006: switch (
135+
IL_0019,
136+
IL_001c,
137+
IL_001f)
138+
IL_0017: br.s IL_0022
139+
140+
IL_0019: nop
141+
IL_001a: br.s IL_0025
142+
143+
IL_001c: nop
144+
IL_001d: br.s IL_0023
145+
146+
IL_001f: nop
147+
IL_0020: br.s IL_0025
148+
149+
IL_0022: nop
150+
IL_0023: ldc.i4.0
151+
IL_0024: ret
152+
153+
IL_0025: ldc.i4.0
154+
IL_0026: ret
155+
}
156+
157+
.method public strict virtual instance int32 get_LastGenerated() cil managed
158+
{
159+
.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
160+
.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
161+
162+
.maxstack 8
163+
IL_0000: ldarg.0
164+
IL_0001: ldfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current
165+
IL_0006: ret
166+
}
167+
168+
.method public strict virtual instance class [runtime]System.Collections.Generic.IEnumerator`1<int32> GetFreshEnumerator() cil managed
169+
{
170+
.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
171+
.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
172+
173+
.maxstack 8
174+
IL_0000: ldc.i4.0
175+
IL_0001: ldc.i4.0
176+
IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32,
177+
int32)
178+
IL_0007: ret
179+
}
180+
181+
}
182+
183+
.method public static class [runtime]System.Collections.Generic.IEnumerable`1<int32> f0() cil managed
184+
{
185+
186+
.maxstack 8
187+
IL_0000: ldc.i4.0
188+
IL_0001: ldc.i4.0
189+
IL_0002: newobj instance void SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::.ctor(int32,
190+
int32)
191+
IL_0007: ret
192+
}
193+
194+
}
195+
196+
}
197+
198+
.class private abstract auto ansi sealed '<StartupCode$assembly>'.$SeqExpressionSteppingTest1
199+
extends [runtime]System.Object
200+
{
201+
.field static assembly int32 init@
202+
.custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
203+
.custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
204+
.custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 )
205+
.method public static void main@() cil managed
206+
{
207+
.entrypoint
208+
209+
.maxstack 3
210+
.locals init (class [runtime]System.Collections.Generic.IEnumerable`1<int32> V_0)
211+
IL_0000: call class [runtime]System.Collections.Generic.IEnumerable`1<int32> SeqExpressionSteppingTest1/SeqExpressionSteppingTest1::f0()
212+
IL_0005: stloc.0
213+
IL_0006: ldloc.0
214+
IL_0007: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length<int32>(class [runtime]System.Collections.Generic.IEnumerable`1<!!0>)
215+
IL_000c: pop
216+
IL_000d: ret
217+
}
218+
219+
}
220+
221+
222+
223+
224+
225+

0 commit comments

Comments
 (0)