| Index: test/mjsunit/regress/regress-892742.js
|
| ===================================================================
|
| --- test/mjsunit/regress/regress-892742.js (revision 8618)
|
| +++ test/mjsunit/regress/regress-892742.js (working copy)
|
| @@ -26,25 +26,23 @@
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| function f() {
|
| - return/* useless*/1;
|
| + return/* Counts as non-line-terminating whitespace */1;
|
| };
|
|
|
| -
|
| -// According to ECMA-262, this comment should actually be parsed as a
|
| -// line terminator making g() return undefined, but this is not the
|
| -// way it's handled by Spidermonkey or KJS.
|
| +// According to ECMA-262, this comment should be parsed as a
|
| +// line terminator making g() return undefined.
|
| function g() {
|
| - return/* useless
|
| - */2;
|
| + return/* Counts as line-terminator whitespace.
|
| + */2;
|
| };
|
|
|
| function h() {
|
| - return// meaningful
|
| + return// Comment doesn't include line-terminator at end.
|
| 3;
|
| };
|
|
|
|
|
| assertEquals(1, f());
|
| -assertEquals(2, g());
|
| -assertTrue(typeof h() == 'undefined', 'h');
|
| +assertEquals(undefined, g());
|
| +assertEquals(undefined, h());
|
|
|
|
|