@@ -563,17 +563,17 @@ defmodule Kernel.WarningTest do
563563 end
564564 """ )
565565 end ) =~
566- "the default values for the first 2 optional arguments in b/3 are never used\n nofile:3"
566+ "the default value for the last optional argument in b/3 is never used\n nofile:3"
567567
568568 assert capture_err ( fn ->
569569 Code . eval_string ( ~S"""
570570 defmodule Sample3 do
571- def a, do: b(1)
572- defp b(arg1 \\ 1 , arg2 \\ 2, arg3 \\ 3), do: [arg1, arg2, arg3]
571+ def a, do: b(1, 2 )
572+ defp b(arg1, arg2 \\ 2, arg3 \\ 3, arg4 \\ 4 ), do: [arg1, arg2, arg3, arg4 ]
573573 end
574574 """ )
575575 end ) =~
576- "the default value for the first optional argument in b/3 is never used\n nofile:3 "
576+ "the default values for the last 2 optional arguments in b/4 are never used"
577577
578578 assert capture_err ( fn ->
579579 Code . eval_string ( ~S"""
@@ -587,27 +587,16 @@ defmodule Kernel.WarningTest do
587587 assert capture_err ( fn ->
588588 Code . eval_string ( ~S"""
589589 defmodule Sample5 do
590- def a, do: b(1, 2, 3)
591- defp b(arg1 \\ 1, arg2 \\ 2, arg3 \\ 3)
592-
593- defp b(arg1, arg2, arg3), do: [arg1, arg2, arg3]
594- end
595- """ )
596- end ) =~ "default values for the optional arguments in b/3 are never used\n nofile:3"
597-
598- assert capture_err ( fn ->
599- Code . eval_string ( ~S"""
600- defmodule Sample6 do
601590 def a, do: b(1, 2)
602591 defp b(arg1 \\ 1, arg2 \\ 2, arg3 \\ 3)
603592
604593 defp b(arg1, arg2, arg3), do: [arg1, arg2, arg3]
605594 end
606595 """ )
607596 end ) =~
608- "the default values for the first 2 optional arguments in b/3 are never used\n nofile:3"
597+ "the default value for the last optional argument in b/3 is never used\n nofile:3"
609598 after
610- purge ( [ Sample1 , Sample2 , Sample3 , Sample4 , Sample5 , Sample6 ] )
599+ purge ( [ Sample1 , Sample2 , Sample3 , Sample4 , Sample5 ] )
611600 end
612601
613602 test "unused import" do
0 commit comments