seanmor5 / genex

Genetic Algorithms in Elixir!
Apache License 2.0
147 stars 14 forks source link

genex_test Test Fails #6

Closed mazz closed 5 years ago

mazz commented 5 years ago
== Compilation error in file test/genex_test.exs ==
** (CompileError) test/genex_test.exs:10: def init/0 already defined as defp
    test/genex_test.exs:10: (module)
    test/genex_test.exs:7: (module)
    (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
    (elixir) lib/kernel/parallel_compiler.ex:237: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7

elixir 1.9.0

seanmor5 commented 5 years ago

Sorry about that, I haven't gotten around to writing any tests for the library (bad practice I know). I'll get around to fixing this sometime tomorrow.

mazz commented 5 years ago

No problem, I was trying to get it running and I thought the test would be a way and then I encountered the issue.

How do I run OneMax.run() ?

~/src/genex (master ✔) ᐅ iex -S mix
Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

Interactive Elixir (1.9.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> OneMax.run()
** (UndefinedFunctionError) function OneMax.run/0 is undefined (module OneMax is not available)
    OneMax.run()
seanmor5 commented 5 years ago

If you have the whole project downloaded:

mix run examples/one_max.exs
seanmor5 commented 5 years ago

Added a few basic tests, all passing.