aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPhạm Huy Hoàng <hoangtun0810@gmail.com>2024-03-03 23:56:32 +0900
committer再生花 <hoangtun0810@gmail.com>2024-03-04 00:05:45 +0900
commit63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1 (patch)
treec3eb2cf84a9b7eea316e9d4139f94bf75c31b2d4 /tests
parentfix(comment): remove duplicate 'FIXME' (diff)
downloadnvim-treesitter-63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1.tar
nvim-treesitter-63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1.tar.gz
nvim-treesitter-63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1.tar.bz2
nvim-treesitter-63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1.tar.lz
nvim-treesitter-63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1.tar.xz
nvim-treesitter-63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1.tar.zst
nvim-treesitter-63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1.zip
feat(swift): add will/didSet indent
Fixes CI error in PR.6237
Diffstat (limited to 'tests')
-rw-r--r--tests/indent/swift/declarations.swift3
-rw-r--r--tests/indent/swift_spec.lua5
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/indent/swift/declarations.swift b/tests/indent/swift/declarations.swift
index a6f576ef2..d4bc6e054 100644
--- a/tests/indent/swift/declarations.swift
+++ b/tests/indent/swift/declarations.swift
@@ -16,6 +16,9 @@ class EquilateralTriangle: NamedShape {
var perimeter: Double {
willSet {
}
+ didSet {
+
+ }
}
@funcattr
diff --git a/tests/indent/swift_spec.lua b/tests/indent/swift_spec.lua
index 6ba0d2cf0..5f07ee825 100644
--- a/tests/indent/swift_spec.lua
+++ b/tests/indent/swift_spec.lua
@@ -15,7 +15,8 @@ describe("indent Swift:", function()
run:new_line("declarations.swift", { on_line = 6, text = "var x = 1", indent = 2 })
run:new_line("declarations.swift", { on_line = 12, text = "var textInsideInit = true", indent = 4 })
run:new_line("declarations.swift", { on_line = 17, text = "var textInsideWillSet = 1", indent = 6 })
- run:new_line("declarations.swift", { on_line = 22, text = "var textInsideOverrideFunc", indent = 4 })
- run:new_line("declarations.swift", { on_line = 28, text = "var InsideProtocol: String { get }", indent = 2 })
+ run:new_line("declarations.swift", { on_line = 20, text = "var textInsideDidSet = 1", indent = 6 })
+ run:new_line("declarations.swift", { on_line = 25, text = "var textInsideOverrideFunc", indent = 4 })
+ run:new_line("declarations.swift", { on_line = 31, text = "var InsideProtocol: String { get }", indent = 2 })
end)
end)