mirror of https://github.com/tc39/test262.git
Normalize coverage
Promote consistency in coverage by adding new tests that correspond to those that were authored previously.
This commit is contained in:
parent
0a5b378cff
commit
0618779cb8
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: use-strict-directive
|
||||
es5id: 10.1.1-2-s
|
||||
description: >
|
||||
Strict Mode - Use Strict Directive Prologue is ''use strict''
|
||||
which lost the last character ';'
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
function fun() {
|
||||
"use strict"
|
||||
eval("var public = 1;");
|
||||
}
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
fun();
|
||||
});
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (c) 2012 Ecma International. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: use-strict-directive
|
||||
es5id: 10.1.1-25-s
|
||||
description: >
|
||||
Strict Mode - Function code of Accessor PropertyAssignment
|
||||
contains Use Strict Directive which appears at the start of the
|
||||
block(getter)
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, "accProperty", {
|
||||
set: function () {
|
||||
"use strict";
|
||||
eval("var public = 1;");
|
||||
return 11;
|
||||
}
|
||||
});
|
||||
obj.accProperty = "overrideData";
|
||||
});
|
Loading…
Reference in New Issue