Sha256: c7b1e1b45285e0c688fa56c4eba18ce59d20987c2d2df4ab68c4712e13dc9897

Contents?: true

Size: 644 Bytes

Versions: 260

Compression:

Stored size: 644 Bytes

Contents

# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.

require 'test/unit'

module Test
  module Unit
    class TC_Error < TestCase
      TF_Exception = Struct.new('TF_Exception', :message, :backtrace)
      def test_display
        ex = TF_Exception.new("message1\nmessage2", ['line1', 'line2'])
        e = Error.new("name", ex)
        assert_equal("name: #{TF_Exception.name}: message1", e.short_display)
        assert_equal(<<EOM.strip, e.long_display)
Error:
name:
Struct::TF_Exception: message1
message2
    line1
    line2
EOM
      end
    end
  end
end

Version data entries

260 entries across 214 versions & 22 rubygems

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/test-unit-3.4.0/test/test-error.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/test-unit-3.4.0/test/test-error.rb
win32-api-1.10.1 vendor/bundle/ruby/3.0.0/gems/test-unit-3.4.1/test/test-error.rb
win32-api-1.10.1 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-error.rb
win32-api-1.10.1 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-error.rb
win32-api-1.10.1 vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-error.rb
test-unit-3.4.1 test/test-error.rb
win32-api-1.10.0 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.4/test/test-error.rb
win32-api-1.10.0 vendor/bundle/ruby/2.5.0/gems/test-unit-3.3.5/test/test-error.rb
win32-api-1.10.0 vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.5/test/test-error.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/test-unit-3.4.0/test/test-error.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.7/test/test-error.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/test-unit-3.3.8/test/test-error.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/test-unit-3.3.7/test/test-error.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/test-unit-3.4.0/test/test-error.rb
test-unit-3.4.0 test/test-error.rb
test-unit-3.3.9 test/test-error.rb
test-unit-3.3.8 test/test-error.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/test-unit-3.3.7/test/test-error.rb
test-unit-3.3.7 test/test-error.rb