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
|
2019-09-12 12:10:31 +02:00
|
|
|
@ret = compile_mom( as_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-09-28 11:41:38 +02:00
|
|
|
assert_equal Mom::MethodCompiler , @ret.method_compilers.class
|
2018-06-30 18:20:17 +02:00
|
|
|
end
|
2018-07-01 20:51:48 +02:00
|
|
|
|
|
|
|
def test_constant
|
2019-09-28 11:41:38 +02:00
|
|
|
assert @ret.method_compilers.add_constant( Parfait::Integer.new(5) )
|
2018-07-01 20:51:48 +02:00
|
|
|
end
|
|
|
|
|
2018-06-30 18:20:17 +02:00
|
|
|
end
|
|
|
|
end
|