Sha256: eb63840516ca9b6230ecaa621803ef087d31b41232e9358044b312c2691c4f00

Contents?: true

Size: 688 Bytes

Versions: 3

Compression:

Stored size: 688 Bytes

Contents

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

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

class MeasureAllocationsTest < 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
      refute_empty("a" + "b")
      u = RubyProf.measure_allocations
      assert_kind_of Integer, t
      assert_kind_of Integer, u
      assert_operator t, :<, u
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/ruby-prof-0.18.0/test/measure_allocations_test.rb
ruby-prof-0.18.0-x64-mingw32 test/measure_allocations_test.rb
ruby-prof-0.18.0 test/measure_allocations_test.rb