Sha256: d6a3e7d04759836125cdf530cf4f5aae43309d61baa3fafabc49419e0971849b

Contents?: true

Size: 321 Bytes

Versions: 3

Compression:

Stored size: 321 Bytes

Contents

class MainMethodTest < Test::Unit::TestCase
  def test_main_generation_for_file_with_class_of_same_name
    code = <<-EOC
      class WithMain
      end
      System.out.println 'bar'
    EOC

    main_class, = compile code, :name => 'with_main'

    assert_output "bar\n" do
      main_class.main(nil)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mirah-0.1.2-java test/jvm/main_method_test.rb
mirah-0.1.1-java test/jvm/main_method_test.rb
mirah-0.1.0-java test/jvm/main_method_test.rb