$42 GRAYBYTE WORDPRESS FILE MANAGER $43

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//failure.rb
#--
#
# Author:: Nathaniel Talbott.
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.

module Test
  module Unit

    # Encapsulates a test failure. Created by Test::Unit::TestCase
    # when an assertion fails.
    class Failure
      attr_reader :test_name, :location, :message
      
      SINGLE_CHARACTER = 'F'

      # Creates a new Failure with the given location and
      # message.
      def initialize(test_name, location, message)
        @test_name = test_name
        @location = location
        @message = message
      end
      
      # Returns a single character representation of a failure.
      def single_character_display
        SINGLE_CHARACTER
      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
        location_display = if(location.size == 1)
          location[0].sub(/\A(.+:\d+).*/, ' [\\1]')
        else
          "\n    [#{location.join("\n     ")}]"
        end
        "Failure:\n#@test_name#{location_display}:\n#@message"
      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