ruby/test/yarp/ripper_compat_test.rb
Kevin Newton 439f069b4b [ruby/yarp] Move tests from test/* to test/yarp/* to match CRuby
This should make it easier on the sync to determine what changed
and hopefully result in fewer merge conflicts that have to be
manually resolved.

17d82afbfc
2023-08-25 21:15:49 +00:00

21 lines
391 B
Ruby

# frozen_string_literal: true
require_relative "test_helper"
module YARP
class RipperCompatTest < Test::Unit::TestCase
def test_1_plus_2
assert_equivalent("1 + 2")
end
def test_2_minus_3
assert_equivalent("2 - 3")
end
private
def assert_equivalent(source)
assert_equal Ripper.sexp_raw(source), RipperCompat.sexp_raw(source)
end
end
end