Sha256: a0a395f23c069d3fc49faf297aad8de30d72a0473bb2363efebc73adf89af31c

Contents?: true

Size: 699 Bytes

Versions: 10

Compression:

Stored size: 699 Bytes

Contents

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

require File.expand_path('../test_helper', __FILE__)
require 'fileutils'
require 'tmpdir'
require_relative 'prime'

# --  Tests ----
class PrinterCallStackTest < TestCase
  def setup
    # WALL_TIME so we can use sleep in our test and get same measurements on linux and windows
    RubyProf::measure_mode = RubyProf::WALL_TIME
    @result = RubyProf.profile do
      run_primes(1000, 5000)
    end
  end

  def test_graph_html_string
    output = ''
    printer = RubyProf::CallStackPrinter.new(@result)
    printer.print(output)

    assert_match(/<!DOCTYPE html>/i, output)
    assert_match(/Object#run_primes/i, output)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-prof-1.5.0-x64-mingw-ucrt test/printer_call_stack_test.rb
ruby-prof-1.5.0 test/printer_call_stack_test.rb
ruby-prof-1.4.5-x64-mingw-ucrt test/printer_call_stack_test.rb
ruby-prof-1.4.5 test/printer_call_stack_test.rb
ruby-prof-1.4.4-x64-mingw-ucrt test/printer_call_stack_test.rb
ruby-prof-1.4.4 test/printer_call_stack_test.rb
ruby-prof-1.4.3-x64-mingw32 test/printer_call_stack_test.rb
ruby-prof-1.4.3 test/printer_call_stack_test.rb
ruby-prof-1.4.2-x64-mingw32 test/printer_call_stack_test.rb
ruby-prof-1.4.2 test/printer_call_stack_test.rb