Sha256: 064637d5b2bad61e52a1af3d79e4ed23939b7a5845b5eda25f8079b2fb43f15d

Contents?: true

Size: 1.06 KB

Versions: 104

Compression:

Stored size: 1.06 KB

Contents

require 'active_support/concern'
module OrigenTesters
  # Including this module in a class gives it all the basics required
  # to generator vector-based test patterns
  module VectorBasedTester
    extend ActiveSupport::Concern

    require 'origen_testers/vector_generator'
    require 'origen_testers/timing'
    require 'origen_testers/api'

    included do
      include VectorGenerator
      include Timing
      include API
    end

    module ClassMethods # :nodoc:
      # This overrides the new method of any class which includes this
      # module to force the newly created instance to be registered as
      # a tester with Origen
      def new(*args, &block) # :nodoc:
        if Origen.app.with_doc_tester?
          x = OrigenTesters::Doc.allocate
          if Origen.app.with_html_doc_tester?
            x.html_mode = true
          end
        else
          x = allocate
        end
        x.send(:initialize, *args, &block)
        x.register_tester
        x
      end
    end

    def register_tester # :nodoc:
      Origen.app.tester = self
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
origen_testers-0.9.5 lib/origen_testers/vector_based_tester.rb
origen_testers-0.9.4 lib/origen_testers/vector_based_tester.rb
origen_testers-0.9.3 lib/origen_testers/vector_based_tester.rb
origen_testers-0.9.2 lib/origen_testers/vector_based_tester.rb
origen_testers-0.9.1 lib/origen_testers/vector_based_tester.rb
origen_testers-0.9.0 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.13 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.11 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.8 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.7 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.6 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.5 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.4 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.3 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.2 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.1 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.0 lib/origen_testers/vector_based_tester.rb
origen_testers-0.8.0.pre1 lib/origen_testers/vector_based_tester.rb
origen_testers-0.7.13 lib/origen_testers/vector_based_tester.rb
origen_testers-0.7.12 lib/origen_testers/vector_based_tester.rb