2018-06-30 18:20:17 +02:00
|
|
|
|
|
|
|
require_relative "helper"
|
|
|
|
|
|
|
|
module Vool
|
2019-08-12 23:13:29 +02:00
|
|
|
class TestClassStatementMom < MiniTest::Test
|
2018-06-30 18:20:17 +02:00
|
|
|
include MomCompile
|
|
|
|
|
|
|
|
def setup
|
2018-07-04 22:21:11 +02:00
|
|
|
@ret = compile_mom( as_test_main("return 1"))
|
2018-06-30 18:20:17 +02:00
|
|
|
end
|
|
|
|
|
2018-07-01 10:59:52 +02:00
|
|
|
def test_return_class
|
2019-08-10 20:30:00 +02:00
|
|
|
assert_equal Mom::MomCollection , @ret.class
|
2018-07-01 10:59:52 +02:00
|
|
|
end
|
|
|
|
def test_has_compilers
|
2019-08-10 20:30:00 +02:00
|
|
|
assert_equal Mom::MethodCompiler , @ret.method_compilers.first.class
|
2018-06-30 18:20:17 +02:00
|
|
|
end
|
2018-07-01 20:51:48 +02:00
|
|
|
|
|
|
|
def test_constant
|
|
|
|
assert @ret.method_compilers.first.add_constant( Parfait::Integer.new(5) )
|
|
|
|
end
|
|
|
|
|
2018-06-30 18:20:17 +02:00
|
|
|
end
|
|
|
|
end
|