Sha256: e9ca07b8868a050b9a1869357f77bfca4e4cd470e02eafb260616df09a5616bd
Contents?: true
Size: 687 Bytes
Versions: 13
Compression:
Stored size: 687 Bytes
Contents
require 'spec_helper' module WLang class Compiler describe ToRubyCode do def generate(source) ToRubyCode.new.call(source) end it 'compiles [:proc, ...]' do source = [:proc, [:static, "Hello world"]] expected = %q{Proc.new{|d1,b1| b1 << ("Hello world") }} generate(source).should eq(expected) end it 'compiles [:dispatch, ...]' do source = [:dispatch, :_tag_36, [:proc, [:static, "Hello world"]]] expected = %q{d0._tag_36(b0, Proc.new{|d1,b1| b1 << ("Hello world") })} generate(source).should eq(expected) end end # describe ToRubyCode end # class Compiler end # module WLang
Version data entries
13 entries across 13 versions & 1 rubygems