Skip to content

Commit

Permalink
Add temporary workflow to check new backend (#308)
Browse files Browse the repository at this point in the history
* Add temporary workflow to check new backend

* Try to temporarily disable yjit-ubuntu workflows

* Add new btest file for new backend tests
  • Loading branch information
maximecb authored and k0kubun committed Aug 26, 2022
1 parent 989a894 commit 3cb619c
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions bootstraptest/test_yjit_new_backend.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Run can run this test file directly with:
# make -j miniruby && RUST_BACKTRACE=1 ruby --disable=gems bootstraptest/runner.rb --ruby="./miniruby -I./lib -I. -I.ext/common --disable-gems --yjit-call-threshold=1 --yjit-verify-ctx" bootstraptest/test_yjit_new_backend.rb

assert_equal '3', %q{
def foo(n)
n
end
foo(3)
}

assert_equal '14', %q{
def foo(n)
n + n
end
foo(7)
}

assert_equal '[7]', %q{
def foo(n)
[n]
end
foo(7)
}

assert_equal '[8]', %q{
def foo(n)
[n+1]
end
foo(7)
}

# TODO: progress towards getting branches and calls working
=begin
def foo(n)
if n
n
end
end
puts foo(0)
=end

0 comments on commit 3cb619c

Please sign in to comment.