~ubuntu-branches/ubuntu/saucy/mozjs17/saucy

« back to all changes in this revision

Viewing changes to js/src/tests/ecma_5/strict/15.3.5.1.js

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2013-05-25 12:24:23 UTC
  • Revision ID: package-import@ubuntu.com-20130525122423-zmxucrhtensw90xy
Tags: upstream-17.0.0
ImportĀ upstreamĀ versionĀ 17.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 
2
 
 
3
/*
 
4
 * Any copyright is dedicated to the Public Domain.
 
5
 * http://creativecommons.org/licenses/publicdomain/
 
6
 */
 
7
 
 
8
function fn() {
 
9
  return function(a, b, c) { };
 
10
}
 
11
 
 
12
assertEq(testLenientAndStrict('var f = fn(); f.length = 1; f.length',
 
13
                              returns(3), raisesException(TypeError)),
 
14
         true);
 
15
assertEq(testLenientAndStrict('var f = fn(); delete f.length',
 
16
                              returns(false), raisesException(TypeError)),
 
17
         true);
 
18
 
 
19
reportCompare(true, true);