mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 21:13:26 +00:00
1088 lines
68 KiB
HTML
1088 lines
68 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
<title>API: yuitest YAHOO.util.ArrayAssert (YUI Library)</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
|
|
<link rel="stylesheet" type="text/css" href="assets/api.css" />
|
|
|
|
<script type="text/javascript" src="assets/api-js"></script>
|
|
<script type="text/javascript" src="assets/ac-js"></script>
|
|
</head>
|
|
|
|
<body id="yahoo-com">
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
<div id="hd">
|
|
<h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
|
|
<h3>yuitest <span class="subtitle">2.8.2r1</span></h3>
|
|
<a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a>
|
|
> <a href="./module_yuitest.html" title="yuitest">yuitest</a>
|
|
> YAHOO.util.ArrayAssert
|
|
|
|
<form onsubmit="return false">
|
|
<div id="propertysearch">
|
|
Search: <input autocomplete="off" id="searchinput" />
|
|
<div id="searchresults">
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
|
|
<fieldset>
|
|
<legend>Filters</legend>
|
|
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
|
|
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
|
|
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
|
|
</fieldset>
|
|
</form>
|
|
|
|
<h2>
|
|
|
|
|
|
<code>static</code>
|
|
|
|
Class <b property="yui:name">YAHOO.util.ArrayAssert</b>
|
|
<span class="extends">
|
|
</span>
|
|
|
|
</h2>
|
|
<!-- class tree goes here -->
|
|
|
|
|
|
|
|
|
|
<div class="summary description" property="yui:description">
|
|
The ArrayAssert object provides functions to test JavaScript array objects
|
|
for a variety of cases.
|
|
</div>
|
|
|
|
|
|
<div rel="yui:properties" resource="#properties">
|
|
|
|
</div>
|
|
|
|
<div rel="yui:methods" resource="#methods">
|
|
<div class="section method details">
|
|
<h3 id="methods">Methods</h3>
|
|
<div class="content">
|
|
<div class="" rel="yui:method" resource="#method_contains">
|
|
<h4>
|
|
<a name="method_contains">contains</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">contains</strong>
|
|
(
|
|
|
|
|
|
needle
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that a value is present in an array. This uses the triple equals
|
|
sign so no type cohersion may occur.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">needle</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> The value that is expected in the array.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_containsItems">
|
|
<h4>
|
|
<a name="method_containsItems">containsItems</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">containsItems</strong>
|
|
(
|
|
|
|
|
|
needles
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that a set of values are present in an array. This uses the triple equals
|
|
sign so no type cohersion may occur. For this assertion to pass, all values must
|
|
be found.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">needles</span>
|
|
<<span property="yui:type">Object[]</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values that are expected in the array.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values to check.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_containsMatch">
|
|
<h4>
|
|
<a name="method_containsMatch">containsMatch</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">containsMatch</strong>
|
|
(
|
|
|
|
|
|
matcher
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that a value matching some condition is present in an array. This uses
|
|
a function to determine a match.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">matcher</span>
|
|
<<span property="yui:type">Function</span>>
|
|
</code>
|
|
<span property="yui:description"> A function that returns true if the items matches or false if not.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_doesNotContain">
|
|
<h4>
|
|
<a name="method_doesNotContain">doesNotContain</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">doesNotContain</strong>
|
|
(
|
|
|
|
|
|
needle
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that a value is not present in an array. This uses the triple equals
|
|
sign so no type cohersion may occur.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">needle</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> The value that is expected in the array.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_doesNotContainItems">
|
|
<h4>
|
|
<a name="method_doesNotContainItems">doesNotContainItems</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">doesNotContainItems</strong>
|
|
(
|
|
|
|
|
|
needles
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that a set of values are not present in an array. This uses the triple equals
|
|
sign so no type cohersion may occur. For this assertion to pass, all values must
|
|
not be found.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">needles</span>
|
|
<<span property="yui:type">Object[]</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values that are not expected in the array.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values to check.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_doesNotContainMatch">
|
|
<h4>
|
|
<a name="method_doesNotContainMatch">doesNotContainMatch</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">doesNotContainMatch</strong>
|
|
(
|
|
|
|
|
|
matcher
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that no values matching a condition are present in an array. This uses
|
|
a function to determine a match.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">matcher</span>
|
|
<<span property="yui:type">Function</span>>
|
|
</code>
|
|
<span property="yui:description"> A function that returns true if the items matches or false if not.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_indexOf">
|
|
<h4>
|
|
<a name="method_indexOf">indexOf</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">indexOf</strong>
|
|
(
|
|
|
|
|
|
needle
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
index
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that the given value is contained in an array at the specified index.
|
|
This uses the triple equals sign so no type cohersion will occur.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">needle</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> The value to look for.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> The array to search in.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">index</span>
|
|
<<span property="yui:type">int</span>>
|
|
</code>
|
|
<span property="yui:description"> The index at which the value should exist.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_isEmpty">
|
|
<h4>
|
|
<a name="method_isEmpty">isEmpty</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">isEmpty</strong>
|
|
(
|
|
|
|
|
|
actual
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that an array is empty.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">actual</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> The array to test.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_isNotEmpty">
|
|
<h4>
|
|
<a name="method_isNotEmpty">isNotEmpty</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">isNotEmpty</strong>
|
|
(
|
|
|
|
|
|
actual
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that an array is not empty.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">actual</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> The array to test.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_itemsAreEqual">
|
|
<h4>
|
|
<a name="method_itemsAreEqual">itemsAreEqual</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">itemsAreEqual</strong>
|
|
(
|
|
|
|
|
|
expected
|
|
|
|
|
|
,
|
|
actual
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that the values in an array are equal, and in the same position,
|
|
as values in another array. This uses the double equals sign
|
|
so type cohersion may occur. Note that the array objects themselves
|
|
need not be the same for this test to pass.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">expected</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of the expected values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">actual</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> Any array of the actual values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_itemsAreEquivalent">
|
|
<h4>
|
|
<a name="method_itemsAreEquivalent">itemsAreEquivalent</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
Void
|
|
<strong property="yui:name">itemsAreEquivalent</strong>
|
|
(
|
|
|
|
|
|
expected
|
|
|
|
|
|
,
|
|
actual
|
|
|
|
|
|
,
|
|
comparator
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that the values in an array are equivalent, and in the same position,
|
|
as values in another array. This uses a function to determine if the values
|
|
are equivalent. Note that the array objects themselves
|
|
need not be the same for this test to pass.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">expected</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of the expected values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">actual</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> Any array of the actual values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">comparator</span>
|
|
<<span property="yui:type">Function</span>>
|
|
</code>
|
|
<span property="yui:description"> A function that returns true if the values are equivalent
|
|
or false if not.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_itemsAreSame">
|
|
<h4>
|
|
<a name="method_itemsAreSame">itemsAreSame</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">itemsAreSame</strong>
|
|
(
|
|
|
|
|
|
expected
|
|
|
|
|
|
,
|
|
actual
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that the values in an array are the same, and in the same position,
|
|
as values in another array. This uses the triple equals sign
|
|
so no type cohersion will occur. Note that the array objects themselves
|
|
need not be the same for this test to pass.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">expected</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> An array of the expected values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">actual</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> Any array of the actual values.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="" rel="yui:method" resource="#method_lastIndexOf">
|
|
<h4>
|
|
<a name="method_lastIndexOf">lastIndexOf</a></h4>
|
|
<div class="detail" >
|
|
<code>
|
|
|
|
static
|
|
|
|
void
|
|
<strong property="yui:name">lastIndexOf</strong>
|
|
(
|
|
|
|
|
|
needle
|
|
|
|
|
|
,
|
|
haystack
|
|
|
|
|
|
,
|
|
index
|
|
|
|
|
|
,
|
|
message
|
|
|
|
|
|
)
|
|
</code>
|
|
|
|
<div class="description" property="yui:description">
|
|
Asserts that the given value is contained in an array at the specified index,
|
|
starting from the back of the array.
|
|
This uses the triple equals sign so no type cohersion will occur.
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
<dl rel="yui:parameters">
|
|
<dt>Parameters:</dt>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">needle</span>
|
|
<<span property="yui:type">Object</span>>
|
|
</code>
|
|
<span property="yui:description"> The value to look for.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">haystack</span>
|
|
<<span property="yui:type">Array</span>>
|
|
</code>
|
|
<span property="yui:description"> The array to search in.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">index</span>
|
|
<<span property="yui:type">int</span>>
|
|
</code>
|
|
<span property="yui:description"> The index at which the value should exist.</span>
|
|
</dd>
|
|
<dd rel="yui:parameter">
|
|
<code><span property="yui:name">message</span>
|
|
<<span property="yui:type">String</span>>
|
|
</code>
|
|
<span property="yui:description"> (Optional) The message to display if the assertion fails.</span>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div rel="yui:events" resource="#events">
|
|
|
|
|
|
</div>
|
|
|
|
<div rel="yui:attributes" resource="#configattributes">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<div class="nav">
|
|
|
|
<div id="moduleList" class="module">
|
|
<h4>Modules</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="module_animation.html" title="animation">animation</a></li>
|
|
<li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
|
|
<li class=""><a href="module_button.html" title="button">button</a></li>
|
|
<li class=""><a href="module_calendar.html" title="calendar">calendar</a></li>
|
|
<li class=""><a href="module_carousel.html" title="carousel">carousel</a></li>
|
|
<li class=""><a href="module_charts.html" title="charts">charts</a></li>
|
|
<li class=""><a href="module_colorpicker.html" title="colorpicker">colorpicker</a></li>
|
|
<li class=""><a href="module_connection.html" title="connection">connection</a></li>
|
|
<li class=""><a href="module_container.html" title="container">container</a></li>
|
|
<li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
|
|
<li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
|
|
<li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
|
|
<li class=""><a href="module_datemath.html" title="datemath">datemath</a></li>
|
|
<li class=""><a href="module_dom.html" title="dom">dom</a></li>
|
|
<li class=""><a href="module_dragdrop.html" title="dragdrop">dragdrop</a></li>
|
|
<li class=""><a href="module_editor.html" title="editor">editor</a></li>
|
|
<li class=""><a href="module_element.html" title="element">element</a></li>
|
|
<li class=""><a href="module_element-delegate.html" title="element-delegate">element-delegate</a></li>
|
|
<li class=""><a href="module_event.html" title="event">event</a></li>
|
|
<li class=""><a href="module_event-delegate.html" title="event-delegate">event-delegate</a></li>
|
|
<li class=""><a href="module_event-mouseenter.html" title="event-mouseenter">event-mouseenter</a></li>
|
|
<li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
|
|
<li class=""><a href="module_get.html" title="get">get</a></li>
|
|
<li class=""><a href="module_history.html" title="history">history</a></li>
|
|
<li class=""><a href="module_imagecropper.html" title="imagecropper">imagecropper</a></li>
|
|
<li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
|
|
<li class=""><a href="module_json.html" title="json">json</a></li>
|
|
<li class=""><a href="module_layout.html" title="layout">layout</a></li>
|
|
<li class=""><a href="module_logger.html" title="logger">logger</a></li>
|
|
<li class=""><a href="module_menu.html" title="menu">menu</a></li>
|
|
<li class=""><a href="module_paginator.html" title="paginator">paginator</a></li>
|
|
<li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
|
|
<li class=""><a href="module_profilerviewer.html" title="profilerviewer">profilerviewer</a></li>
|
|
<li class=""><a href="module_progressbar.html" title="progressbar">progressbar</a></li>
|
|
<li class=""><a href="module_resize.html" title="resize">resize</a></li>
|
|
<li class=""><a href="module_selector.html" title="selector">selector</a></li>
|
|
<li class=""><a href="module_slider.html" title="slider">slider</a></li>
|
|
<li class=""><a href="module_storage.html" title="Storage">Storage</a></li>
|
|
<li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
|
|
<li class=""><a href="module_swf.html" title="swf">swf</a></li>
|
|
<li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
|
|
<li class=""><a href="module_swfstore.html" title="swfstore">swfstore</a></li>
|
|
<li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
|
|
<li class=""><a href="module_treeview.html" title="treeview">treeview</a></li>
|
|
<li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
|
|
<li class=""><a href="module_yahoo.html" title="yahoo">yahoo</a></li>
|
|
<li class=""><a href="module_yuiloader.html" title="yuiloader">yuiloader</a></li>
|
|
<li class="selected"><a href="module_yuitest.html" title="yuitest">yuitest</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="classList" class="module">
|
|
<h4>Classes</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="YAHOO.tool.TestCase.html" title="YAHOO.tool.TestCase">YAHOO.tool.TestCase</a></li>
|
|
<li class=""><a href="YAHOO.tool.TestCase.Wait.html" title="YAHOO.tool.TestCase.Wait">YAHOO.tool.TestCase.Wait</a></li>
|
|
<li class=""><a href="YAHOO.tool.TestLogger.html" title="YAHOO.tool.TestLogger">YAHOO.tool.TestLogger</a></li>
|
|
<li class=""><a href="YAHOO.tool.TestManager.html" title="YAHOO.tool.TestManager">YAHOO.tool.TestManager</a></li>
|
|
<li class=""><a href="YAHOO.tool.TestNode.html" title="YAHOO.tool.TestNode">YAHOO.tool.TestNode</a></li>
|
|
<li class=""><a href="YAHOO.tool.TestReporter.html" title="YAHOO.tool.TestReporter">YAHOO.tool.TestReporter</a></li>
|
|
<li class=""><a href="YAHOO.tool.TestRunner.html" title="YAHOO.tool.TestRunner">YAHOO.tool.TestRunner</a></li>
|
|
<li class=""><a href="YAHOO.tool.TestSuite.html" title="YAHOO.tool.TestSuite">YAHOO.tool.TestSuite</a></li>
|
|
<li class="selected"><a href="YAHOO.util.ArrayAssert.html" title="YAHOO.util.ArrayAssert">YAHOO.util.ArrayAssert</a></li>
|
|
<li class=""><a href="YAHOO.util.Assert.html" title="YAHOO.util.Assert">YAHOO.util.Assert</a></li>
|
|
<li class=""><a href="YAHOO.util.AssertionError.html" title="YAHOO.util.AssertionError">YAHOO.util.AssertionError</a></li>
|
|
<li class=""><a href="YAHOO.util.ComparisonFailure.html" title="YAHOO.util.ComparisonFailure">YAHOO.util.ComparisonFailure</a></li>
|
|
<li class=""><a href="YAHOO.util.DateAssert.html" title="YAHOO.util.DateAssert">YAHOO.util.DateAssert</a></li>
|
|
<li class=""><a href="YAHOO.util.ObjectAssert.html" title="YAHOO.util.ObjectAssert">YAHOO.util.ObjectAssert</a></li>
|
|
<li class=""><a href="YAHOO.util.ShouldError.html" title="YAHOO.util.ShouldError">YAHOO.util.ShouldError</a></li>
|
|
<li class=""><a href="YAHOO.util.ShouldFail.html" title="YAHOO.util.ShouldFail">YAHOO.util.ShouldFail</a></li>
|
|
<li class=""><a href="YAHOO.util.UnexpectedError.html" title="YAHOO.util.UnexpectedError">YAHOO.util.UnexpectedError</a></li>
|
|
<li class=""><a href="YAHOO.util.UnexpectedValue.html" title="YAHOO.util.UnexpectedValue">YAHOO.util.UnexpectedValue</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="fileList" class="module">
|
|
<h4>Files</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="ArrayAssert.js.html" title="ArrayAssert.js">ArrayAssert.js</a></li>
|
|
<li class=""><a href="Assert.js.html" title="Assert.js">Assert.js</a></li>
|
|
<li class=""><a href="DateAssert.js.html" title="DateAssert.js">DateAssert.js</a></li>
|
|
<li class=""><a href="ObjectAssert.js.html" title="ObjectAssert.js">ObjectAssert.js</a></li>
|
|
<li class=""><a href="TestCase.js.html" title="TestCase.js">TestCase.js</a></li>
|
|
<li class=""><a href="TestFormat.js.html" title="TestFormat.js">TestFormat.js</a></li>
|
|
<li class=""><a href="TestLogger.js.html" title="TestLogger.js">TestLogger.js</a></li>
|
|
<li class=""><a href="TestManager.js.html" title="TestManager.js">TestManager.js</a></li>
|
|
<li class=""><a href="TestReporter.js.html" title="TestReporter.js">TestReporter.js</a></li>
|
|
<li class=""><a href="TestRunner.js.html" title="TestRunner.js">TestRunner.js</a></li>
|
|
<li class=""><a href="TestSuite.js.html" title="TestSuite.js">TestSuite.js</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div id="methodsList" class="module">
|
|
<h4>Methods</h4>
|
|
<ul class="content">
|
|
<li class=""><a href="#method_contains" title="contains">contains</a></li>
|
|
<li class=""><a href="#method_containsItems" title="containsItems">containsItems</a></li>
|
|
<li class=""><a href="#method_containsMatch" title="containsMatch">containsMatch</a></li>
|
|
<li class=""><a href="#method_doesNotContain" title="doesNotContain">doesNotContain</a></li>
|
|
<li class=""><a href="#method_doesNotContainItems" title="doesNotContainItems">doesNotContainItems</a></li>
|
|
<li class=""><a href="#method_doesNotContainMatch" title="doesNotContainMatch">doesNotContainMatch</a></li>
|
|
<li class=""><a href="#method_indexOf" title="indexOf">indexOf</a></li>
|
|
<li class=""><a href="#method_isEmpty" title="isEmpty">isEmpty</a></li>
|
|
<li class=""><a href="#method_isNotEmpty" title="isNotEmpty">isNotEmpty</a></li>
|
|
<li class=""><a href="#method_itemsAreEqual" title="itemsAreEqual">itemsAreEqual</a></li>
|
|
<li class=""><a href="#method_itemsAreEquivalent" title="itemsAreEquivalent">itemsAreEquivalent</a></li>
|
|
<li class=""><a href="#method_itemsAreSame" title="itemsAreSame">itemsAreSame</a></li>
|
|
<li class=""><a href="#method_lastIndexOf" title="lastIndexOf">lastIndexOf</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="ft">
|
|
<hr />
|
|
Copyright © 2010 Yahoo! Inc. All rights reserved.
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
var ALL_YUI_PROPS = [{"access": "", "host": "YAHOO.util.ArrayAssert", "name": "contains", "url": "YAHOO.util.ArrayAssert.html#method_contains", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "containsItems", "url": "YAHOO.util.ArrayAssert.html#method_containsItems", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "containsMatch", "url": "YAHOO.util.ArrayAssert.html#method_containsMatch", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "doesNotContain", "url": "YAHOO.util.ArrayAssert.html#method_doesNotContain", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "doesNotContainItems", "url": "YAHOO.util.ArrayAssert.html#method_doesNotContainItems", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "doesNotContainMatch", "url": "YAHOO.util.ArrayAssert.html#method_doesNotContainMatch", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "indexOf", "url": "YAHOO.util.ArrayAssert.html#method_indexOf", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "isEmpty", "url": "YAHOO.util.ArrayAssert.html#method_isEmpty", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "isNotEmpty", "url": "YAHOO.util.ArrayAssert.html#method_isNotEmpty", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "itemsAreEqual", "url": "YAHOO.util.ArrayAssert.html#method_itemsAreEqual", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "itemsAreEquivalent", "url": "YAHOO.util.ArrayAssert.html#method_itemsAreEquivalent", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "itemsAreSame", "url": "YAHOO.util.ArrayAssert.html#method_itemsAreSame", "type": "method"}, {"access": "", "host": "YAHOO.util.ArrayAssert", "name": "lastIndexOf", "url": "YAHOO.util.ArrayAssert.html#method_lastIndexOf", "type": "method"}];
|
|
</script>
|
|
</body>
|
|
</html>
|