@@ -11,20 +11,21 @@ namespace HydraScript.Tests.Unit.IR;
11
11
12
12
public class FunctionWithUndefinedReturnStorageTests
13
13
{
14
- const string functionName = nameof ( functionName ) ;
14
+ private const string FunctionName = nameof ( FunctionName ) ;
15
+
15
16
[ Fact ]
16
17
public void StorageIsEmptyAfterFlushTest ( )
17
18
{
18
19
IFunctionWithUndefinedReturnStorage storage = new FunctionWithUndefinedReturnStorage ( ) ;
19
20
20
21
var symbol = new FunctionSymbol (
21
- id : functionName ,
22
+ id : FunctionName ,
22
23
parameters : [ ] ,
23
24
"undefined" ,
24
25
isEmpty : false ) ;
25
26
26
27
var decl = new FunctionDeclaration (
27
- name : new IdentifierReference ( functionName ) ,
28
+ name : new IdentifierReference ( FunctionName ) ,
28
29
returnTypeValue : Substitute . For < TypeValue > ( ) ,
29
30
arguments : [ ] ,
30
31
new BlockStatement ( [ ] ) ) ;
@@ -41,30 +42,29 @@ public void StorageIsEmptyAfterFlushTest()
41
42
public void StorageIsCorrectOrderTest ( )
42
43
{
43
44
FunctionDeclaration [ ] declarations = [
44
- new FunctionDeclaration (
45
- name : new IdentifierReference ( functionName ) ,
45
+ new (
46
+ name : new IdentifierReference ( FunctionName ) ,
46
47
returnTypeValue : Substitute . For < TypeValue > ( ) ,
47
48
arguments : [ ] ,
48
49
new BlockStatement ( [ ] ) ) ,
49
50
50
- new FunctionDeclaration (
51
- name : new IdentifierReference ( functionName ) ,
51
+ new (
52
+ name : new IdentifierReference ( FunctionName ) ,
52
53
returnTypeValue : Substitute . For < TypeValue > ( ) ,
53
54
arguments : [ ] ,
54
55
new BlockStatement ( [ ] ) ) ,
55
56
56
- new FunctionDeclaration (
57
- name : new IdentifierReference ( functionName ) ,
57
+ new (
58
+ name : new IdentifierReference ( FunctionName ) ,
58
59
returnTypeValue : Substitute . For < TypeValue > ( ) ,
59
60
arguments : [ ] ,
60
61
new BlockStatement ( [ ] ) ) ,
61
62
62
- new FunctionDeclaration (
63
- name : new IdentifierReference ( functionName ) ,
63
+ new (
64
+ name : new IdentifierReference ( FunctionName ) ,
64
65
returnTypeValue : Substitute . For < TypeValue > ( ) ,
65
66
arguments : [ ] ,
66
- new BlockStatement ( [ ] ) )
67
- ] ;
67
+ new BlockStatement ( [ ] ) ) ] ;
68
68
69
69
IFunctionWithUndefinedReturnStorage storage = new FunctionWithUndefinedReturnStorage ( ) ;
70
70
0 commit comments