Add class indent tests
This commit is contained in:
parent
f6c2b4c65e
commit
3b2796d9ad
2 changed files with 24 additions and 0 deletions
|
|
@ -30,6 +30,16 @@ describe("indent Tiger:", function()
|
|||
end)
|
||||
|
||||
describe("new line:", function()
|
||||
runner:new_line("classes.tig", { on_line = 1, text = "var a := 0", indent = 2 }, "class declaration beginning", XFAIL)
|
||||
runner:new_line("classes.tig", { on_line = 2, text = "var a := 0", indent = 2 }, "class declaration after field")
|
||||
runner:new_line("classes.tig", { on_line = 4, text = "var a := 0", indent = 2 }, "class declaration after method")
|
||||
runner:new_line("classes.tig", { on_line = 5, text = "var a := 0", indent = 0 }, "after class declaration")
|
||||
runner:new_line("classes.tig", { on_line = 7, text = "var a := 0", indent = 2 }, "class type beginning", XFAIL)
|
||||
runner:new_line("classes.tig", { on_line = 8, text = "var a := 0", indent = 2 }, "class type after field")
|
||||
runner:new_line("classes.tig", { on_line = 10, text = "self.a := 0", indent = 4 }, "inside method", XFAIL)
|
||||
runner:new_line("classes.tig", { on_line = 13, text = "var a := 0", indent = 2 }, "class type after method")
|
||||
runner:new_line("classes.tig", { on_line = 14, text = "var a := 0", indent = 0 }, "after class type")
|
||||
|
||||
runner:new_line("groupings.tig", { on_line = 2, text = "var b := 0", indent = 2 }, "let declarations")
|
||||
runner:new_line("groupings.tig", { on_line = 3, text = "a := a + 1", indent = 2 }, "after 'in'", XFAIL)
|
||||
runner:new_line("groupings.tig", { on_line = 4, text = "a := a + 1;", indent = 4 }, "sequence", XFAIL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue