Class: OrigenTesters::SmartestBasedTester::V93K_SMT8::TestSuite

Inherits:
Base::TestSuite
  • Object
show all
Defined in:
lib/origen_testers/smartest_based_tester/v93k_smt8/test_suite.rb

Constant Summary collapse

ATTRS =
%w(
  name
  comment

  test_method

  pattern
  specification
)
ALIASES =
{
  spec:          :specification,
  test_function: :test_method
}
DEFAULTS =
{
}

Instance Attribute Summary

Attributes inherited from Base::TestSuite

#meta

Instance Method Summary collapse

Methods inherited from Base::TestSuite

#extract_atp_attributes, #initialize, #inspect, #interface, #method_missing, #name=, #pattern=, #respond_to?, #smt8?, #to_meta

Constructor Details

This class inherits a constructor from OrigenTesters::SmartestBasedTester::Base::TestSuite

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OrigenTesters::SmartestBasedTester::Base::TestSuite

Instance Method Details

#linesObject



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/origen_testers/smartest_based_tester/v93k_smt8/test_suite.rb', line 44

def lines
  l = []
  l << "suite #{name} calls #{test_method.klass} {"
  if pattern && !pattern.to_s.empty?
    l << "    measurement.pattern = setupRef(#{tester.package_namespace}.patterns.#{pattern});"
  end
  if specification && !specification.to_s.empty?
    l << "    measurement.specification = setupRef(#{tester.package_namespace}.specs.#{specification});"
  end
  test_method.sorted_parameters.each do |param|
    name = param[0]
    unless name.is_a?(String)
      name = name.to_s[0] == '_' ? name.to_s.camelize(:upper) : name.to_s.camelize(:lower)
    end
    l << "    #{name} = #{wrap_if_string(test_method.format(param[0]))};"
  end
  l << '}'
  l
end