File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,33 @@ func TestReferences(t *testing.T) {
387
387
return "" , true
388
388
},
389
389
},
390
+ {
391
+ // this is the definition of the struct in the templates.templ file.
392
+ line : 21 ,
393
+ character : 9 ,
394
+ assert : func (t * testing.T , actual []protocol.Location ) (msg string , ok bool ) {
395
+ expectedReference := []protocol.Location {
396
+ {
397
+ // This is the useage of the struct in the templates.templ file.
398
+ URI : uri .URI ("file://" + appDir + "/templates.templ" ),
399
+ Range : protocol.Range {
400
+ Start : protocol.Position {
401
+ Line : uint32 (24 ),
402
+ Character : uint32 (8 ),
403
+ },
404
+ End : protocol.Position {
405
+ Line : uint32 (24 ),
406
+ Character : uint32 (14 ),
407
+ },
408
+ },
409
+ },
410
+ }
411
+ if diff := lspdiff .References (expectedReference , actual ); diff != "" {
412
+ return fmt .Sprintf ("Expected: %+v\n Actual: %+v" , expectedReference , actual ), false
413
+ }
414
+ return "" , true
415
+ },
416
+ },
390
417
}
391
418
392
419
for i , test := range tests {
You can’t perform that action at this time.
0 commit comments