Normalize coverage

Promote consistency in coverage by adding new tests that correspond to
those that were authored previously.
This commit is contained in:
Mike Pennisi 2018-06-10 19:07:05 -04:00 committed by Rick Waldron
parent 0a5b378cff
commit 0618779cb8
2 changed files with 45 additions and 0 deletions

View File

@ -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();
});

View File

@ -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";
});