Skip to content

Commit 203d540

Browse files
author
José Valim
committed
Fixes for new Macro.to_string behaviour
1 parent d7002a1 commit 203d540

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/elixir/test/elixir/exception_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ defmodule ExceptionTest do
788788
# 2
789789
:invalid
790790
791-
Attempted function clauses (showing 10 out of 24):
791+
Attempted function clauses (showing 10 out of 25):
792792
793793
def to_string(-{var, _, context} = ast-, fun) when -is_atom(var)- and -is_atom(context)-
794794
def to_string(-{:__aliases__, _, refs} = ast-, fun)
@@ -801,7 +801,7 @@ defmodule ExceptionTest do
801801
def to_string(-{:fn, _, [{:->, _, [_, tuple]}] = arrow} = ast-, fun) when -not(is_tuple(tuple))- or -elem(tuple, 0) != :__block__-
802802
def to_string(-{:fn, _, [{:->, _, _}] = block} = ast-, fun)
803803
...
804-
(14 clauses not shown)
804+
(15 clauses not shown)
805805
"""
806806
end
807807

lib/elixir/test/elixir/kernel/errors_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ defmodule Kernel.ErrorsTest do
318318
assert interpret.("f 1 + g h 2, 3") == "f(1 + g(h(2, 3)))"
319319

320320
assert interpret.("assert [] = TestRepo.all from p in Post, where: p.title in ^[]") ==
321-
"assert([] = TestRepo.all(from(p in Post, where: p.title() in ^[])))"
321+
"assert([] = TestRepo.all(from(p in Post, where: p.title in ^[])))"
322322
end
323323

324324
test "syntax error on atom dot alias" do
@@ -477,7 +477,7 @@ defmodule Kernel.ErrorsTest do
477477
assert_eval_raise SyntaxError, "nofile:1: syntax error before: '{'", '%{a, b}{a: :b}'
478478

479479
assert_eval_raise CompileError,
480-
"nofile:1: expected key-value pairs in a map, got: put_in(foo.bar().baz(), nil)",
480+
"nofile:1: expected key-value pairs in a map, got: put_in(foo.bar.baz, nil)",
481481
'foo = 1; %{put_in(foo.bar.baz, nil), foo}'
482482
end
483483

lib/elixir/test/elixir/kernel/expansion_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,11 +2541,11 @@ defmodule Kernel.ExpansionTest do
25412541
expand(quote(do: foo(1)(2)))
25422542
end
25432543

2544-
assert_raise CompileError, ~r"invalid call 1\.foo\(\)", fn ->
2544+
assert_raise CompileError, ~r"invalid call 1\.foo", fn ->
25452545
expand(quote(do: 1.foo))
25462546
end
25472547

2548-
assert_raise CompileError, ~r"invalid call 0\.foo\(\)", fn ->
2548+
assert_raise CompileError, ~r"invalid call 0\.foo", fn ->
25492549
expand(quote(do: __ENV__.line.foo))
25502550
end
25512551

0 commit comments

Comments
 (0)