Skip to content

Commit

Permalink
Fix allow loop expressions test (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziosestito authored Mar 24, 2023
1 parent 1816f01 commit c11580f
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions test/rhai/engine_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,19 @@ defmodule Rhai.EngineTest do
end
end

# FIXME: At the moment Rhai has a wrong default for this one, disabling the test until it gets fixed upstream
# describe "set_allow_loop_expressions/2, allow_loop_expressions/1" do
# test "should return true by default" do
# engine = Engine.new()
#
# assert Engine.allow_loop_expressions?(engine)
# end
#
# test "should set the flag to false" do
# engine = Engine.new()
#
# refute Engine.new()
# |> Engine.set_allow_loop_expressions(false)
# |> Engine.allow_loop_expressions?()
# end
# end
describe "set_allow_loop_expressions/2, allow_loop_expressions/1" do
test "should return true by default" do
engine = Engine.new()

assert Engine.allow_loop_expressions?(engine)
end

test "should set the flag to false" do
refute Engine.new()
|> Engine.set_allow_loop_expressions(false)
|> Engine.allow_loop_expressions?()
end
end

describe "set_allow_looping/2, allow_looping?/1" do
test "should return true by default" do
Expand Down

0 comments on commit c11580f

Please sign in to comment.