Sha256: 36cbddad45d5ad9e9f7de54b75026f19f85c4d93247efb8d2c007f2f46a1a299

Contents?: true

Size: 377 Bytes

Versions: 34

Compression:

Stored size: 377 Bytes

Contents

#!/usr/bin/env ruby
require "test/unit"
require "tri2.rb"
require "rubygems"
require "ruby-debug"
Debugger.start

class TestTri < Test::Unit::TestCase
  def test_basic
    debugger
    solutions = []
    0.upto(5) do |i|
      solutions << triangle(i)
    end
    assert_equal([0, 1, 3, 6, 10, 15], solutions,
                 "Testing the first 5 triangle numbers")
  end
end

Version data entries

34 entries across 34 versions & 5 rubygems

Version Path
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/debugger-1.6.8/doc/test-tri2.rb
debugger-1.6.8 doc/test-tri2.rb
debugger-1.6.7 doc/test-tri2.rb
debugger-1.6.6 doc/test-tri2.rb
debugger-1.6.5 doc/test-tri2.rb
debugger-1.6.4 doc/test-tri2.rb
debugger-1.6.3 doc/test-tri2.rb
debugger-1.6.2 doc/test-tri2.rb
candlepin-api-0.4.0 bundle/ruby/gems/debugger-1.6.1/doc/test-tri2.rb
debugger-1.6.1 doc/test-tri2.rb
debugger-1.6.0 doc/test-tri2.rb
debugger2-1.0.0.beta2 doc/test-tri2.rb
debugger2-1.0.0.beta1 doc/test-tri2.rb
debugger-1.5.0 doc/test-tri2.rb
needy_debugger-1.4.0 doc/test-tri2.rb
debugger-1.4.0 doc/test-tri2.rb
debugger-1.3.3 doc/test-tri2.rb
debugger-1.3.2 doc/test-tri2.rb
debugger-1.3.1 doc/test-tri2.rb
debugger-1.3.0 doc/test-tri2.rb