![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
Compares two arrays ignoring negative indexes and extra properties on the
array objects. Use case: Internet Explorer adds the index, lastIndex and
input enumerable fields to the result of string.match(/regexp/g), which makes
assertObjectEquals fail.
Arguments:
|
code » | |||||
![]()
Compares two CSS property values to make sure that they represent the same
things. This will normalize values in the browser. For example, in Firefox,
this assertion will consider "rgb(0, 0, 255)" and "#0000ff" to be identical
values for the "color" property. This function won't normalize everything --
for example, in most browsers, "blue" will not match "#0000ff". It is
intended only to compensate for unexpected normalizations performed by
the browser that should also affect your expected value.
|
code » | |||||
![]()
Checks if the given element is the member of the given container.
Arguments:
|
code » | |||||
![]()
Compares two objects that can be accessed like an array and assert that
each element is equal.
|
code » | |||||
![]()
Compares two objects that can be accessed like an array and assert that
each element is roughly equal.
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
Compares two HTML snippets.
Take extra care if attributes are involved.
assertHTMLEquals 's
implementation isn't prepared for complex cases. For example, the following
comparisons erroneously fail:
assertHTMLEquals('', ''); assertHTMLEquals('When in doubt, use goog.testing.dom.assertHtmlMatches .
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
Checks if the given element is not the member of the given container.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
Asserts that the function does not throw an error.
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
Notes:
Object equality has some nasty browser quirks, and this implementation is
not 100% correct. For example,
var a = [0, 1, 2];
var b = [0, 1, 2];
delete a[1];
b[1] = undefined;
assertObjectEquals(a, b); // should fail, but currently passes
See asserts_test.html for more interesting edge cases.
The first comparison object provided is the expected value, the second is
the actual.
Arguments:
|
code » | |||||
![]()
Compares two arbitrary objects for non-equalness.
All the same caveats as for assertObjectEquals apply here:
Undefined values may be confused for missing values, or vice versa.
Arguments:
|
code » | |||||
![]()
Similar to assertObjectEquals above, but accepts a tolerance margin.
Arguments:
|
code » | |||||
![]()
Checks if the given string matches the given regular expression.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
Compares two array-like objects without taking their order into account.
Arguments:
|
code » | |||||
![]()
Asserts that the function throws an error.
|
code » | |||||
![]()
Asserts that the given callback function results in a JsUnitException when
called, and that the resulting failure message matches the given expected
message.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
![]()
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.
Arguments:
|
code » | |||||
![]()
No description.
|
code » | |||||
Tells whether the array contains the given element.
Arguments:
Returns: boolean
Whether the element is in the array.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
|
code » | |||||
Determines if two items of any type match, and formulates an error message
if not.
Arguments:
Returns: ?string
Null on success, error message on failure.
|
code » | |||||
No description.
Arguments:
Returns: string
A failure message of the values don't match.
|
code » | |||||
Finds the position of the first occurrence of an element in a container.
Arguments:
Returns: number
Index of the first occurrence or -1 if not found.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
No description.
Arguments:
|
code » | |||||
Helper function for assertObjectEquals.
|
code » | |||||
![]()
No description.
|
code » | |||||
Compares equality of two numbers, allowing them to differ up to a given
tolerance.
|
code » | |||||
![]()
No description.
|
code » | |||||
![]()
Raises a JsUnit exception with the given comment.
Arguments:
|
code » | |||||
Standardizes a CSS value for a given property by applying it to an element
and then reading it back.
|
code » | |||||
![]()
No description.
|
code » | |||||
Converts an array like object to array or clones it if it's already array.
Arguments:
Returns: !Array
Copy of the collection as array.
|
code » | |||||
![]()
No description.
|
code » |