require 'test/unit'
require 'yarvutil'

class YarvTestBase < Test::Unit::TestCase

  def remove_const sym
    Object.module_eval{
      remove_const sym
    }
  end

  def remove_method sym
    Object.module_eval{
      undef sym
    }
  end
  
  def ae str
    # puts str
    # puts YARVUtil.parse(str, $0, 0).disasm

    ruby = YARVUtil.eval_in_wrap(str)
    yield if block_given?
    yarv = YARVUtil.eval(str)
    yield if block_given?

    assert_equal(ruby, yarv)
  end

  def test_
  end

end

