Skip to content

Commit 8939b39

Browse files
author
José Valim
committed
Update to Erlang 18
1 parent e12a0c5 commit 8939b39

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

lib/elixir/test/elixir/exception_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ defmodule Kernel.ExceptionTest do
291291

292292
test "format_fa" do
293293
assert Exception.format_fa(fn -> end, 1) =~
294-
~r"#Function<\d\.\d+/0 in Kernel\.ExceptionTest\.test format_fa/1>/1"
294+
~r"#Function<\d+\.\d+/0 in Kernel\.ExceptionTest\.test format_fa/1>/1"
295295
end
296296

297297
import Exception, only: [message: 1]

lib/elixir/test/elixir/protocol_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ defmodule ProtocolTest do
123123
test "protocol defines callbacks" do
124124
if :erlang.system_info(:otp_release) >= '18' do
125125
assert get_callbacks(Sample, :ok, 1) ==
126-
[{:type, 9, :fun, [{:type, 9, :product, [{:user_type, 9, :t, []}]}, {:type, 9, :boolean, []}]}]
126+
[{:type, [9], :fun, [{:type, [9], :product, [{:user_type, [9], :t, []}]}, {:type, [9], :boolean, []}]}]
127127

128128
assert get_callbacks(WithAny, :ok, 1) ==
129-
[{:type, 16, :fun, [{:type, 16, :product, [{:user_type, 16, :t, []}]}, {:type, 16, :term, []}]}]
129+
[{:type, [16], :fun, [{:type, [16], :product, [{:user_type, [16], :t, []}]}, {:type, [16], :term, []}]}]
130130
else
131131
assert get_callbacks(Sample, :ok, 1) ==
132132
[{:type, 9, :fun, [{:type, 9, :product, [{:type, 9, :t, []}]}, {:type, 9, :boolean, []}]}]

lib/elixir/test/elixir/stream_test.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ defmodule StreamTest do
340340

341341
test "interval/1" do
342342
stream = Stream.interval(10)
343-
now = :erlang.now
343+
now = :os.timestamp
344344
assert Enum.take(stream, 5) == [0, 1, 2, 3, 4]
345-
assert :timer.now_diff(:erlang.now, now) > 50000
345+
assert :timer.now_diff(:os.timestamp, now) > 50000
346346
end
347347

348348
test "into/2 and run/1" do
@@ -622,9 +622,9 @@ defmodule StreamTest do
622622

623623
test "timer/1" do
624624
stream = Stream.timer(10)
625-
now = :erlang.now
625+
now = :os.timestamp
626626
assert Enum.to_list(stream) == [0]
627-
assert :timer.now_diff(:erlang.now, now) > 10000
627+
assert :timer.now_diff(:os.timestamp, now) > 10000
628628
end
629629

630630
test "unfold/2" do

0 commit comments

Comments
 (0)