Class: Origen::Tester::V93K::Generator::TestFunctions
- Inherits:
-
Object
- Object
- Origen::Tester::V93K::Generator::TestFunctions
- Defined in:
- lib/origen/tester/v93k/generator/test_functions.rb
Instance Attribute Summary (collapse)
-
- (Object) collection
Origen::Tester::Generator not included since test functions do not have their own top-level sheet, they will be incorporated within the flow sheet.
-
- (Object) flow
Origen::Tester::Generator not included since test functions do not have their own top-level sheet, they will be incorporated within the flow sheet.
Instance Method Summary (collapse)
- - (Object) [](name)
- - (Object) add(name, type, options = {})
-
- (Boolean) duplicate?(name, options = {})
Returns true if the given test function name has already been added to the current flow.
- - (Object) filename
- - (Object) functional(name, options = {})
-
- (TestFunctions) initialize(flow)
constructor
A new instance of TestFunctions.
Constructor Details
- (TestFunctions) initialize(flow)
Returns a new instance of TestFunctions
11 12 13 14 15 |
# File 'lib/origen/tester/v93k/generator/test_functions.rb', line 11 def initialize(flow) @flow = flow @collection = {} @ix = 0 end |
Instance Attribute Details
- (Object) collection
Origen::Tester::Generator not included since test functions 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_functions.rb', line 9 def collection @collection end |
- (Object) flow
Origen::Tester::Generator not included since test functions 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_functions.rb', line 9 def flow @flow end |
Instance Method Details
- (Object) [](name)
35 36 37 |
# File 'lib/origen/tester/v93k/generator/test_functions.rb', line 35 def [](name) @collection[name] end |
- (Object) add(name, type, options = {})
21 22 23 24 25 26 27 28 29 |
# File 'lib/origen/tester/v93k/generator/test_functions.rb', line 21 def add(name, type, = {}) check_for_duplicates(name) record_test_function(name) func = TestFunction.new(next_name, type, ) @collection[name] = func # c = Origen.interface.consume_comments # Origen.interface.descriptions.add_for_test_definition(name, c) func end |
- (Boolean) duplicate?(name, options = {})
Returns true if the given test function name has already been added to the current flow.
Pass in :global => true for all test flows to be considered.
42 43 44 45 46 47 48 49 |
# File 'lib/origen/tester/v93k/generator/test_functions.rb', line 42 def duplicate?(name, = {}) files = existing_test_functions[name] if files && !files.empty? [:global] || files.include?(filename) else false end end |
- (Object) filename
17 18 19 |
# File 'lib/origen/tester/v93k/generator/test_functions.rb', line 17 def filename flow.filename end |
- (Object) functional(name, options = {})
31 32 33 |
# File 'lib/origen/tester/v93k/generator/test_functions.rb', line 31 def functional(name, = {}) add(name, :functional, ) end |