~tim/scheme-vm

ref: c5110102ce2df2d78a0c87f293edf20f5a3984e7 scheme-vm/spec/spec_helper.rb -rw-r--r-- 410 bytes
c5110102Tim Morgan Add more char functions 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