Skip to content

Commit 80eb383

Browse files
committed
fix tests on < 1.17
1 parent f76b5e5 commit 80eb383

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

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

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,14 +1351,13 @@ defmodule ElixirLS.LanguageServer.Providers.Definition.LocatorTest do
13511351
end
13521352
"""
13531353

1354-
assert Locator.definition(buffer, 2, 8) == %Location{
1354+
assert %Location{
13551355
type: :function,
13561356
file: nil,
13571357
line: 2,
13581358
column: 3,
1359-
end_line: 2,
1360-
end_column: 31
1361-
}
1359+
end_line: 2
1360+
} = Locator.definition(buffer, 2, 8)
13621361
end
13631362

13641363
test "find definition of local functions with default args" do
@@ -1903,14 +1902,13 @@ defmodule ElixirLS.LanguageServer.Providers.Definition.LocatorTest do
19031902
end
19041903
"""
19051904

1906-
assert Locator.definition(buffer, 2, 10) == %Location{
1905+
assert %Location{
19071906
type: :typespec,
19081907
file: nil,
19091908
line: 2,
19101909
column: 3,
1911-
end_line: 2,
1912-
end_column: 27
1913-
}
1910+
end_line: 2
1911+
} = Locator.definition(buffer, 2, 10)
19141912
end
19151913

19161914
test "find definition of local spec on definition" do
@@ -1959,14 +1957,13 @@ defmodule ElixirLS.LanguageServer.Providers.Definition.LocatorTest do
19591957
end
19601958
"""
19611959

1962-
assert Locator.definition(buffer, 2, 14) == %Location{
1960+
assert %Location{
19631961
type: :spec,
19641962
file: nil,
19651963
line: 2,
19661964
column: 3,
1967-
end_line: 2,
1968-
end_column: 31
1969-
}
1965+
end_line: 2
1966+
} = Locator.definition(buffer, 2, 14)
19701967
end
19711968

19721969
test "find metadata type for the correct arity - on type definition" do

0 commit comments

Comments
 (0)