~ubuntu-branches/ubuntu/trusty/libv8/trusty

« back to all changes in this revision

Viewing changes to test/mjsunit/regress/regress-1213575.js

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-02-20 14:08:17 UTC
  • mfrom: (15.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120220140817-bsvmeoa4sxsj5hbz
Tags: 3.7.12.22-3
Fix mipsel build, allow test debug-step-3 to fail (non-crucial)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
26
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
27
 
28
 
// Make sure that a const definition always
29
 
// conflicts with a defined setter. This avoid
30
 
// trying to pass 'the hole' to the setter.
 
28
// Make sure that a const definition does not try
 
29
// to pass 'the hole' to a defined setter.
31
30
 
32
 
this.__defineSetter__('x', function(value) { assertTrue(false); });
 
31
this.__defineSetter__('x', function(value) { assertTrue(value === 1); });
33
32
 
34
33
var caught = false;
35
34
try {
36
 
  eval('const x');
 
35
  eval('const x = 1');
37
36
} catch(e) {
38
37
  assertTrue(e instanceof TypeError);
39
38
  caught = true;
40
39
}
41
 
assertTrue(caught);
 
40
assertFalse(caught);