Skip to content

Commit d1eb9f6

Browse files
committed
format
1 parent 036159f commit d1eb9f6

File tree

3 files changed

+94
-94
lines changed

3 files changed

+94
-94
lines changed

apps/language_server/test/providers/code_action/replace_remote_function_test.exs

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -184,41 +184,41 @@ defmodule ElixirLS.LanguageServer.Providers.CodeAction.ReplaceRemoteFunctionTest
184184
end
185185

186186
if Version.match?(System.version(), ">= 1.15.0") do
187-
test "when aliased" do
188-
message = """
189-
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
187+
test "when aliased" do
188+
message = """
189+
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
190190
191-
* foo/1
192-
"""
191+
* foo/1
192+
"""
193193

194-
{:ok, [result]} =
195-
~q{
194+
{:ok, [result]} =
195+
~q{
196196
alias ElixirLS.Test.RemoteFunction
197197
RemoteFunction.fou(42)
198198
}
199-
|> modify(message: message, suggestion: "RemoteFunction.foo", line: 1)
199+
|> modify(message: message, suggestion: "RemoteFunction.foo", line: 1)
200200

201-
assert result == "alias ElixirLS.Test.RemoteFunction\nRemoteFunction.foo(42)"
202-
end
201+
assert result == "alias ElixirLS.Test.RemoteFunction\nRemoteFunction.foo(42)"
202+
end
203203
end
204204

205205
if Version.match?(System.version(), ">= 1.15.0") do
206-
test "when aliased with a custom name" do
207-
message = """
208-
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
206+
test "when aliased with a custom name" do
207+
message = """
208+
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
209209
210-
* foo/1
211-
"""
210+
* foo/1
211+
"""
212212

213-
{:ok, [result]} =
214-
~q{
213+
{:ok, [result]} =
214+
~q{
215215
alias ElixirLS.Test.RemoteFunction, as: Remote
216216
Remote.fou(42)
217217
}
218-
|> modify(message: message, suggestion: "Remote.foo", line: 1)
218+
|> modify(message: message, suggestion: "Remote.foo", line: 1)
219219

220-
assert result == "alias ElixirLS.Test.RemoteFunction, as: Remote\nRemote.foo(42)"
221-
end
220+
assert result == "alias ElixirLS.Test.RemoteFunction, as: Remote\nRemote.foo(42)"
221+
end
222222
end
223223
end
224224

@@ -318,41 +318,41 @@ defmodule ElixirLS.LanguageServer.Providers.CodeAction.ReplaceRemoteFunctionTest
318318
end
319319

320320
if Version.match?(System.version(), ">= 1.15.0") do
321-
test "when aliased" do
322-
message = """
323-
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
321+
test "when aliased" do
322+
message = """
323+
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
324324
325-
* foo/1
326-
"""
325+
* foo/1
326+
"""
327327

328-
{:ok, [result]} =
329-
~q{
328+
{:ok, [result]} =
329+
~q{
330330
alias ElixirLS.Test.RemoteFunction
331331
&RemoteFunction.fou/1
332332
}
333-
|> modify(message: message, suggestion: "RemoteFunction.foo", line: 1)
333+
|> modify(message: message, suggestion: "RemoteFunction.foo", line: 1)
334334

335-
assert result == "alias ElixirLS.Test.RemoteFunction\n&RemoteFunction.foo/1"
336-
end
335+
assert result == "alias ElixirLS.Test.RemoteFunction\n&RemoteFunction.foo/1"
336+
end
337337
end
338338

339339
if Version.match?(System.version(), ">= 1.15.0") do
340-
test "when aliased with a custom name" do
341-
message = """
342-
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
340+
test "when aliased with a custom name" do
341+
message = """
342+
ElixirLS.Test.RemoteFunction.fou/1 is undefined or private. Did you mean:
343343
344-
* foo/1
345-
"""
344+
* foo/1
345+
"""
346346

347-
{:ok, [result]} =
348-
~q{
347+
{:ok, [result]} =
348+
~q{
349349
alias ElixirLS.Test.RemoteFunction, as: Remote
350350
&Remote.fou/1
351351
}
352-
|> modify(message: message, suggestion: "Remote.foo", line: 1)
352+
|> modify(message: message, suggestion: "Remote.foo", line: 1)
353353

354-
assert result == "alias ElixirLS.Test.RemoteFunction, as: Remote\n&Remote.foo/1"
354+
assert result == "alias ElixirLS.Test.RemoteFunction, as: Remote\n&Remote.foo/1"
355+
end
355356
end
356357
end
357-
end
358358
end

apps/language_server/test/providers/execute_command/expand_macro_test.exs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ExpandMacroTest do
3939

4040
if Version.match?(System.version(), ">= 1.15.0") do
4141
assert res == %{
42-
"expand" => "abc\n",
43-
"expandAll" => "abc\n",
44-
"expandOnce" => "abc\n"
45-
}
42+
"expand" => "abc\n",
43+
"expandAll" => "abc\n",
44+
"expandOnce" => "abc\n"
45+
}
4646
else
4747
assert res == %{
48-
"expand" => "abc\n",
49-
"expandAll" => "abc()\n",
50-
"expandOnce" => "abc\n"
51-
}
48+
"expand" => "abc\n",
49+
"expandAll" => "abc()\n",
50+
"expandOnce" => "abc\n"
51+
}
5252
end
5353
end
5454

@@ -135,20 +135,20 @@ defmodule ElixirLS.LanguageServer.Providers.ExecuteCommand.ExpandMacroTest do
135135
if Version.match?(System.version(), "< 1.14.0") do
136136
"Application\n\n(\n Application\n @doc false\n {:stop, 1}\n nil\n)"
137137
else
138-
"""
139-
(
140-
require Application
141-
138+
"""
142139
(
143-
Module.__put_attribute__(MyModule, :behaviour, Application, nil)
144-
Module.__put_attribute__(MyModule, :doc, {2, false}, nil)
140+
require Application
145141
146-
def stop(_state) do
147-
:ok
148-
end
142+
(
143+
Module.__put_attribute__(MyModule, :behaviour, Application, nil)
144+
Module.__put_attribute__(MyModule, :doc, {2, false}, nil)
149145
150-
Module.make_overridable(MyModule, Application)
151-
"""
146+
def stop(_state) do
147+
:ok
148+
end
149+
150+
Module.make_overridable(MyModule, Application)
151+
"""
152152
end
153153
end)
154154
|> String.trim()

apps/language_server/test/providers/references/locator_test.exs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -811,48 +811,48 @@ defmodule ElixirLS.LanguageServer.Providers.References.LocatorTest do
811811
end
812812

813813
if Version.match?(System.version(), ">= 1.15.0") do
814-
test "find references for metadata calls on variable or attribute",
815-
%{trace: trace} do
816-
buffer = """
817-
defmodule A do
818-
@callback abc() :: any()
819-
end
814+
test "find references for metadata calls on variable or attribute",
815+
%{trace: trace} do
816+
buffer = """
817+
defmodule A do
818+
@callback abc() :: any()
819+
end
820820
821-
defmodule B do
822-
@behaviour A
821+
defmodule B do
822+
@behaviour A
823823
824-
def abc, do: :ok
825-
end
824+
def abc, do: :ok
825+
end
826826
827-
defmodule X do
828-
@b B
829-
@b.abc()
830-
def a do
831-
b = B
832-
b.abc()
827+
defmodule X do
828+
@b B
829+
@b.abc()
830+
def a do
831+
b = B
832+
b.abc()
833+
end
833834
end
834-
end
835-
"""
835+
"""
836836

837-
references = Locator.references(buffer, 8, 8, trace)
837+
references = Locator.references(buffer, 8, 8, trace)
838838

839-
assert [
840-
%{
841-
range: %{
842-
end: %{column: 9, line: 13},
843-
start: %{column: 6, line: 13}
844-
},
845-
uri: nil
846-
},
847-
%{
848-
range: %{
849-
end: %{column: 10, line: 16},
850-
start: %{column: 7, line: 16}
839+
assert [
840+
%{
841+
range: %{
842+
end: %{column: 9, line: 13},
843+
start: %{column: 6, line: 13}
844+
},
845+
uri: nil
851846
},
852-
uri: nil
853-
}
854-
] = references
855-
end
847+
%{
848+
range: %{
849+
end: %{column: 10, line: 16},
850+
start: %{column: 7, line: 16}
851+
},
852+
uri: nil
853+
}
854+
] = references
855+
end
856856
end
857857

858858
test "find references for the correct arity version for metadata calls with cursor over module",

0 commit comments

Comments
 (0)