<commit_before>function rosenbrock2d(x)
  return (1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2
end

facts("bboptimize smoketest") do

  for(m in keys(BlackBoxOptim.ValidMethods))
    context("testing $(m) method to ensure it works") do
      b, f = bboptimize(rosenbrock2d; method = m,
        search_space = [(-5.0, 5.0), (-2.0, 2.0)], max_time = 0.3,
        parameters = @compat Dict{Symbol,Any}(:ShowTrace => false))

      # println("Fitness for $m: $f")

      @fact size(b) => (2,)
      @fact typeof(f) => Float64
      @fact f < 100.0 => true # this can't be very tight since we give very little time for optimization...
    end

  end

end<commit_msg>smoketest: use less_than() for better diagnostics<commit_after>function rosenbrock2d(x)
  return (1.0 - x[1])^2 + 100.0 * (x[2] - x[1]^2)^2
end

facts("bboptimize smoketest") do

  for(m in keys(BlackBoxOptim.ValidMethods))
    context("testing $(m) method to ensure it works") do
      b, f = bboptimize(rosenbrock2d; method = m,
        search_space = [(-5.0, 5.0), (-2.0, 2.0)], max_time = 0.3,
        parameters = @compat Dict{Symbol,Any}(:ShowTrace => false))

      # println("Fitness for $m: $f")

      @fact size(b) => (2,)
      @fact typeof(f) => Float64
      @fact f => less_than(100.0) # this can't be very tight since we give very little time for optimization...
    end

  end

end
{'fraction_non_alphanumeric': 0.16224188790560473, 'fraction_numerical': 0.045722713864306784, 'mean_word_length': 3.0386904761904763, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4131770', 'n_tokens_mistral': 542, 'n_tokens_neox': 501, 'n_words': 141}