Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

failed to pass atom as a parameter #46

Open
verrchu opened this issue Jan 21, 2023 · 0 comments
Open

failed to pass atom as a parameter #46

verrchu opened this issue Jan 21, 2023 · 0 comments

Comments

@verrchu
Copy link

verrchu commented Jan 21, 2023

  test_with_params "add params", fn a, b ->
    :ok
  end do
    [
      {1, 2}, # ok
      {"a", "b"}, # ok
      {true, false} # error
    ]
  end

STACKTRACE:

== Compilation error in file test/hdo_assessor_web/acceptance/sandbox_channel_test.exs ==
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: not a tuple

    :erlang.tuple_to_list(false)
    (ex_parameterized 1.3.7) lib/ex_parameterized/params.ex:94: ExUnit.Parameterized.Params.escape_values/1
    (ex_parameterized 1.3.7) lib/ex_parameterized/params.ex:60: ExUnit.Parameterized.Params.test_with/3
    (elixir 1.12.3) lib/enum.ex:1582: Enum."-map/2-lists^map/1-0-"/2
    (elixir 1.12.3) lib/enum.ex:1582: Enum."-map/2-lists^map/1-0-"/2
    (ex_parameterized 1.3.7) expanding macro: ExUnit.Parameterized.Params.test_with_params/3
    test/<my_test>.exs:280: <MyTest>Test (module)
    (elixir 1.12.3) lib/kernel/parallel_compiler.ex:428: Kernel.ParallelCompiler.require_file/2
    (elixir 1.12.3) lib/kernel/parallel_compiler.ex:321: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7

ENVIRONMENT: Erlang/OTP 24 [erts-12.3.2.6] Elixir (1.12.3)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant