Skip to content

Commit

Permalink
tests(add setup files)
Browse files Browse the repository at this point in the history
Add artifacts for testing better.
  • Loading branch information
ckoch-cars committed Aug 20, 2022
1 parent 9739eb6 commit 4eb61df
Show file tree
Hide file tree
Showing 5 changed files with 468 additions and 353 deletions.
12 changes: 12 additions & 0 deletions test/support/example_five.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
defmodule ExFactor.Support.ExampleFive do
@moduledoc """
Support module for `ExFactor` testing.
"""

alias ExFactor.Parser
alias ExFactor.Callers
import Parser

def callers(mod), do: Callers.callers(mod)
def all_funcs(input), do: all_functions(input)
end
2 changes: 1 addition & 1 deletion test/support/support.ex → test/support/example_one.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
defmodule ExFactor.Support do
defmodule ExFactor.Support.ExampleOne do
@moduledoc """
Support module for `ExFactor` testing.
"""
Expand Down
23 changes: 23 additions & 0 deletions test/support/example_three.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
defmodule ExFactor.Support.ExampleThree do
@moduledoc """
Support module for `ExFactor` testing.
"""

# use alias as: to verify the caller is found.
alias ExFactor.{Callers, Parser}
# alias ExFactor.Callers

def callers(mod), do: Callers.callers(mod)
def all_functions(input), do: Parser.all_functions(input)
end


defmodule ExFactor.Support.ExampleFour do
defmodule SubModuleTwoA do
@moduledoc false

def example_func(arg_two) do
IO.puts(inspect(arg_two, label: "arg_two"))
end
end
end
19 changes: 19 additions & 0 deletions test/support/example_two.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
defmodule ExFactor.Support.ExampleTwo do
@moduledoc """
Support module for `ExFactor` testing.
"""

# use alias as: to verify the caller is found.
alias ExFactor.Parser, as: P

def callers(mod), do: ExFactor.Callers.callers(mod)
def all_functions(input), do: P.all_functions(input)

defmodule SubModuleTwoA do
@moduledoc false

def example_func(arg_two) do
IO.puts(inspect(arg_two, label: "arg_two"))
end
end
end
Loading

0 comments on commit 4eb61df

Please sign in to comment.