From 148b701544772db869c81f8a777882ed592a32a0 Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Wed, 27 Dec 2023 09:52:04 +0100 Subject: [PATCH] ex_unit defs have arity of 1 --- lib/elixir_sense/core/metadata_builder.ex | 4 ++-- test/elixir_sense/core/metadata_builder_test.exs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/elixir_sense/core/metadata_builder.ex b/lib/elixir_sense/core/metadata_builder.ex index 6ad039ab..389fe674 100644 --- a/lib/elixir_sense/core/metadata_builder.ex +++ b/lib/elixir_sense/core/metadata_builder.ex @@ -662,7 +662,7 @@ defmodule ElixirSense.Core.MetadataBuilder do state |> add_call_to_line({nil, :test, 0}, {line, column}) - pre_func(ast_without_params, state, meta, def_name, []) + pre_func(ast_without_params, state, meta, def_name, [{:_, [line: line, column: column], nil}]) end # ex_unit test without context @@ -681,7 +681,7 @@ defmodule ElixirSense.Core.MetadataBuilder do state |> add_call_to_line({nil, :test, 2}, {line, column}) - pre_func(ast_without_params, state, meta, def_name, []) + pre_func(ast_without_params, state, meta, def_name, [{:_, [line: line, column: column], nil}]) end # ex_unit test with context diff --git a/test/elixir_sense/core/metadata_builder_test.exs b/test/elixir_sense/core/metadata_builder_test.exs index 230268ce..cf89402f 100644 --- a/test/elixir_sense/core/metadata_builder_test.exs +++ b/test/elixir_sense/core/metadata_builder_test.exs @@ -637,12 +637,12 @@ defmodule ElixirSense.Core.MetadataBuilderTest do assert Map.has_key?( state.mods_funs_to_positions, - {MyModuleTests, :"test this too does what I want", 0} + {MyModuleTests, :"test this too does what I want", 1} ) assert Map.has_key?( state.mods_funs_to_positions, - {MyModuleTests, :"test is not implemented", 0} + {MyModuleTests, :"test is not implemented", 1} ) end