diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-01-17 11:32:56 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-01-17 11:32:56 -0800 |
commit | cf2e4f44afbfb208c5976786c96ec963930323cc (patch) | |
tree | 7e9ddac16d51490f1428abb610afd02eda98aacf /deps/v8/test/mjsunit/delay-syntax-error.js | |
parent | 082a4b6033df22a68518c58d320e86f688db7bda (diff) | |
download | node-new-cf2e4f44afbfb208c5976786c96ec963930323cc.tar.gz |
Upgrade V8 to 3.0.8
Diffstat (limited to 'deps/v8/test/mjsunit/delay-syntax-error.js')
-rw-r--r-- | deps/v8/test/mjsunit/delay-syntax-error.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/deps/v8/test/mjsunit/delay-syntax-error.js b/deps/v8/test/mjsunit/delay-syntax-error.js index 4fcb1435c5..64cc1429bb 100644 --- a/deps/v8/test/mjsunit/delay-syntax-error.js +++ b/deps/v8/test/mjsunit/delay-syntax-error.js @@ -25,17 +25,18 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// To be compatible with KJS syntax errors for illegal return, break -// and continue should be delayed to runtime. +// To be compatible with JSC syntax errors for illegal returns should be delayed +// to runtime. +// Invalid continue and break statements are caught at compile time. -// Do not throw syntax errors for illegal return, break and continue -// at compile time. +// Do not throw syntax errors for illegal return at compile time. assertDoesNotThrow("if (false) return;"); -assertDoesNotThrow("if (false) break;"); -assertDoesNotThrow("if (false) continue;"); -// Throw syntax errors for illegal return, break and continue at -// compile time. +// Throw syntax errors for illegal break and continue at compile time. +assertThrows("if (false) break;"); +assertThrows("if (false) continue;"); + +// Throw syntax errors for illegal return, break and continue at runtime. assertThrows("return;"); assertThrows("break;"); assertThrows("continue;"); |