Sha256: 7b9c1b05e3c773709fd66f3e76b09e2f19d11286ebc15e7ddbee29ad9b63c727

Contents?: true

Size: 617 Bytes

Versions: 23

Compression:

Stored size: 617 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

require File.expand_path('../test_helper', __FILE__)

class MeasureAllocationsTest < Test::Unit::TestCase
  def test_allocations_mode
    RubyProf::measure_mode = RubyProf::ALLOCATIONS
    assert_equal(RubyProf::ALLOCATIONS, RubyProf::measure_mode)
  end

  def test_allocations_enabled_defined
    assert(defined?(RubyProf::ALLOCATIONS_ENABLED))
  end

  if RubyProf::ALLOCATIONS_ENABLED
    def test_allocations
      t = RubyProf.measure_allocations
      assert_kind_of Integer, t

      u = RubyProf.measure_allocations
      assert u > t, [t, u].inspect
    end
  end
end

Version data entries

23 entries across 21 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/ruby-prof-0.15.1/test/measure_allocations_test.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/ruby-prof-0.15.1/test/measure_allocations_test.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/ruby-prof-0.15.1/test/measure_allocations_test.rb
ruby-prof-0.15.2 test/measure_allocations_test.rb
ruby-prof-0.15.1 test/measure_allocations_test.rb
ruby-prof-0.15.0 test/measure_allocations_test.rb
ruby-prof-0.14.2 test/measure_allocations_test.rb
ruby-prof-0.14.1 test/measure_allocations_test.rb
ruby-prof-0.14.0 test/measure_allocations_test.rb
ruby-prof-0.13.1 test/measure_allocations_test.rb
ruby-prof-0.13.0 test/measure_allocations_test.rb
ruby-prof-0.12.2 test/measure_allocations_test.rb
ruby-prof-0.12.1-x86-mingw32 test/measure_allocations_test.rb
ruby-prof-0.12.1 test/measure_allocations_test.rb
ruby-prof-0.11.3 test/measure_allocations_test.rb
ruby-prof-0.11.2-x86-mingw32 test/measure_allocations_test.rb
ruby-prof-0.11.2 test/measure_allocations_test.rb
ruby-prof-0.11.0.rc3-x86-mingw32 test/measure_allocations_test.rb
ruby-prof-0.11.0.rc3 test/measure_allocations_test.rb
ruby-prof-0.11.0.rc2-x86-mingw32 test/measure_allocations_test.rb