mirror of
https://github.com/google/pebble.git
synced 2025-06-03 16:53:11 +00:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-001.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-001.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a;
|
||||
a = Object();
|
||||
|
||||
assert(typeof a === 'object');
|
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-002.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-002.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a;
|
||||
a = Object(null);
|
||||
|
||||
assert(typeof a === 'object');
|
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-003.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-003.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a;
|
||||
a = Object(undefined);
|
||||
|
||||
assert(typeof a === 'object');
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-004.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-004.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = 1;
|
||||
assert(typeof Object(a) === 'object');
|
||||
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-005.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-005.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = true;
|
||||
|
||||
assert(typeof Object(a) === 'object');
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-006.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-006.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = false;
|
||||
assert(typeof Object(a) === 'object');
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-007.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-007.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = "some string";
|
||||
|
||||
assert(typeof Object(a) === 'object');
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-008.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-008.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = "some string";
|
||||
assert(typeof Object(a) === 'object');
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-009.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-009.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Number(123.5);
|
||||
assert (typeof Object(a) === 'object');
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-010.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.01/15.02.01-010.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new String("nice string");
|
||||
assert(typeof Object(a) === 'object');
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-001.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-001.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object();
|
||||
|
||||
assert(typeof a === 'object');
|
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-002.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-002.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object();
|
||||
var b = new Object();
|
||||
|
||||
assert(a !== b);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-003.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-003.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object();
|
||||
var b = new Object(a);
|
||||
assert(a === b);
|
23
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-004.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-004.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = {
|
||||
field1: Number,
|
||||
field2: String,
|
||||
foo: function () {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
var b = new Object(a);
|
||||
assert(a === b);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-005.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-005.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = "foobar";
|
||||
var b = new Object(a);
|
||||
assert(typeof b === "object" && b == a && b !== a);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-006.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-006.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = 5.5;
|
||||
var b = new Object(a);
|
||||
assert(typeof b === "object" && b == a && b !== a);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-007.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-007.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = true;
|
||||
var b = new Object(a);
|
||||
assert(typeof b === "object" && b == a && b !== a);
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-008.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-008.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object();
|
||||
assert(typeof a === 'object' &&
|
||||
typeof (Object.getPrototypeOf(a)) === "object" &&
|
||||
Object.isExtensible(a));
|
||||
|
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-009.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-009.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object(null);
|
||||
assert(typeof a === 'object' &&
|
||||
typeof (Object.getPrototypeOf(a)) === "object" &&
|
||||
Object.isExtensible(a));
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-010.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.02/15.02.02-010.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object(undefined);
|
||||
assert(typeof a === 'object' &&
|
||||
typeof (Object.getPrototypeOf(a)) === "object" &&
|
||||
Object.isExtensible(a));
|
||||
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-001.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(typeof Object.getPrototypeOf(Object) == "function" &&
|
||||
Object.length == 1);
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-002.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(typeof Object.prototype == "object");
|
33
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-003.js
vendored
Normal file
33
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-003.js
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
writable = false;
|
||||
enumerable = false;
|
||||
configurable = false;
|
||||
|
||||
Object.prototype = "qwerty";
|
||||
if (Object.prototype === "qwerty")
|
||||
writable = true;
|
||||
|
||||
for (prop in Object)
|
||||
{
|
||||
if (Object[prop] == "qwerty")
|
||||
enumerable = true;
|
||||
}
|
||||
|
||||
if (delete Object.prototype)
|
||||
configurable = true;
|
||||
|
||||
assert(!writable && !enumerable && !configurable);
|
28
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-004.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-004.js
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = {
|
||||
prop1: Number,
|
||||
prop2: String,
|
||||
prop3: true,
|
||||
prop4: 0
|
||||
}
|
||||
|
||||
var keys = Object.keys(object);
|
||||
|
||||
assert(keys[0] == "prop1" &&
|
||||
keys[1] == "prop2" &&
|
||||
keys[2] == "prop3" &&
|
||||
keys[3] == "prop4");
|
||||
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-005.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-005.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = {
|
||||
field: Number
|
||||
}
|
||||
|
||||
assert(Object.getPrototypeOf(a) == Object.getPrototypeOf(Object()));
|
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-006.js
vendored
Normal file
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-006.js
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object1 = {
|
||||
field1: 5,
|
||||
field2: "qwe",
|
||||
field3: true
|
||||
}
|
||||
|
||||
var object2 = {
|
||||
field1: 5,
|
||||
field2: "qwe",
|
||||
field3: true
|
||||
}
|
||||
|
||||
Object.freeze(object1);
|
||||
|
||||
assert(!Object.isExtensible(object1) && Object.isExtensible(object2));
|
22
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-007.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-007.js
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = {
|
||||
foo: function () {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
desc = Object.getOwnPropertyDescriptor(a, "foo");
|
||||
|
||||
assert(desc instanceof Object);
|
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-008.js
vendored
Normal file
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-008.js
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object1 = {
|
||||
field1: 5,
|
||||
field2: "qwe",
|
||||
field3: true
|
||||
}
|
||||
|
||||
var object2 = {
|
||||
field1: 5,
|
||||
field2: "qwe",
|
||||
field3: true
|
||||
}
|
||||
|
||||
Object.freeze(object1);
|
||||
|
||||
assert(Object.isFrozen(object1) && !Object.isFrozen(object2));
|
31
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-009.js
vendored
Normal file
31
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-009.js
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = {
|
||||
prop1: Number,
|
||||
prop2: String,
|
||||
foo: function () {
|
||||
return 1;
|
||||
},
|
||||
bar: function () {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
names = Object.getOwnPropertyNames(a);
|
||||
|
||||
assert(names instanceof Array &&
|
||||
names[0] === "prop1" &&
|
||||
names[1] === "prop2" &&
|
||||
names[2] === "foo" &&
|
||||
names[3] === "bar");
|
30
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-010.js
vendored
Normal file
30
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-010.js
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new String("qwe");
|
||||
|
||||
names = Object.getOwnPropertyNames(a);
|
||||
|
||||
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);
|
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-011.js
vendored
Normal file
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-011.js
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object1 = {
|
||||
field1: 5,
|
||||
field2: "qwe",
|
||||
field3: true
|
||||
}
|
||||
|
||||
var object2 = {
|
||||
field1: 5,
|
||||
field2: "qwe",
|
||||
field3: true
|
||||
}
|
||||
|
||||
Object.seal(object1);
|
||||
|
||||
assert(Object.isSealed(object1) && !Object.isSealed(object2));
|
27
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-012.js
vendored
Normal file
27
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-012.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var veryUsefulObject = {
|
||||
}
|
||||
|
||||
Object.preventExtensions(veryUsefulObject);
|
||||
|
||||
veryUsefulObject.property = "qwerty";
|
||||
|
||||
veryUsefulObject.method = function () {
|
||||
return "asdf";
|
||||
}
|
||||
|
||||
assert(veryUsefulObject.property === undefined);
|
||||
assert(veryUsefulObject.method === undefined);
|
28
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-013.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-013.js
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var niceObject = {
|
||||
niceProp1: String,
|
||||
niceProp2: Number,
|
||||
niceMeth: function () {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
var someElseObject = {
|
||||
prop1: Boolean,
|
||||
prop2: Number
|
||||
}
|
||||
var niceChild = Object.create(niceObject, someElseObject);
|
||||
|
||||
assert(Object.getPrototypeOf(niceChild) === niceObject);
|
22
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-014.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-014.js
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new String("qwe"); //I'm not a string I'm Object-String. It's OK.
|
||||
var someElseObject = {
|
||||
prop1: Boolean,
|
||||
prop2: Number
|
||||
}
|
||||
var niceChild = Object.create(a, someElseObject);
|
||||
|
||||
assert(Object.getPrototypeOf(niceChild) === a);
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-015.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-015.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = {}
|
||||
var someElseObject = undefined;
|
||||
var childObject = Object.create(a, someElseObject); //nothing is inherited
|
||||
|
||||
assert(Object.getPrototypeOf(childObject) === a && Object.getOwnPropertyNames(childObject).length == 0);
|
49
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-016.js
vendored
Normal file
49
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-016.js
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var emptyObject = {}
|
||||
|
||||
var propertyDescriptor = {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get: function () {
|
||||
return myProperty;
|
||||
},
|
||||
set: function (newValue) {
|
||||
myProperty = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(emptyObject, 'myProperty', propertyDescriptor);
|
||||
|
||||
var checkGetSet = false;
|
||||
var isEnumerable = false;
|
||||
var isConfigurable = false;
|
||||
|
||||
emptyObject.myProperty = "foobar";
|
||||
if (emptyObject.myProperty == "foobar")
|
||||
checkGetSet = true;
|
||||
|
||||
for (p in emptyObject) {
|
||||
if (emptyObject[p] == "foobar") {
|
||||
isEnumerable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (delete emptyObject.myProperty)
|
||||
isConfigurable = true;
|
||||
|
||||
assert(checkGetSet && isEnumerable && isConfigurable);
|
||||
|
25
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-017.js
vendored
Normal file
25
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-017.js
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = {
|
||||
prop1: "qwerty",
|
||||
prop2: 123,
|
||||
}
|
||||
|
||||
Object.freeze(object);
|
||||
|
||||
object.prop1 = "asdf";
|
||||
object.prop3 = true;
|
||||
|
||||
assert(!(object.prop1 === "asdf") && !delete object.prop2 && !object.prop3);
|
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-018.js
vendored
Normal file
29
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-018.js
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = {
|
||||
prop1: Number,
|
||||
prop2: String,
|
||||
prop3: Boolean
|
||||
}
|
||||
|
||||
Object.seal(object);
|
||||
|
||||
check = delete object.prop1 || delete object.prop2 || delete object.prop3;
|
||||
|
||||
object.prop4 = 3;
|
||||
|
||||
check = check || Boolean(object.prop4);
|
||||
|
||||
assert(!check);
|
53
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-019.js
vendored
Normal file
53
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-019.js
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var emptyObject = {}
|
||||
|
||||
var properties = {
|
||||
prop1: {
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
configurable: false,
|
||||
value: "I'm prop1"
|
||||
},
|
||||
prop2: {
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
configurable: false,
|
||||
value: "I'm prop2"
|
||||
}
|
||||
}
|
||||
|
||||
var isEnumerable = true;
|
||||
var isConfigurable = true;
|
||||
var isWritable = false;
|
||||
|
||||
Object.defineProperties(emptyObject, properties);
|
||||
|
||||
emptyObject.prop1 = "hello";
|
||||
emptyObject.prop2 = "world";
|
||||
|
||||
if (emptyObject.prop1 === "hello" && emptyObject.prop2 == "world")
|
||||
isWritable = true;
|
||||
|
||||
for (p in emptyObject) {
|
||||
if (emptyObject[p] === "hello")
|
||||
isEnumerable = !isEnumerable;
|
||||
else if (emptyObject[p] === "world")
|
||||
isEnumerable = !isEnumerable;
|
||||
}
|
||||
|
||||
isConfigurable = delete emptyObject.prop1 && delete emptyObject.prop2
|
||||
|
||||
assert(isWritable && isEnumerable && !isConfigurable);
|
44
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-020.js
vendored
Normal file
44
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-020.js
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var emptyObject = {}
|
||||
|
||||
var propertyDescriptor = {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
value: "hello!",
|
||||
writable: true
|
||||
}
|
||||
|
||||
Object.defineProperty(emptyObject, 'myProperty', propertyDescriptor);
|
||||
|
||||
var isWritable = false;
|
||||
var isEnumerable = false;
|
||||
var isConfigurable = false;
|
||||
|
||||
emptyObject.myProperty = "foobar";
|
||||
if (emptyObject.myProperty == "foobar")
|
||||
isWritable = true;
|
||||
|
||||
for (p in emptyObject) {
|
||||
if (emptyObject[p] == "foobar") {
|
||||
isEnumerable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (delete emptyObject.myProperty)
|
||||
isConfigurable = true;
|
||||
|
||||
assert(isWritable && isEnumerable && isConfigurable);
|
52
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-021.js
vendored
Normal file
52
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.03/15.02.03-021.js
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var emptyObject = {}
|
||||
|
||||
var propertyDescriptor = {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
value: "hello!",
|
||||
writable: true
|
||||
}
|
||||
|
||||
Object.defineProperty(emptyObject, 'myProperty', propertyDescriptor);
|
||||
|
||||
var newPropertyDescriptor = {
|
||||
enumerable: false,
|
||||
configurable: false,
|
||||
writable: false
|
||||
}
|
||||
|
||||
Object.defineProperty(emptyObject, 'myProperty', newPropertyDescriptor); //change properties of property
|
||||
|
||||
var isWritable = false;
|
||||
var isEnumerable = false;
|
||||
var isConfigurable = false;
|
||||
|
||||
emptyObject.myProperty = "foobar";
|
||||
if (emptyObject.myProperty == "foobar")
|
||||
isWritable = true;
|
||||
|
||||
for (p in emptyObject) {
|
||||
if (emptyObject[p] == "foobar") {
|
||||
isEnumerable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (delete emptyObject.myProperty)
|
||||
isConfigurable = true;
|
||||
|
||||
assert(!isWritable && !isEnumerable && !isConfigurable);
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04-001.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.getPrototypeOf(Object.getPrototypeOf(Object())) === null);
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04-002.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.isExtensible(Object.getPrototypeOf(Object())));
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.01/15.02.04.01-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.01/15.02.04.01-001.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.getPrototypeOf(Object()).constructor === Object);
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.01/15.02.04.01-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.01/15.02.04.01-002.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.prototype.constructor === Object);
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-001.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.prototype.toString.call(undefined) === "[object Undefined]");
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-002.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.prototype.toString.call(null) === "[object Null]");
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-003.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-003.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var obj = {};
|
||||
assert(obj.toString() === "[object Object]");
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-004.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.02/15.02.04.02-004.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.prototype.toString.call(123) === "[object Number]");
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.03/15.02.04.03-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.03/15.02.04.03-001.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(typeof Object.prototype.toLocaleString === 'function');
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.03/15.02.04.03-002.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.03/15.02.04.03-002.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var o = new Object();
|
||||
assert(o.toLocaleString() === o.toString());
|
||||
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.03/15.02.04.03-003.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.03/15.02.04.03-003.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Object.toLocaleString() === Object.toString());
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-001.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object();
|
||||
assert(a.valueOf() === a);
|
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-002.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-002.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = {
|
||||
n: Number(5)
|
||||
}
|
||||
assert(a.valueOf() === a);
|
20
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-003.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-003.js
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = {
|
||||
n: true,
|
||||
s: "qwerty"
|
||||
}
|
||||
|
||||
assert(a.valueOf() === a);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-004.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-004.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Number(5);
|
||||
|
||||
assert(a.valueOf() === 5);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-005.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-005.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = 123;
|
||||
|
||||
assert(a.valueOf() === 123);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-006.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-006.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Boolean(true);
|
||||
|
||||
assert(a.valueOf() === true);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-007.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-007.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = false;
|
||||
|
||||
assert(a.valueOf() === false);
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-008.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-008.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new String("qwe");
|
||||
assert(a.valueOf() === "qwe");
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-009.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-009.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = "asdfgh";
|
||||
assert(a.valueOf() === "asdfgh");
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-010.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.04/15.02.04.04-010.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = "123";
|
||||
assert(a.valueOf() === "123");
|
21
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-001.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-001.js
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var obj = {
|
||||
prop1: 5,
|
||||
prop2: "qwe",
|
||||
prop3: Boolean
|
||||
}
|
||||
|
||||
assert(obj.hasOwnProperty("prop1"));
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-002.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-002.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var obj = {
|
||||
prop1: 5
|
||||
}
|
||||
|
||||
assert(!obj.hasOwnProperty("prop5"));
|
27
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-003.js
vendored
Normal file
27
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-003.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function Parent() {
|
||||
this.prop = 5;
|
||||
}
|
||||
|
||||
function Child() {
|
||||
this.prop2 = false;
|
||||
}
|
||||
|
||||
Child.prototype = Parent;
|
||||
|
||||
var obj = new Child();
|
||||
|
||||
assert(!obj.hasOwnProperty("prop"));
|
27
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-004.js
vendored
Normal file
27
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.05/15.02.04.05-004.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function Parent() {
|
||||
this.prop = 5;
|
||||
}
|
||||
|
||||
function Child() {
|
||||
this.prop2 = false;
|
||||
}
|
||||
|
||||
Child.prototype = Parent;
|
||||
|
||||
var obj = new Child();
|
||||
|
||||
assert(obj.hasOwnProperty("prop2"));
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-001.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-001.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = new Object();
|
||||
var b = 123;
|
||||
|
||||
assert(!a.isPrototypeOf(b));
|
||||
|
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-002.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-002.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = new Object();
|
||||
var p = Object.getPrototypeOf(object);
|
||||
|
||||
assert(p.isPrototypeOf(object));
|
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-003.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-003.js
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = new Object();
|
||||
var otherObject = new Object();
|
||||
|
||||
assert(!otherObject.isPrototypeOf(object));
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-004.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-004.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = new Object();
|
||||
assert(!object.isPrototypeOf(object));
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-005.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-005.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = Object.create(null);
|
||||
var temp = new Object();
|
||||
assert(!temp.isPrototypeOf(object));
|
23
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-006.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.06/15.02.04.06-006.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
try
|
||||
{
|
||||
Object.prototype.isPrototypeOf.call(undefined, {});
|
||||
|
||||
assert(false);
|
||||
} catch (e)
|
||||
{
|
||||
assert (e instanceof TypeError);
|
||||
}
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.07/15.02.04.07-001.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.07/15.02.04.07-001.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = {
|
||||
prop: true
|
||||
}
|
||||
|
||||
assert(!object.propertyIsEnumerable('prop2'));
|
26
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.07/15.02.04.07-002.js
vendored
Normal file
26
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.07/15.02.04.07-002.js
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = {}
|
||||
|
||||
var propertyDescriptor = {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
value: "qwe",
|
||||
writable: true
|
||||
}
|
||||
|
||||
Object.defineProperty(object, 'prop', propertyDescriptor);
|
||||
|
||||
assert(object.propertyIsEnumerable('prop'));
|
26
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.07/15.02.04.07-003.js
vendored
Normal file
26
third_party/jerryscript/tests/jerry-test-suite/15/15.02/15.02.04/15.02.04.07/15.02.04.07-003.js
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var object = {}
|
||||
|
||||
var propertyDescriptor = {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
value: "qwe",
|
||||
writable: true
|
||||
}
|
||||
|
||||
Object.defineProperty(object, 'prop', propertyDescriptor);
|
||||
|
||||
assert(!object.propertyIsEnumerable('prop'));
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-001.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var func = new Function("a,b", "c", "return a+b+c")
|
||||
assert(func(1, 2, 3) == 6);
|
22
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-002.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-002.js
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
try
|
||||
{
|
||||
Function('a', 'a', '"use strict";');
|
||||
assert(false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
22
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-004.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-004.js
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
try
|
||||
{
|
||||
Function('eval', '"use strict";');
|
||||
assert(false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-005.js
vendored
Normal file
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-005.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
"use strict";
|
||||
try
|
||||
{
|
||||
Function('eval', 'return;');
|
||||
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert(false);
|
||||
}
|
22
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-007.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-007.js
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
try
|
||||
{
|
||||
Function('a,a', '"use strict";');
|
||||
assert(false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-008.js
vendored
Normal file
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-008.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
"use strict";
|
||||
|
||||
try
|
||||
{
|
||||
Function('a,a', 'return a;');
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert(false);
|
||||
}
|
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-009.js
vendored
Normal file
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-009.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
"use strict";
|
||||
|
||||
try
|
||||
{
|
||||
Function('arguments', 'return;');
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert(false);
|
||||
}
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-010.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-010.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
"use strict";
|
||||
|
||||
var foo = new Function("baz", "qux", "baz", "return 0;");
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-011.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-011.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
"use strict";
|
||||
|
||||
var foo = new Function("baz", "baz", "baz", "return 0;");
|
||||
|
||||
assert(foo() === 0);
|
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-012s.js
vendored
Normal file
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.02/15.03.02.01/15.03.02.01-012s.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
"use strict";
|
||||
|
||||
try
|
||||
{
|
||||
Function('a', 'a', 'return;');
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert(false);
|
||||
}
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-001.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.hasOwnProperty("prototype"));
|
15
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-002.js
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.isPrototypeOf(Function));
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-003.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-003.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
Function.prototype.indicator = 1;
|
||||
assert (Function.indicator === 1);
|
16
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-004.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03-004.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.hasOwnProperty("length"));
|
||||
assert(Function.length === 1);
|
35
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-001.js
vendored
Normal file
35
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-001.js
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var obj = Function.prototype;
|
||||
Function.prototype = function () {
|
||||
return "shifted";
|
||||
};
|
||||
|
||||
if (Function.prototype !== obj)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (Function.prototype() !== undefined)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert(false);
|
||||
}
|
31
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-002.js
vendored
Normal file
31
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-002.js
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
if (Function.propertyIsEnumerable('prototype'))
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
|
||||
var count = 0;
|
||||
|
||||
for (p in Function)
|
||||
{
|
||||
if (p === "prototype")
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count !== 0)
|
||||
{
|
||||
assert(false);
|
||||
}
|
20
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-003.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-003.js
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
delete Function.prototype;
|
||||
|
||||
if (!(Function.hasOwnProperty('prototype')))
|
||||
{
|
||||
assert(false);
|
||||
}
|
21
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-004.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.01/15.03.03.01-004.js
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
function foo() {
|
||||
}
|
||||
|
||||
Object.defineProperty(foo, 'prototype', {value: {}});
|
||||
assert(foo.prototype ===
|
||||
Object.getOwnPropertyDescriptor(foo, 'prototype').value);
|
||||
|
19
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.02/15.03.03.02-001.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.03/15.03.03.02/15.03.03.02-001.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var desc = Object.getOwnPropertyDescriptor(Function, "length");
|
||||
assert(desc.value === 1 &&
|
||||
desc.writable === false &&
|
||||
desc.enumerable === false &&
|
||||
desc.configurable === false);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-001.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-001.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
assert(!(delete Function.prototype.toString.length));
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-002.js
vendored
Normal file
24
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-002.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var FACTORY = Function.prototype.toString;
|
||||
|
||||
try
|
||||
{
|
||||
var instance = new FACTORY;
|
||||
assert(false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
20
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-003.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-003.js
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
assert(!Function.prototype.toString.propertyIsEnumerable('length'));
|
||||
for (p in Function.prototype.toString)
|
||||
{
|
||||
assert(p !== "length");
|
||||
}
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-004.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-004.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
assert(!(delete Function.prototype.toString.length));
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
23
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-005.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-005.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.toString.hasOwnProperty('length'));
|
||||
|
||||
var obj = Function.prototype.toString.length;
|
||||
|
||||
Function.prototype.toString.length = function () {
|
||||
return "shifted";
|
||||
};
|
||||
|
||||
assert(Function.prototype.toString.length === obj);
|
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-006.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/15/15.03/15.03.04/15.03.04.02/15.03.04.02-006.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
assert(Function.prototype.toString.hasOwnProperty("length"));
|
||||
assert(Function.prototype.toString.length === 0);
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue