~tim/scheme-vm

ref: 3c0fc6fa79193278089891e19d63a0f0ddff22c7 scheme-vm/spec/spec_helper.rb -rw-r--r-- 410 bytes
3c0fc6faTim Morgan Remove halt option from compile method 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require_relative '../program'
require_relative '../vm'
require_relative '../compiler'
require_relative '../parser'

RSpec.configure do |c|
  c.filter_run focus: true
  c.run_all_when_everything_filtered = true

  def d(instructions, skip_libs: true)
    pretty = VM::PrettyPrinter.new(instructions).format
    if skip_libs
      pretty.slice_after('VM::ENDL').to_a.last
    else
      pretty
    end
  end
end