blob: 2561c7affc0e50cdb8c183f1953d8cebdc47488b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/licenses/publicdomain/
* Contributor:
* Jeff Walden <jwalden+code@mit.edu>
*/
//-----------------------------------------------------------------------------
var BUGNUMBER = 518663;
var summary = 'Object.getOwnPropertyNames: regular expression objects';
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var actual = Object.getOwnPropertyNames(/a/);
var expected = ["lastIndex"];
for (var i = 0; i < expected.length; i++)
{
reportCompare(actual.indexOf(expected[i]) >= 0, true,
expected[i] + " should be a property name on a RegExp");
}
/******************************************************************************/
reportCompare(true, true);
print("All tests passed!");
|