Add tests for properties and fields in c#

This commit is contained in:
tihon 2022-09-29 15:06:48 +03:00
parent 67ad26f1f1
commit 17174a114b
2 changed files with 25 additions and 5 deletions

View file

@ -9,7 +9,7 @@ describe("treesitter csharp", function()
level = 0,
lnum = 1,
col = 0,
end_lnum = 4,
end_lnum = 6,
end_col = 1,
children = {
{
@ -30,24 +30,42 @@ describe("treesitter csharp", function()
end_lnum = 3,
end_col = 25,
},
{
kind = "Property",
name = "Pr_1",
level = 1,
lnum = 4,
col = 2,
end_lnum = 4,
end_col = 24,
},
{
kind = "Field",
name = "Fl_1",
level = 1,
lnum = 5,
col = 2,
end_lnum = 5,
end_col = 18,
},
},
},
{
kind = "Enum",
name = "En_1",
level = 0,
lnum = 5,
lnum = 7,
col = 0,
end_lnum = 5,
end_lnum = 7,
end_col = 20,
},
{
kind = "Struct",
name = "St_1",
level = 0,
lnum = 6,
lnum = 8,
col = 0,
end_lnum = 6,
end_lnum = 8,
end_col = 22,
},
})

View file

@ -1,6 +1,8 @@
public class Cl_1 {
public Cl_1() {}
public void meth_1() {}
public int Pr_1 {get;}
public int Fl_1;
}
public enum En_1 { }
public struct St_1 { }