Sha256: c660a1ad48d4734e245aab72f8da512f67db385026e1f10bc40faf580a9b9c68
Contents?: true
Size: 1.85 KB
Versions: 9
Compression:
Stored size: 1.85 KB
Contents
require 'pathname' module OrigenTesters module SmartestBasedTester class Base class VariablesFile include OrigenTesters::Generator attr_reader :variables attr_accessor :filename, :id, :subdirectory def initialize(options = {}) end def subdirectory @subdirectory ||= 'testflow/mfh.testflow.setup' end def add_variables(vars) if @variables vars.each do |k, v| if k == :empty? @variables[:empty?] ||= v else v.each do |k2, v2| unless v2.empty? @variables[k][k2] |= v2 end end end end else @variables = vars end end # What SMT7 calls a flag def flags if variables (variables[:all][:referenced_enables] + variables[:all][:set_enables]).uniq.sort do |x, y| x = x[0] if x.is_a?(Array) y = y[0] if y.is_a?(Array) # Need to use strings for the comparison as some flags can be a string and some a symbol x.to_s <=> y.to_s end end end # What SMT7 calls a declaration def declarations if variables (variables[:all][:jobs] + variables[:all][:referenced_flags] + variables[:all][:set_flags] + variables[:all][:unset_flags] + variables[:all][:add_flags]).uniq.sort do |x, y| x = x[0] if x.is_a?(Array) y = y[0] if y.is_a?(Array) # Need to use strings for the comparison as some declarations can be a string and some a symbol x.to_s <=> y.to_s end end end def to_be_written? tester.smt7? end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems