Class: Origen::Tester::V93K::Generator::TestSuites

Inherits:
Object
  • Object
show all
Defined in:
lib/origen/tester/v93k/generator/test_suites.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (TestSuites) initialize(flow)

Returns a new instance of TestSuites



11
12
13
14
# File 'lib/origen/tester/v93k/generator/test_suites.rb', line 11

def initialize(flow)
  @flow = flow
  @collection = []
end

Instance Attribute Details

- (Object) collection

Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet



9
10
11
# File 'lib/origen/tester/v93k/generator/test_suites.rb', line 9

def collection
  @collection
end

- (Object) flow

Origen::Tester::Generator not included since test suites do not have their own top-level sheet, they will be incorporated within the flow sheet



9
10
11
# File 'lib/origen/tester/v93k/generator/test_suites.rb', line 9

def flow
  @flow
end

Instance Method Details

- (Object) add(name, options = {})



20
21
22
23
24
25
26
27
28
# File 'lib/origen/tester/v93k/generator/test_suites.rb', line 20

def add(name, options = {})
  check_for_duplicates(name)
  record_test_suite(name)
  suite = TestSuite.new(name, options)
  @collection << suite
  # c = Origen.interface.consume_comments
  # Origen.interface.descriptions.add_for_test_definition(name, c)
  suite
end

- (Boolean) duplicate?(name, options = {})

Returns true if the given test suite name has already been added to the current flow.

Pass in :global => true for all test flows to be considered.

Returns:

  • (Boolean)


33
34
35
36
37
38
39
40
# File 'lib/origen/tester/v93k/generator/test_suites.rb', line 33

def duplicate?(name, options = {})
  files = existing_test_suites[name]
  if files && !files.empty?
    options[:global] || files.include?(filename)
  else
    false
  end
end

- (Object) filename



16
17
18
# File 'lib/origen/tester/v93k/generator/test_suites.rb', line 16

def filename
  flow.filename
end