Class: OrigenTesters::SmartestBasedTester::Base::TestSuites
- Inherits:
-
Object
- Object
- OrigenTesters::SmartestBasedTester::Base::TestSuites
- Defined in:
- lib/origen_testers/smartest_based_tester/base/test_suites.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#collection ⇒ Object
Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet.
-
#flow ⇒ Object
Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet.
Instance Method Summary collapse
- #add(name, options = {}) ⇒ Object (also: #run, #run_and_branch)
- #filename ⇒ Object
- #finalize ⇒ Object
-
#initialize(flow) ⇒ TestSuites
constructor
A new instance of TestSuites.
- #platform ⇒ Object
- #sorted_collection ⇒ Object
Constructor Details
#initialize(flow) ⇒ TestSuites
Returns a new instance of TestSuites.
10 11 12 13 14 15 16 17 18 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 10 def initialize(flow) @flow = flow @collection = [] @existing_names = {} # Test names also have to be unique vs. the current flow name if tester.smt8? @existing_names[flow.filename.sub('.flow', '').to_s] = true end end |
Instance Attribute Details
#collection ⇒ Object
Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet
8 9 10 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 8 def collection @collection end |
#flow ⇒ Object
Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet
8 9 10 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 8 def flow @flow end |
Instance Method Details
#add(name, options = {}) ⇒ Object Also known as: run, run_and_branch
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 24 def add(name, = {}) symbol = name.is_a?(Symbol) name = make_unique(name) # Ensure names given as a symbol stay as a symbol, this is more for # alignment to existing test cases than anything else name = name.to_sym if symbol suite = platform::TestSuite.new(name, ) @collection << suite # c = Origen.interface.consume_comments # Origen.interface.descriptions.add_for_test_definition(name, c) suite end |
#filename ⇒ Object
20 21 22 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 20 def filename flow.filename end |
#finalize ⇒ Object
43 44 45 46 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 43 def finalize # collection.each do |suite| # end end |
#platform ⇒ Object
39 40 41 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 39 def platform Origen.interface.platform end |
#sorted_collection ⇒ Object
48 49 50 |
# File 'lib/origen_testers/smartest_based_tester/base/test_suites.rb', line 48 def sorted_collection @collection.sort_by { |ts| ts.name.to_s } end |