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