$55 GRAYBYTE WORDPRESS FILE MANAGER $33

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby18/lib64/ruby/1.8/test/unit/

HOME
Current File : /opt/alt/ruby18/lib64/ruby/1.8/test/unit//error.rb
#--
#
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.

require 'test/unit/util/backtracefilter'

module Test
  module Unit

    # Encapsulates an error in a test. Created by
    # Test::Unit::TestCase when it rescues an exception thrown
    # during the processing of a test.
    class Error
      include Util::BacktraceFilter

      attr_reader(:test_name, :exception)

      SINGLE_CHARACTER = 'E'

      # Creates a new Error with the given test_name and
      # exception.
      def initialize(test_name, exception)
        @test_name = test_name
        @exception = exception
      end

      # Returns a single character representation of an error.
      def single_character_display
        SINGLE_CHARACTER
      end

      # Returns the message associated with the error.
      def message
        "#{@exception.class.name}: #{@exception.message}"
      end

      # Returns a brief version of the error description.
      def short_display
        "#@test_name: #{message.split("\n")[0]}"
      end

      # Returns a verbose version of the error description.
      def long_display
        backtrace = filter_backtrace(@exception.backtrace).join("\n    ")
        "Error:\n#@test_name:\n#{message}\n    #{backtrace}"
      end

      # Overridden to return long_display.
      def to_s
        long_display
      end
    end
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.48 PM
root / linksafe
0755
collector
--
3 Mar 2024 10.48 PM
root / linksafe
0755
ui
--
3 Mar 2024 10.48 PM
root / linksafe
0755
util
--
3 Mar 2024 10.48 PM
root / linksafe
0755
assertionfailederror.rb
0.29 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
assertions.rb
17.8 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
autorunner.rb
6.584 KB
25 Feb 2007 2.08 PM
root / linksafe
0644
collector.rb
0.853 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
error.rb
1.4 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
failure.rb
1.287 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
testcase.rb
4.442 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
testresult.rb
2.029 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
testsuite.rb
1.911 KB
12 Feb 2007 11.01 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF