An optional cause, the Throwable
that caused this StackDepth
exception to be thrown
An optional cause, the Throwable
that caused this StackDepth
exception to be thrown.
This method is used to compare the receiver object (this
)
with the argument object (arg0
) for equivalence
This method is used to compare the receiver object (this
)
with the argument object (arg0
) for equivalence.
The default implementations of this method is an equivalence relation:
x
of type Any
,
x.equals(x)
should return true
.x
and y
of type
Any
, x.equals(y)
should return true
if and only
if y.equals(x)
returns true
.x
, y
, and z
of type AnyRef
if x.equals(y)
returns true
and
y.equals(z)
returns
true
, then x.equals(z)
should return true
.
If you override this method, you should verify that
your implementation remains an equivalence relation.
Additionally, when overriding this method it is often necessary to
override hashCode
to ensure that objects that are
"equal" (o1.equals(o2)
returns true
)
hash to the same Int
(o1.hashCode.equals(o2.hashCode)
).
the object to compare against this object for equality.
true
if the receiver object is equivalent to the argument; false
otherwise.
A string that provides the filename and line number of the line of code that failed, suitable
for presenting to a user, which is taken from this exception's StackTraceElement
at the depth specified
by failedCodeStackDepth
A string that provides the filename and line number of the line of code that failed, suitable
for presenting to a user, which is taken from this exception's StackTraceElement
at the depth specified
by failedCodeStackDepth
.
The depth in the stack trace of this exception at which the line of test code that failed resides
The depth in the stack trace of this exception at which the line of test code that failed resides.
failedTestCodeFileNameAndLineNumberString
has been deprecated and will be removed in a future version of
ScalaTest
failedTestCodeFileNameAndLineNumberString
has been deprecated and will be removed in a future version of
ScalaTest. Please call failedCodeFileNameAndLineNumberString
instead.
failedTestCodeStackDepth
has been deprecated and will be removed in a future version of
ScalaTest
failedTestCodeStackDepth
has been deprecated and will be removed in a future version of
ScalaTest. Please call failedCodeStackDepth
instead.
Returns a hash code value for the object
Returns a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash
codes (o1.hashCode.equals(o2.hashCode)
) yet not be
equal (o1.equals(o2)
returns false
). A
degenerate implementation could always return 0
.
However, it is required that if two objects are equal
(o1.equals(o2)
returns true
) that they
have identical hash codes
(o1.hashCode.equals(o2.hashCode)
). Therefore, when
overriding this method, be sure to verify that the behavior is
consistent with the equals
method.
An optional detail message for this StackDepth
exception
An optional detail message for this StackDepth
exception.
Returns a string representation of the object
Returns a string representation of the object.
The default representation is platform dependent.
Create a TestFailedException
with the specified stack depth, detail
message, and cause
Create a TestFailedException
with the specified stack depth, detail
message, and cause.
Note that the detail message associated with cause is not automatically incorporated in this throwable's detail message.
A detail message for this TestFailedException
.
the cause, the Throwable
that caused this TestFailedException
to be thrown.
the depth in the stack trace of this exception at which the line of test code that failed resides.
Create a TestFailedException
with the specified stack depth and cause
Create a TestFailedException
with the specified stack depth and cause. The
message
field of this exception object will be initialized to
if (cause.getMessage == null) "" else cause.getMessage
.
the cause, the Throwable
that caused this TestFailedException
to be thrown.
the depth in the stack trace of this exception at which the line of test code that failed resides.
Create a TestFailedException
with a specified stack depth and detail message
Create a TestFailedException
with a specified stack depth and detail message.
A detail message for this TestFailedException
.
the depth in the stack trace of this exception at which the line of test code that failed resides.
Create a TestFailedException
with specified stack depth and no detail message or cause
Create a TestFailedException
with specified stack depth and no detail message or cause.
the depth in the stack trace of this exception at which the line of test code that failed resides.
Exception that indicates a test failed. The purpose of this exception is to encapsulate information about the stack depth at which the line of test code that failed resides, so that information can be presented to the user that makes it quick to find the failing line of test code. (In other words, the user need not scan through the stack trace to find the correct filename and line number of the failing test.)