|
1 | 1 | Partial Public Class VBCompilerGeneratedBase |
2 | 2 | <Fact> <Trait("Category", Lambdas)> |
3 | 3 | Sub NoParametersVoidReturn() |
4 | | - RunTest( |
5 | | - Sub() Console.WriteLine(), |
6 | | - "() => Console.WriteLine()", |
7 | | - "Sub() Console.WriteLine", |
8 | | - "Lambda( |
9 | | - Call( |
10 | | - typeof(Console).GetMethod(""WriteLine"") |
11 | | - ) |
12 | | -)" |
13 | | - ) |
| 4 | + PreRunTest() |
14 | 5 | End Sub |
15 | 6 |
|
16 | 7 | <Fact> <Trait("Category", Lambdas)> |
17 | 8 | Sub OneParameterVoidReturn() |
18 | | - RunTest(Of String)( |
19 | | - Sub(s) Console.WriteLine(s), |
20 | | - "(string s) => Console.WriteLine(s)", |
21 | | - "Sub(s As String) Console.WriteLine(s)", |
22 | | - "Lambda( |
23 | | - Call( |
24 | | - typeof(Console).GetMethod(""WriteLine""), |
25 | | - s |
26 | | - ), |
27 | | - var s = Parameter( |
28 | | - typeof(string), |
29 | | - ""s"" |
30 | | - ) |
31 | | -)" |
32 | | - ) |
| 9 | + PreRunTest() |
33 | 10 | End Sub |
34 | 11 |
|
35 | 12 | <Fact> <Trait("Category", Lambdas)> |
36 | 13 | Sub TwoParametersVoidReturn() |
37 | | - RunTest(Of String, String)( |
38 | | - Sub(s1, s2) Console.WriteLine(s1 + s2), |
39 | | - "(string s1, string s2) => Console.WriteLine(s1 + s2)", |
40 | | - "Sub(s1 As String, s2 As String) Console.WriteLine(s1 + s2)", |
41 | | - "Lambda( |
42 | | - Call( |
43 | | - typeof(Console).GetMethod(""WriteLine""), |
44 | | - Call( |
45 | | - typeof(string).GetMethod(""Concat""), |
46 | | - s1, s2 |
47 | | - ) |
48 | | - ), |
49 | | - var s1 = Parameter( |
50 | | - typeof(string), |
51 | | - ""s1"" |
52 | | - ), |
53 | | - var s2 = Parameter( |
54 | | - typeof(string), |
55 | | - ""s2"" |
56 | | - ) |
57 | | -)" |
58 | | - ) |
| 14 | + PreRunTest() |
59 | 15 | End Sub |
60 | 16 |
|
61 | 17 | <Fact> <Trait("Category", Lambdas)> |
62 | 18 | Sub NoParametersNonVoidReturn() |
63 | | - RunTest( |
64 | | - Function() "abcd", |
65 | | - "() => ""abcd""", |
66 | | - "Function() ""abcd""", |
67 | | - "Lambda( |
68 | | - Constant(""abcd"") |
69 | | -)" |
70 | | - ) |
| 19 | + PreRunTest() |
71 | 20 | End Sub |
72 | 21 |
|
73 | 22 | <Fact> <Trait("Category", Lambdas)> |
74 | 23 | Sub OneParameterNonVoidReturn() |
75 | | - RunTest(Of String, String)( |
76 | | - Function(s) s, |
77 | | - "(string s) => s", |
78 | | - "Function(s As String) s", |
79 | | - "Lambda(s, |
80 | | - var s = Parameter( |
81 | | - typeof(string), |
82 | | - ""s"" |
83 | | - ) |
84 | | -)" |
85 | | - ) |
| 24 | + PreRunTest() |
86 | 25 | End Sub |
87 | 26 |
|
88 | 27 | <Fact> <Trait("Category", Lambdas)> |
89 | 28 | Sub TwoParametersNonVoidReturn() |
90 | | - RunTest(Of String, String, String)( |
91 | | - Function(s1, s2) s1 + s2, |
92 | | - "(string s1, string s2) => s1 + s2", |
93 | | - "Function(s1 As String, s2 As String) s1 + s2", |
94 | | - "Lambda( |
95 | | - Call( |
96 | | - typeof(string).GetMethod(""Concat""), |
97 | | - s1, s2 |
98 | | - ), |
99 | | - var s1 = Parameter( |
100 | | - typeof(string), |
101 | | - ""s1"" |
102 | | - ), |
103 | | - var s2 = Parameter( |
104 | | - typeof(string), |
105 | | - ""s2"" |
106 | | - ) |
107 | | -)" |
108 | | - ) |
| 29 | + PreRunTest() |
109 | 30 | End Sub |
110 | 31 | End Class |
0 commit comments