mirror of
https://github.com/google/pebble.git
synced 2025-07-26 09:14:53 -04:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
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);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue