From e73c775aa9d540f0c33585ed1b5ea572a64bdac1 Mon Sep 17 00:00:00 2001 From: 再生花 Date: Mon, 11 Mar 2024 18:20:10 +0900 Subject: feat(swift): add init/deinit indents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Phạm Huy Hoàng --- tests/indent/swift/declarations.swift | 2 ++ tests/indent/swift_spec.lua | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/indent/swift/declarations.swift b/tests/indent/swift/declarations.swift index d4bc6e054..67a7e5544 100644 --- a/tests/indent/swift/declarations.swift +++ b/tests/indent/swift/declarations.swift @@ -12,6 +12,8 @@ class EquilateralTriangle: NamedShape { ) { self.sideLength = sideLength } + deinit { + } var perimeter: Double { willSet { diff --git a/tests/indent/swift_spec.lua b/tests/indent/swift_spec.lua index 5f07ee825..501cbfa81 100644 --- a/tests/indent/swift_spec.lua +++ b/tests/indent/swift_spec.lua @@ -14,9 +14,9 @@ describe("indent Swift:", function() describe("new line:", 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 = 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 }) + run:new_line("declarations.swift", { on_line = 19, text = "var textInsideWillSet = 1", indent = 6 }) + run:new_line("declarations.swift", { on_line = 22, text = "var textInsideDidSet = 1", indent = 6 }) + run:new_line("declarations.swift", { on_line = 27, text = "var textInsideOverrideFunc", indent = 4 }) + run:new_line("declarations.swift", { on_line = 33, text = "var InsideProtocol: String { get }", indent = 2 }) end) end) -- cgit v1.2.3-70-g09d2