class TestML

Constants

VERSION

Attributes

bridge[RW]
compiler[RW]
library[RW]
runtime[RW]
testml[RW]

Public Class Methods

new(attributes={}) { |self| ... } click to toggle source
# File lib/testml.rb, line 10
def initialize attributes={}
  attributes.each { |k,v| self.send "#{k}=", v }
  yield self if block_given?
end

Public Instance Methods

run(*args) click to toggle source
# File lib/testml.rb, line 15
def run(*args)
  set_default_classes
  @runtime.new(
    compiler: @compiler,
    bridge: @bridge,
    library: @library,
    testml: @testml,
  ).run(*args)
end
set_default_classes() click to toggle source
# File lib/testml.rb, line 25
def set_default_classes
  if not @runtime
    require 'testml/runtime/unit'
    @runtime = TestML::Runtime::Unit
  end
  if not @compiler
    require 'testml/compiler/pegex'
    @compiler = TestML::Compiler::Pegex
  end
  if not @bridge
    require 'testml/bridge'
    @bridge = TestML::Bridge
  end
  if not @library
    require 'testml/library/standard'
    require 'testml/library/debug'
    @library = [
      TestML::Library::Standard,
      TestML::Library::Debug,
    ]
  end
end