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 ) ⇒ booleanTells whether the array contains the given element.
boolean| Parameters |
|---|
|
| Returns |
|
code »goog.testing.asserts.findDifferences ( expected, actual, opt_equalityPredicate ) ⇒ ?stringDetermines 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 ) ⇒ numberFinds 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 ) ⇒ booleanCompares equality of two numbers, allowing them to differ up to a given
tolerance.
booleancode »goog.testing.asserts.raiseException ( comment, opt_message )Raises a JsUnit exception with the given comment.
code »goog.testing.asserts.toArray_ ( arrayLike ) ⇒ !ArrayConverts an array like object to array or clones it if it's already array.
!Array| Parameters |
|---|
|
| Returns |
|