@@ -917,7 +917,7 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
917917 type: :field ,
918918 origin: nil ,
919919 call?: true ,
920- type_spec: nil ,
920+ type_spec: "String" ,
921921 value_is_map: false ,
922922 summary: "" ,
923923 metadata: % { }
@@ -945,7 +945,8 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
945945 type: :field ,
946946 origin: nil ,
947947 call?: true ,
948- type_spec: nil ,
948+ type_spec:
949+ "%{deeply: %{foo: term(), bar_1: term(), bar_2: term(), mod: String, num: term()}}" ,
949950 value_is_map: true ,
950951 summary: "" ,
951952 metadata: % { }
@@ -960,7 +961,8 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
960961 type: :field ,
961962 origin: nil ,
962963 call?: true ,
963- type_spec: nil ,
964+ type_spec:
965+ "%{foo: term(), bar_1: term(), bar_2: term(), mod: String, num: term()}" ,
964966 value_is_map: true ,
965967 summary: "" ,
966968 metadata: % { }
@@ -1881,7 +1883,7 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
18811883 type: :field ,
18821884 origin: "ElixirLS.Utils.CompletionEngineTest.MyStruct" ,
18831885 call?: true ,
1884- type_spec: nil ,
1886+ type_spec: "%{asdf: term()}" ,
18851887 value_is_map: true ,
18861888 summary: "" ,
18871889 metadata: % { }
@@ -1981,7 +1983,7 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
19811983 type: :field ,
19821984 origin: "ElixirLS.Utils.CompletionEngineTest.MyStruct" ,
19831985 call?: true ,
1984- type_spec: nil ,
1986+ type_spec: "%ElixirLS.Utils.CompletionEngineTest.MyStruct{}" ,
19851987 value_is_map: true ,
19861988 summary: "" ,
19871989 metadata: % { }
@@ -2016,19 +2018,19 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
20162018 end
20172019
20182020 test "completion for bitstring modifiers" do
2019- assert entries = expand ( ' <<foo::' ) |> Enum . filter ( & ( & 1 [ :type ] == :bitstring_option ) )
2021+ assert entries = expand ( ~c " <<foo::" ) |> Enum . filter ( & ( & 1 [ :type ] == :bitstring_option ) )
20202022 assert Enum . any? ( entries , & ( & 1 . name == "integer" ) )
20212023 assert Enum . any? ( entries , & ( & 1 . name == "size" and & 1 . arity == 1 ) )
20222024
2023- assert [ % { name: "integer" , type: :bitstring_option } ] = expand ( ' <<foo::int' )
2025+ assert [ % { name: "integer" , type: :bitstring_option } ] = expand ( ~c " <<foo::int" )
20242026
2025- assert entries = expand ( ' <<foo::integer-' ) |> Enum . filter ( & ( & 1 [ :type ] == :bitstring_option ) )
2027+ assert entries = expand ( ~c " <<foo::integer-" ) |> Enum . filter ( & ( & 1 [ :type ] == :bitstring_option ) )
20262028 refute Enum . any? ( entries , & ( & 1 . name == "integer" ) )
20272029 assert Enum . any? ( entries , & ( & 1 . name == "little" ) )
20282030 assert Enum . any? ( entries , & ( & 1 . name == "size" and & 1 . arity == 1 ) )
20292031
20302032 assert entries =
2031- expand ( ' <<foo::integer-little-' ) |> Enum . filter ( & ( & 1 [ :type ] == :bitstring_option ) )
2033+ expand ( ~c " <<foo::integer-little-" ) |> Enum . filter ( & ( & 1 [ :type ] == :bitstring_option ) )
20322034
20332035 refute Enum . any? ( entries , & ( & 1 . name == "integer" ) )
20342036 refute Enum . any? ( entries , & ( & 1 . name == "little" ) )
@@ -2602,7 +2604,7 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
26022604 # In module context, we should only module functions
26032605 entries =
26042606 expand (
2605- ' @module_attr.' ,
2607+ ~c " @module_attr." ,
26062608 module_env ,
26072609 metadata
26082610 )
@@ -2613,7 +2615,7 @@ defmodule ElixirLS.Utils.CompletionEngineTest do
26132615 # In def context, we should get both module and function
26142616 entries =
26152617 expand (
2616- ' @module_attr.' ,
2618+ ~c " @module_attr." ,
26172619 module_env |> Map . put ( :function , { :bar , 0 } ) ,
26182620 metadata
26192621 )
0 commit comments