Sha256: e63ad098644ae2810355e8955a5fa5c5dad7b8b891527444768979bcd7707eea
Contents?: true
Size: 418 Bytes
Versions: 3
Compression:
Stored size: 418 Bytes
Contents
require 'test_helper' class TestReporter < Minitest::Test def allocate_strings(n) n.times do "" end end def test_counts a = nil result = MemoryProfiler::Reporter.report do allocate_strings(10) a = "hello" end assert_equal(11, result.total_allocated) assert_equal(1, result.total_retained) assert_equal(1, result.retained_objects_by_location.length) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
memory_profiler-0.0.3 | test/test_reporter.rb |
memory_profiler-0.0.2 | test/test_reporter.rb |
memory_profiler-0.0.1 | test/test_reporter.rb |