Source code
Revision control
Copy as Markdown
Other Tools
/*
* Any copyright is dedicated to the Public Domain.
* 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!");