From 2fc190da132535292725046ea60e712fb8312d46 Mon Sep 17 00:00:00 2001 From: "rogerl%netscape.com" Date: Mon, 11 Oct 1999 22:38:40 +0000 Subject: [PATCH] NOT A PART OF SEAMONKEY BUILD - removed redundant test & fixed test for 'super' to detect syntax error git-svn-id: svn://10.0.0.236/trunk@50366 18797224-902f-48f8-a5cc-f745e15eee43 --- .../ecma_2/LexicalConventions/keywords-001.js | 12 ++++++-- .../ecma_2/LexicalConventions/keywords-002.js | 28 ------------------- 2 files changed, 9 insertions(+), 31 deletions(-) delete mode 100644 mozilla/js/tests/ecma_2/LexicalConventions/keywords-002.js diff --git a/mozilla/js/tests/ecma_2/LexicalConventions/keywords-001.js b/mozilla/js/tests/ecma_2/LexicalConventions/keywords-001.js index 88c0b8b1370..50ba20959d3 100644 --- a/mozilla/js/tests/ecma_2/LexicalConventions/keywords-001.js +++ b/mozilla/js/tests/ecma_2/LexicalConventions/keywords-001.js @@ -16,13 +16,19 @@ // Regular Expression Literals may not be empty; // should be regarded // as a comment, not a RegExp literal. - var result = "passed"; + var result = "failed"; - super; + try { + eval("super;"); + } + catch (x) { + if (x instanceof SyntaxError) + result = x.toString(); + } AddTestCase( "using the expression \"super\" shouldn't cause js to crash", - "passed" , + "SyntaxError: super is a reserved identifier" , result ); test(); diff --git a/mozilla/js/tests/ecma_2/LexicalConventions/keywords-002.js b/mozilla/js/tests/ecma_2/LexicalConventions/keywords-002.js deleted file mode 100644 index 88c0b8b1370..00000000000 --- a/mozilla/js/tests/ecma_2/LexicalConventions/keywords-002.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * File Name: - * ECMA Section: - * Description: - * - * - * Author: christine@netscape.com - * Date: 11 August 1998 - */ - var SECTION = ""; - var VERSION = "ECMA_2"; - var TITLE = "Keywords"; - - startTest(); - - // Regular Expression Literals may not be empty; // should be regarded - // as a comment, not a RegExp literal. - - var result = "passed"; - - super; - - AddTestCase( - "using the expression \"super\" shouldn't cause js to crash", - "passed" , - result ); - - test();