Ad
  • Custom User Avatar
  • Custom User Avatar

    My own test cases pass but I'm getting some weird behaviour running the official tests.
    Here is the test output....

    Test Results:
    GeneticTests
    It should respect the given length
    ✘ It should respect the given length (6.4ms)

    1. test It should respect the given length (GeneticTests)
      fixture:4
      ** (ArithmeticError) bad argument in arithmetic expression
      stacktrace:
      (stdlib) :math.pow(2, 10000)
      solution:4: Genetic.generate/1
      fixture:10
      In a chromosome of length 50, there should (probably) be at least one '1' (1 Passed, 0 Failed)
      In a chromosome of length 50, there should (probably) be at least one '0' (1 Passed, 0 Failed)
      In a chromosome of length l, running enough times it should be able to return all 2^l possibilities (1 Passed, 0 Failed)