summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Doane <jaydoane@apache.org>2021-11-09 15:43:21 -0800
committerJay Doane <jaydoane@apache.org>2021-11-10 10:29:02 -0800
commit4d2534b1e2d70d5d4e428a50b7727599489e8783 (patch)
treeaf023bd1b74d428b5074c0d53171b6355514f086
parent990b4944f50ab9c6a50a3c05ffa6cf41a07745da (diff)
downloadcouchdb-eliminate-elixir-test-warnings.tar.gz
Eliminate elixir test compiler warningseliminate-elixir-test-warnings
Eliminates the following: warning: variable "epoch" is unused (if the variable is not meant to be used, prefix it with an underscore) src/couchdb/test/elixir/test/replication_test.exs:1756: ReplicationTest.seq_to_shards/1 warning: variable "uuid" is unused (if the variable is not meant to be used, prefix it with an underscore) src/couchdb/test/elixir/test/replication_test.exs:1756: ReplicationTest.seq_to_shards/1 warning: variable "string" is unused (if the variable is not meant to be used, prefix it with an underscore) src/couchdb/test/elixir/test/utf8_test.exs:32: UTF8Test."test UTF8 support"/1 warning: variable "repeated_view_offset_test_fun" does not exist and is being expanded to "repeated_view_offset_test_fun()", please use parentheses to remove the ambiguity or change the variable name src/couchdb/test/elixir/test/view_offsets_test.exs:63: ViewOffsetTest."test repeated view offsets"/1
-rw-r--r--test/elixir/test/replication_test.exs2
-rw-r--r--test/elixir/test/utf8_test.exs2
-rw-r--r--test/elixir/test/view_offsets_test.exs2
3 files changed, 3 insertions, 3 deletions
diff --git a/test/elixir/test/replication_test.exs b/test/elixir/test/replication_test.exs
index b2e30ab95..09f3e2417 100644
--- a/test/elixir/test/replication_test.exs
+++ b/test/elixir/test/replication_test.exs
@@ -1753,7 +1753,7 @@ defmodule ReplicationTest do
def cmp_json(lhs, rhs), do: lhs == rhs
def seq_to_shards(seq) do
- for {_node, range, {seq_num, uuid, epoch}} <- decode_seq(seq) do
+ for {_node, range, {seq_num, _uuid, _epoch}} <- decode_seq(seq) do
{range, seq_num}
end
end
diff --git a/test/elixir/test/utf8_test.exs b/test/elixir/test/utf8_test.exs
index ad78080ae..6b1c1cea9 100644
--- a/test/elixir/test/utf8_test.exs
+++ b/test/elixir/test/utf8_test.exs
@@ -29,7 +29,7 @@ defmodule UTF8Test do
texts
|> Enum.with_index()
- |> Enum.each(fn {string, index} ->
+ |> Enum.each(fn {_string, index} ->
resp = Couch.get("/#{db_name}/#{index}")
%{"_id" => id, "text" => text} = resp.body
assert resp.status_code == 200
diff --git a/test/elixir/test/view_offsets_test.exs b/test/elixir/test/view_offsets_test.exs
index 20aa1ca9d..edb5a58f6 100644
--- a/test/elixir/test/view_offsets_test.exs
+++ b/test/elixir/test/view_offsets_test.exs
@@ -60,7 +60,7 @@ defmodule ViewOffsetTest do
end
test "repeated view offsets" do
- 0..14 |> Enum.each(fn _ -> repeated_view_offset_test_fun end)
+ 0..14 |> Enum.each(fn _ -> repeated_view_offset_test_fun() end)
end
def repeated_view_offset_test_fun do