always list of methods in class
improve vool test dirs
This commit is contained in:
parent
46d8f5002f
commit
4a7cc72732
@ -25,11 +25,8 @@ guard :minitest , all_on_start: false do # with Minitest::Unit
|
||||
# ruby compiler tests have a whole directory
|
||||
watch(%r{^lib/rubyx/ruby_compiler.rb}) { Dir["test/rubyx/ruby_compiler/test_*.rb"] }
|
||||
|
||||
# Vool to_mom compile process + # Ruby to vool compile process
|
||||
watch(%r{^lib/vool/(.+)_statement.rb}) { |m|
|
||||
[ Dir["test/vool/to_mom/test_#{m[1]}*.rb"] , "test/vool/statements/test_#{m[1]}.rb"] }
|
||||
watch(%r{^lib/vool/statements/send_statement.rb}) {
|
||||
[ Dir["test/vool/to_mom/send/test_*.rb"] , "test/vool/statements/test_send_statement.rb"] }
|
||||
[ Dir["test/vool/send/test_*.rb"] ] }
|
||||
|
||||
# message setup
|
||||
watch(%r{^lib/mom/instruction/message_setup.rb}) { Dir["test/mom/send/test_setup*.rb"] }
|
||||
|
@ -24,9 +24,10 @@ module Vool
|
||||
|
||||
def to_mom( _ )
|
||||
create_class_object
|
||||
mom = nil #return mom for test purpose
|
||||
self.each do |node|
|
||||
mom = node.to_mom(@clazz) if node.is_a?(MethodStatement)
|
||||
mom = []
|
||||
body.statements.each do |node|
|
||||
raise "Only methods for now #{node}" unless node.is_a?(MethodStatement)
|
||||
mom << node.to_mom(@clazz)
|
||||
end
|
||||
mom
|
||||
end
|
||||
|
@ -31,7 +31,7 @@ module MomCompile
|
||||
@method = statements.clazz.get_method(:main)
|
||||
assert_equal Parfait::VoolMethod , @method.class
|
||||
#puts "#{res.class}"
|
||||
res
|
||||
res.first
|
||||
end
|
||||
|
||||
def check_array( should , is )
|
||||
|
@ -11,7 +11,7 @@ module Vool
|
||||
@ins = compile_first_method( send_method )
|
||||
end
|
||||
|
||||
def test_compiles_not_array
|
||||
def test_first_not_array
|
||||
assert Array != @ins.class , @ins
|
||||
end
|
||||
def test_class_compiles
|
@ -1 +0,0 @@
|
||||
require_relative "../helper"
|
Loading…
Reference in New Issue
Block a user