diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2019-12-24 11:57:02 +0100 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2019-12-24 11:57:02 +0100 |
commit | 203d540c3a2ecf37be7f9cbe6d07a790196f701f (patch) | |
tree | 3695cf48de6691dd374078ea1051623ecc4f8b59 | |
parent | d7002a1a99b2502084c23bf1db66ace18f4f247c (diff) | |
download | elixir-203d540c3a2ecf37be7f9cbe6d07a790196f701f.tar.gz |
Fixes for new Macro.to_string behaviour
-rw-r--r-- | lib/elixir/test/elixir/exception_test.exs | 4 | ||||
-rw-r--r-- | lib/elixir/test/elixir/kernel/errors_test.exs | 4 | ||||
-rw-r--r-- | lib/elixir/test/elixir/kernel/expansion_test.exs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/elixir/test/elixir/exception_test.exs b/lib/elixir/test/elixir/exception_test.exs index 5dfb0f919..9f3797aa4 100644 --- a/lib/elixir/test/elixir/exception_test.exs +++ b/lib/elixir/test/elixir/exception_test.exs @@ -788,7 +788,7 @@ defmodule ExceptionTest do # 2 :invalid - Attempted function clauses (showing 10 out of 24): + Attempted function clauses (showing 10 out of 25): def to_string(-{var, _, context} = ast-, fun) when -is_atom(var)- and -is_atom(context)- def to_string(-{:__aliases__, _, refs} = ast-, fun) @@ -801,7 +801,7 @@ defmodule ExceptionTest do def to_string(-{:fn, _, [{:->, _, [_, tuple]}] = arrow} = ast-, fun) when -not(is_tuple(tuple))- or -elem(tuple, 0) != :__block__- def to_string(-{:fn, _, [{:->, _, _}] = block} = ast-, fun) ... - (14 clauses not shown) + (15 clauses not shown) """ end diff --git a/lib/elixir/test/elixir/kernel/errors_test.exs b/lib/elixir/test/elixir/kernel/errors_test.exs index 8adc0870a..73fef6ce4 100644 --- a/lib/elixir/test/elixir/kernel/errors_test.exs +++ b/lib/elixir/test/elixir/kernel/errors_test.exs @@ -318,7 +318,7 @@ defmodule Kernel.ErrorsTest do assert interpret.("f 1 + g h 2, 3") == "f(1 + g(h(2, 3)))" assert interpret.("assert [] = TestRepo.all from p in Post, where: p.title in ^[]") == - "assert([] = TestRepo.all(from(p in Post, where: p.title() in ^[])))" + "assert([] = TestRepo.all(from(p in Post, where: p.title in ^[])))" end test "syntax error on atom dot alias" do @@ -477,7 +477,7 @@ defmodule Kernel.ErrorsTest do assert_eval_raise SyntaxError, "nofile:1: syntax error before: '{'", '%{a, b}{a: :b}' assert_eval_raise CompileError, - "nofile:1: expected key-value pairs in a map, got: put_in(foo.bar().baz(), nil)", + "nofile:1: expected key-value pairs in a map, got: put_in(foo.bar.baz, nil)", 'foo = 1; %{put_in(foo.bar.baz, nil), foo}' end diff --git a/lib/elixir/test/elixir/kernel/expansion_test.exs b/lib/elixir/test/elixir/kernel/expansion_test.exs index 49c35dfc4..a9610377d 100644 --- a/lib/elixir/test/elixir/kernel/expansion_test.exs +++ b/lib/elixir/test/elixir/kernel/expansion_test.exs @@ -2541,11 +2541,11 @@ defmodule Kernel.ExpansionTest do expand(quote(do: foo(1)(2))) end - assert_raise CompileError, ~r"invalid call 1\.foo\(\)", fn -> + assert_raise CompileError, ~r"invalid call 1\.foo", fn -> expand(quote(do: 1.foo)) end - assert_raise CompileError, ~r"invalid call 0\.foo\(\)", fn -> + assert_raise CompileError, ~r"invalid call 0\.foo", fn -> expand(quote(do: __ENV__.line.foo)) end |