mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fixing tests of internal test suite.
This commit is contained in:
parent
e33e6a77cb
commit
7c488ea11a
@ -16,4 +16,4 @@ f_arg = function () {
|
||||
return arguments;
|
||||
}
|
||||
|
||||
assert(f_arg(1, 2, 3)[3] !== undefined);
|
||||
assert(f_arg(1, 2, 3)[3] === undefined);
|
||||
|
||||
@ -16,4 +16,11 @@ f_arg = function () {
|
||||
return arguments;
|
||||
}
|
||||
|
||||
assert(f_arg(1, 2, 3)[3] !== undefined);
|
||||
var args = f_arg (1, 2, 3);
|
||||
|
||||
for (var i = 0; i < 3; i++)
|
||||
{
|
||||
assert(args[i] === i + 1);
|
||||
}
|
||||
|
||||
assert(args[3] === undefined);
|
||||
|
||||
@ -16,4 +16,4 @@ function foo(param1) {
|
||||
return delete arguments; //arguments is non-configurable
|
||||
}
|
||||
|
||||
assert(foo("param"));
|
||||
assert(!foo("param"));
|
||||
|
||||
@ -30,4 +30,4 @@ for (prop in Object)
|
||||
if (delete Object.prototype)
|
||||
configurable = true;
|
||||
|
||||
assert(writable || enumerable || configurable);
|
||||
assert(!writable && !enumerable && !configurable);
|
||||
|
||||
@ -26,4 +26,4 @@ var object2 = {
|
||||
|
||||
Object.freeze(object1);
|
||||
|
||||
assert(Object.isExtensible(object1) && !Object.isExtensible(object2));
|
||||
assert(!Object.isExtensible(object1) && Object.isExtensible(object2));
|
||||
|
||||
@ -13,9 +13,18 @@
|
||||
// limitations under the License.
|
||||
|
||||
var a = new String("qwe");
|
||||
|
||||
names = Object.getOwnPropertyNames(a);
|
||||
assert(names instanceof Array &&
|
||||
names[0] === "0" &&
|
||||
names[1] === "1" &&
|
||||
names[2] === "2" &&
|
||||
names[3] === "length");
|
||||
|
||||
assert(names instanceof Array);
|
||||
|
||||
var is_0 = false, is_1 = false, is_2 = false, is_length = false;
|
||||
for (var i = 0; i <= 3; i++)
|
||||
{
|
||||
if (names[i] === "0") { is_0 = true; }
|
||||
if (names[i] === "1") { is_1 = true; }
|
||||
if (names[i] === "2") { is_2 = true; }
|
||||
if (names[i] === "length") { is_length = true; }
|
||||
}
|
||||
|
||||
assert (is_0 && is_1 && is_2 && is_length);
|
||||
|
||||
@ -23,4 +23,5 @@ veryUsefulObject.method = function () {
|
||||
return "asdf";
|
||||
}
|
||||
|
||||
assert(veryUsefulObject.property && veryUsefulObject.method());
|
||||
assert(veryUsefulObject.property === undefined);
|
||||
assert(veryUsefulObject.method === undefined);
|
||||
|
||||
@ -49,4 +49,4 @@ for (p in emptyObject) {
|
||||
if (delete emptyObject.myProperty)
|
||||
isConfigurable = true;
|
||||
|
||||
assert(isWritable || isEnumerable || isConfigurable);
|
||||
assert(!isWritable && !isEnumerable && !isConfigurable);
|
||||
|
||||
@ -15,5 +15,5 @@
|
||||
var a = new Object();
|
||||
var b = 123;
|
||||
|
||||
assert(a.isPrototypeOf(b));
|
||||
assert(!a.isPrototypeOf(b));
|
||||
|
||||
|
||||
@ -15,4 +15,4 @@
|
||||
var object = new Object();
|
||||
var otherObject = new Object();
|
||||
|
||||
assert(otherObject.isPrototypeOf(object));
|
||||
assert(!otherObject.isPrototypeOf(object));
|
||||
|
||||
@ -13,4 +13,4 @@
|
||||
// limitations under the License.
|
||||
|
||||
var object = new Object();
|
||||
assert(object.isPrototypeOf(object));
|
||||
assert(!object.isPrototypeOf(object));
|
||||
|
||||
@ -14,4 +14,4 @@
|
||||
|
||||
var object = Object.create(null);
|
||||
var temp = new Object();
|
||||
assert(temp.isPrototypeOf(object));
|
||||
assert(!temp.isPrototypeOf(object));
|
||||
|
||||
@ -12,4 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
Object.prototype.isPrototypeOf.call(undefined, {});
|
||||
try
|
||||
{
|
||||
Object.prototype.isPrototypeOf.call(undefined, {});
|
||||
|
||||
assert(false);
|
||||
} catch (e)
|
||||
{
|
||||
assert (e instanceof TypeError);
|
||||
}
|
||||
|
||||
@ -23,4 +23,4 @@ var propertyDescriptor = {
|
||||
|
||||
Object.defineProperty(object, 'prop', propertyDescriptor);
|
||||
|
||||
assert(object.propertyIsEnumerable('prop'));
|
||||
assert(!object.propertyIsEnumerable('prop'));
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
"use strict";
|
||||
|
||||
var foo = new Function("baz", "baz", "baz", "return 0;");
|
||||
|
||||
assert(false);
|
||||
assert(foo() === 0);
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
assert(delete Function.prototype.toString.length);
|
||||
assert(!(delete Function.prototype.toString.length));
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
|
||||
@ -13,5 +13,5 @@
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
assert(delete Function.prototype.toString.length);
|
||||
assert(!(delete Function.prototype.toString.length));
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
|
||||
@ -12,4 +12,4 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(String("abc").charCodeAt(3) === NaN ? 1 : 0);
|
||||
assert(isNaN(String("abc").charCodeAt(3)));
|
||||
|
||||
@ -14,4 +14,4 @@
|
||||
|
||||
var b = Number.MIN_VALUE
|
||||
Number.MIN_VALUE = 0
|
||||
assert(Number.MIN_VALUE === b);f
|
||||
assert(Number.MIN_VALUE === b);
|
||||
|
||||
@ -12,4 +12,4 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Number.propertyIsEnumerable('NEGATIVE_INFINITY'));
|
||||
assert(!Number.propertyIsEnumerable('NEGATIVE_INFINITY'));
|
||||
|
||||
@ -934,7 +934,6 @@
|
||||
./tests/jerry-test-suite/13/13-007.js
|
||||
./tests/jerry-test-suite/13/13-009.js
|
||||
./tests/jerry-test-suite/13/13-010.js
|
||||
./tests/jerry-test-suite/13/13-011.js
|
||||
./tests/jerry-test-suite/13/13.01/13.01-001.js
|
||||
./tests/jerry-test-suite/13/13.02/13.02-001.js
|
||||
./tests/jerry-test-suite/13/13.02/13.02-003.js
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user