Namespace goog.testing.asserts
code »Type Definitions
Global Functions
Runs a function in an environment where test failures are not logged. This is
useful for testing test code, where failures can be a normal part of a test.
Parameters |
---|
|
code »goog.testing.asserts.contains_ ( container, contained ) ⇒ boolean
Tells whether the array contains the given element.
boolean
Parameters |
---|
|
Returns |
|
code »goog.testing.asserts.findDifferences ( expected, actual, opt_equalityPredicate ) ⇒ ?string
Determines if two items of any type match, and formulates an error message
if not.
?string
Parameters |
---|
|
Returns |
|
code »goog.testing.asserts.getDefaultErrorMsg_ ( expected, actual ) ⇒ string
string
Parameters |
---|
|
Returns |
|
code »goog.testing.asserts.indexOf_ ( container, contained ) ⇒ number
Finds the position of the first occurrence of an element in a container.
number
Parameters |
---|
|
Returns |
|
Helper function for assertObjectEquals.
Parameters |
---|
|
Returns |
|
code »goog.testing.asserts.numberRoughEqualityPredicate_ ( var1, var2, tolerance ) ⇒ boolean
Compares equality of two numbers, allowing them to differ up to a given
tolerance.
boolean
code »goog.testing.asserts.raiseException ( comment, opt_message )Raises a JsUnit exception with the given comment.
code »goog.testing.asserts.toArray_ ( arrayLike ) ⇒ !Array
Converts an array like object to array or clones it if it's already array.
!Array
Parameters |
---|
|
Returns |
|