Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pherrymason committed Dec 26, 2024
1 parent aabe8c5 commit 8305484
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions server/internal/lsp/ast/factory/convert_expression_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,14 @@ func TestConvertToAST_declaration_with_initializer_list_assingment(t *testing.T)
{
literal: "{[0] = TypeDescription}",
expected: &ast.InitializerList{
NodeAttributes: ast.NewNodeAttributesBuilder().WithRangePositions(2, 13, 2, 13+12).Build(),
NodeAttributes: ast.NewNodeAttributesBuilder().WithRangePositions(2, 13, 2, 36).Build(),
Args: []ast.Expression{
&ast.ArgParamPathSet{
Path: "[0]",
Expr: ast.NewTypeInfoBuilder().
WithStartEnd(2, 13+7, 2, 13+11).
WithStartEnd(2, 13+7, 2, 35).
WithName("TypeDescription").
WithNameStartEnd(2, 13+7, 2, 13+11).
WithNameStartEnd(2, 13+7, 2, 35).
Build(),
},
},
Expand Down Expand Up @@ -316,12 +316,12 @@ func TestConvertToAST_declaration_with_initializer_list_assingment(t *testing.T)
{
literal: "{TypeDescription}",
expected: &ast.InitializerList{
NodeAttributes: ast.NewNodeAttributesBuilder().WithRangePositions(2, 13, 2, 13+6).Build(),
NodeAttributes: ast.NewNodeAttributesBuilder().WithRangePositions(2, 13, 2, 30).Build(),
Args: []ast.Expression{
ast.NewTypeInfoBuilder().
WithStartEnd(2, 13+1, 2, 13+5).
WithStartEnd(2, 13+1, 2, 29).
WithName("TypeDescription").
WithNameStartEnd(2, 13+1, 2, 13+5).
WithNameStartEnd(2, 13+1, 2, 29).
Build(),
},
},
Expand Down Expand Up @@ -810,15 +810,15 @@ func TestConvertToAST_assignment_expr(t *testing.T) {
{
input: "$CompileTimeType = TypeDescription;",
expected: &ast.AssignmentExpression{
NodeAttributes: ast.NewNodeAttributesBuilder().WithRangePositions(1, 19, 1, 19+23).Build(),
NodeAttributes: ast.NewNodeAttributesBuilder().WithRangePositions(1, 19, 1, 53).Build(),
Left: &ast.BasicLit{
NodeAttributes: ast.NewNodeAttributesBuilder().WithRangePositions(1, 19, 1, 35).Build(),
Kind: ast.STRING,
Value: "$CompileTimeType"},
Right: ast.NewTypeInfoBuilder().
WithName("TypeDescription").
WithNameStartEnd(1, 38, 1, 53).
WithStartEnd(1, 38, 1, 42).
WithStartEnd(1, 38, 1, 53).
Build(),
Operator: "=",
},
Expand Down

0 comments on commit 8305484

Please sign in to comment.