mirror of
https://github.com/google/pebble.git
synced 2025-05-28 05:53:12 +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
23
third_party/jerryscript/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js
vendored
Normal file
23
third_party/jerryscript/tests/benchmarks/jerry/fill-array-with-numbers-3-times-5000-elements.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2016 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.
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
a = [];
|
||||
|
||||
for (j = 0; j < 5000; j++)
|
||||
{
|
||||
a[j] = j;
|
||||
}
|
||||
}
|
36
third_party/jerryscript/tests/benchmarks/jerry/function_loop.js
vendored
Normal file
36
third_party/jerryscript/tests/benchmarks/jerry/function_loop.js
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
// 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 x = 7;
|
||||
var y = 3;
|
||||
var count = 1000000;
|
||||
|
||||
function cse_opt(x, y)
|
||||
{
|
||||
var tmp1 = x * x;
|
||||
var tmp2 = y * y;
|
||||
var tmp3 = tmp1 * tmp1;
|
||||
var tmp4 = tmp2 * tmp2;
|
||||
|
||||
for (var i = 0; i < count; i++) {
|
||||
var cached1 = tmp3 * x
|
||||
var cached2 = tmp4 * y;
|
||||
var cached_n_cached = cached1 + cached2;
|
||||
var ret_val = cached_n_cached + cached_n_cached;
|
||||
}
|
||||
|
||||
return ret_val + ret_val;
|
||||
};
|
||||
|
||||
cse_opt(x, y);
|
36
third_party/jerryscript/tests/benchmarks/jerry/gc.js
vendored
Normal file
36
third_party/jerryscript/tests/benchmarks/jerry/gc.js
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
// Copyright 2015 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 f (o, i) {
|
||||
if (--i > 0) {
|
||||
f ({a:o, b:o}, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < 100; i++)
|
||||
{
|
||||
({} + f ({}, 12));
|
||||
}
|
||||
|
||||
for(var i = 0; i < 100; i++)
|
||||
{
|
||||
var obj = {}, obj_l;
|
||||
obj_l = obj;
|
||||
|
||||
for (var k = 0; k < 1500; k++)
|
||||
{
|
||||
obj_l.prop = {};
|
||||
obj_l = obj_l.prop;
|
||||
}
|
||||
}
|
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_10kk.js
vendored
Normal file
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_10kk.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 count = 10000000;
|
||||
var x = 7;
|
||||
var y = 3;
|
||||
|
||||
var tmp1;
|
||||
var tmp2;
|
||||
var tmp3;
|
||||
var tmp4;
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
tmp1 = x * x;
|
||||
tmp2 = y * y;
|
||||
tmp3 = tmp1 * tmp1;
|
||||
tmp4 = tmp2 * tmp2;
|
||||
}
|
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_1kk.js
vendored
Normal file
30
third_party/jerryscript/tests/benchmarks/jerry/loop_arithmetics_1kk.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 count = 1000000;
|
||||
var x = 7;
|
||||
var y = 3;
|
||||
|
||||
var tmp1;
|
||||
var tmp2;
|
||||
var tmp3;
|
||||
var tmp4;
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
tmp1 = x * x;
|
||||
tmp2 = y * y;
|
||||
tmp3 = tmp1 * tmp1;
|
||||
tmp4 = tmp2 * tmp2;
|
||||
}
|
69
third_party/jerryscript/tests/blinky.js
vendored
Normal file
69
third_party/jerryscript/tests/blinky.js
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
// Copyright 2015 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 led_green = 0;
|
||||
var led_orange = 1;
|
||||
var led_red = 2;
|
||||
var led_blue = 3;
|
||||
|
||||
var leds = new Array (led_green, led_orange, led_red, led_blue);
|
||||
var waitDivisors = new Array (1, 2, 3, 6);
|
||||
var waitTime = 60;
|
||||
var numOfIterations = 10;
|
||||
|
||||
while (1)
|
||||
{
|
||||
for (var j = 0; j < numOfIterations; j += 1)
|
||||
{
|
||||
for (var led = 0; led < leds.length; led++)
|
||||
{
|
||||
LEDOn (leds [led]);
|
||||
}
|
||||
|
||||
wait (waitTime * 2);
|
||||
|
||||
for (var led = 0; led < leds.length; led++)
|
||||
{
|
||||
LEDOff (leds [led]);
|
||||
}
|
||||
|
||||
wait (waitTime * 2);
|
||||
}
|
||||
|
||||
for (var j = 0; j < numOfIterations; j += 1)
|
||||
{
|
||||
for (var led = 0; led < leds.length; led++)
|
||||
{
|
||||
LEDOn (leds [led]);
|
||||
wait (waitTime);
|
||||
LEDOff (leds [led]);
|
||||
wait (waitTime);
|
||||
}
|
||||
}
|
||||
|
||||
for (var d = 0; d < waitDivisors.length; d++)
|
||||
{
|
||||
var divisor = waitDivisors [d];
|
||||
|
||||
for (var j = 0; j < numOfIterations; j += 1)
|
||||
{
|
||||
for (var led = 0; led < leds.length; led++)
|
||||
{
|
||||
LEDOn (leds [led]);
|
||||
wait (waitTime / divisor);
|
||||
LEDOff (leds [led]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
third_party/jerryscript/tests/hello.js
vendored
Normal file
16
third_party/jerryscript/tests/hello.js
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2015 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2015 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
print ("Hello JerryScript!");
|
16
third_party/jerryscript/tests/jerry-test-suite/06/06-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/06/06-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 str = "a\u000Ab";
|
||||
assert(str[1] === '\n');
|
29
third_party/jerryscript/tests/jerry-test-suite/06/06-002.js
vendored
Normal file
29
third_party/jerryscript/tests/jerry-test-suite/06/06-002.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.
|
||||
|
||||
function c(arg)
|
||||
{
|
||||
var obj = new Object();
|
||||
obj.print = function () {
|
||||
f = arg;
|
||||
};
|
||||
return obj;
|
||||
}
|
||||
|
||||
a = c(5);
|
||||
b = c(6);
|
||||
|
||||
a.print.toString = 7;
|
||||
|
||||
assert(typeof a.print.toString !== typeof b.print.toString);
|
30
third_party/jerryscript/tests/jerry-test-suite/06/06-003.js
vendored
Normal file
30
third_party/jerryscript/tests/jerry-test-suite/06/06-003.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 obj = new Object();
|
||||
|
||||
function c(arg)
|
||||
{
|
||||
var obj = new Object();
|
||||
obj.par = arg;
|
||||
obj.print = function () {
|
||||
return arg;
|
||||
};
|
||||
return obj;
|
||||
}
|
||||
|
||||
var a = c(5);
|
||||
var b = c(6);
|
||||
assert(a.print() + b.par === 11);
|
||||
|
30
third_party/jerryscript/tests/jerry-test-suite/06/06-004.js
vendored
Normal file
30
third_party/jerryscript/tests/jerry-test-suite/06/06-004.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 arg = 3;
|
||||
function a() {
|
||||
return 5 + arg;
|
||||
}
|
||||
|
||||
arg = 4;
|
||||
var b = function () {
|
||||
return 6 + arg;
|
||||
};
|
||||
|
||||
arg = 5;
|
||||
c = function e() {
|
||||
return 7 + arg;
|
||||
};
|
||||
|
||||
assert(a() + b() + c() === 33);
|
18
third_party/jerryscript/tests/jerry-test-suite/06/06-005.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/06/06-005.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 = "\u0410\u0411";
|
||||
var b = "\u0509\u0413";
|
||||
|
||||
assert(a < b);
|
15
third_party/jerryscript/tests/jerry-test-suite/07/07.06/07.06.01/07.06.01-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/07/07.06/07.06.01/07.06.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.
|
||||
|
||||
var let = 1;
|
15
third_party/jerryscript/tests/jerry-test-suite/07/07.08/07.08.05/07.08.05-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/07/07.08/07.08.05/07.08.05-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.
|
||||
|
||||
/a[a-z]/.exec("abcdefghi");
|
16
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-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.
|
||||
|
||||
{ 1
|
||||
2 } 3
|
27
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-002.js
vendored
Normal file
27
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-002.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 test()
|
||||
{
|
||||
var a = 1, b = 2;
|
||||
|
||||
return
|
||||
a + b
|
||||
}
|
||||
|
||||
var v = test();
|
||||
|
||||
assert(v !== 3);
|
||||
|
||||
assert(typeof v === "undefined")
|
20
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-003.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-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 b = 4, c = 5;
|
||||
|
||||
a = b
|
||||
++c
|
||||
|
||||
assert(a === 4 && c === 6);
|
32
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-004.js
vendored
Normal file
32
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-004.js
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
// 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 = new Object();
|
||||
|
||||
function c(arg)
|
||||
{
|
||||
var obj = new Object();
|
||||
obj.par = arg;
|
||||
obj.print = function () {
|
||||
return arg;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
var a, b = 1, d = 2, e = 3;
|
||||
|
||||
a = b + c
|
||||
(d + e).print()
|
||||
|
||||
assert(a === 6);
|
20
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-005.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-005.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 b = 4, c = 5;
|
||||
|
||||
a = b
|
||||
--c
|
||||
|
||||
assert(a === 4 && c === 4);
|
31
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-006.js
vendored
Normal file
31
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-006.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 mainloop = 1, cnt = 0;
|
||||
|
||||
for (var i = 0; i < 10; ++i)
|
||||
{
|
||||
for (var j = 0; j < 10; ++j)
|
||||
{
|
||||
if (j == 6)
|
||||
{
|
||||
continue
|
||||
mainloop
|
||||
}
|
||||
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
|
||||
assert(cnt == 90);
|
31
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-007.js
vendored
Normal file
31
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-007.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 mainloop = 1, cnt = 0;
|
||||
|
||||
for (var i = 0; i < 10; ++i)
|
||||
{
|
||||
for (var j = 0; j < 10; ++j)
|
||||
{
|
||||
if (j == 6)
|
||||
{
|
||||
break
|
||||
mainloop
|
||||
}
|
||||
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
|
||||
assert(cnt == 60);
|
23
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-008.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-008.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.
|
||||
|
||||
function test()
|
||||
{
|
||||
var a = 10, b = 5;
|
||||
var c = a + b
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
assert(test() == 15);
|
19
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-009.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-009.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, b = 3, c = 30;
|
||||
a = b + c}
|
||||
|
||||
assert (a == 33);
|
20
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-010.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/07/07.09/07.09-010.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 (glob === undefined);
|
||||
|
||||
var glob = 34
|
||||
|
||||
assert (glob === 34);
|
||||
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.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 a;
|
||||
assert(typeof (a) === "undefined");
|
17
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-002.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-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 = {};
|
||||
|
||||
assert(typeof (o.empty) === "undefined");
|
18
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-003.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.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;
|
||||
var b = null;
|
||||
|
||||
assert(a == b);
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-004.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-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 a;
|
||||
assert(!a);
|
20
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-005.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-005.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.
|
||||
|
||||
a = foo();
|
||||
|
||||
assert(typeof (a) === "undefined");
|
||||
|
||||
function foo() {
|
||||
}
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-006.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-006.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 (void 0) === "undefined");
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-007.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-007.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(undefined === void 0);
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-008.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.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 x;
|
||||
assert(x === void 0);
|
20
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-009.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-009.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 x;
|
||||
assert(test1() === void 0);
|
||||
|
||||
function test1(x) {
|
||||
return x;
|
||||
}
|
23
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-010.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-010.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2014-2015 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 (test ());
|
||||
|
||||
function test (arg)
|
||||
{
|
||||
if (typeof (arg) === "undefined")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
23
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-011.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/08/08.01/08.01-011.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2014-2015 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 (test ());
|
||||
|
||||
function test (arg)
|
||||
{
|
||||
if (typeof (arg) === "undefined")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.02/08.02-001.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.02/08.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.
|
||||
|
||||
var x = null;
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.02/08.02-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.02/08.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(typeof null == 'object');
|
17
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.03-001.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.03-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 = true;
|
||||
assert(a);
|
||||
|
17
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.03-002.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.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 a = false;
|
||||
assert(!a);
|
||||
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.03-003.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.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(!(false == true));
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.03-004.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.03/08.03-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(!(false === true));
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.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.
|
||||
|
||||
a = '';
|
||||
assert(typeof a == "string");
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.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(("x\0a" < "x\0b") && ("x\0b" < "x\0c"));
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-003.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-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 str = "test";
|
||||
assert(str.constructor === String);
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-004.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-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 s = 'hello';
|
||||
assert(s[0] == 'h');
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-005.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-005.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 s = 'hello';
|
||||
assert(s[5] == undefined);
|
17
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-006.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.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 str = 'ABC';
|
||||
var strObj = new String('ABC');
|
||||
assert(str.constructor === strObj.constructor);
|
17
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-007.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.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 str = 'ABC';
|
||||
var strObj = new String('ABC');
|
||||
assert(str == strObj);
|
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-008.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-008.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 str = 'ABC';
|
||||
var strObj = new String('ABC');
|
||||
|
||||
assert(str !== strObj);
|
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-009.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-009.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 str = "";
|
||||
var strObj = new String("");
|
||||
var strObj_ = new String();
|
||||
|
||||
assert(str.constructor === strObj.constructor);
|
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-010.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-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 str = "";
|
||||
var strObj = new String("");
|
||||
var strObj_ = new String();
|
||||
|
||||
assert(str.constructor === strObj_.constructor);
|
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-011.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-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.
|
||||
|
||||
var str = "";
|
||||
var strObj = new String("");
|
||||
var strObj_ = new String();
|
||||
|
||||
assert(str == strObj);
|
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-012.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-012.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 str = "";
|
||||
var strObj = new String("");
|
||||
var strObj_ = new String();
|
||||
|
||||
assert(str !== strObj);
|
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-013.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-013.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 str = "";
|
||||
var strObj = new String;
|
||||
|
||||
assert(str.constructor === strObj.constructor);
|
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-014.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-014.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 str = "";
|
||||
var strObj = new String;
|
||||
|
||||
assert(str == strObj);
|
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-015.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-015.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 str = "";
|
||||
var strObj = new String;
|
||||
|
||||
assert(str !== strObj);
|
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-016.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-016.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 str = "";
|
||||
var strObj = new String;
|
||||
|
||||
assert(typeof str != typeof strObj);
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-017.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.04/08.04-017.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 __str__ = "\u0041\u0042\u0043" + 'ABC'
|
||||
assert(__str__ === 'ABCABC');
|
16
third_party/jerryscript/tests/jerry-test-suite/08/08.05/08.05-001.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/08/08.05/08.05-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.
|
||||
|
||||
a = 0x3e7;
|
||||
assert(a == 999);
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.05/08.05-002.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.05/08.05-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 -Infinity == 'number');
|
15
third_party/jerryscript/tests/jerry-test-suite/08/08.05/08.05-003.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/08/08.05/08.05-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(0 > -Infinity);
|
26
third_party/jerryscript/tests/jerry-test-suite/08/08.12/08.12.02/08.12.02-001.js
vendored
Normal file
26
third_party/jerryscript/tests/jerry-test-suite/08/08.12/08.12.02/08.12.02-001.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 prot = {
|
||||
b: 3
|
||||
};
|
||||
|
||||
function Custom() {
|
||||
}
|
||||
|
||||
Custom.prototype = prot;
|
||||
|
||||
var obj = new Custom();
|
||||
|
||||
assert(obj.b === 3);
|
23
third_party/jerryscript/tests/jerry-test-suite/10/10.03/10.03.01/10.03.01-001.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/10/10.03/10.03.01/10.03.01-001.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.
|
||||
|
||||
a = 10;
|
||||
|
||||
function foo() {
|
||||
var b = 20;
|
||||
|
||||
assert(a + b === 30);
|
||||
}
|
||||
|
||||
foo();
|
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-001.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-001.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 = {
|
||||
b: 5
|
||||
};
|
||||
|
||||
assert(a.b === 5);
|
||||
|
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-002.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-002.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 = {
|
||||
"b": 5
|
||||
};
|
||||
|
||||
assert(a.b === 5);
|
||||
|
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-003.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-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 = {
|
||||
10: 5
|
||||
};
|
||||
|
||||
assert(a[10] === 5);
|
||||
|
19
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-004.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-004.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 = {
|
||||
10.25: 5
|
||||
};
|
||||
|
||||
assert(a[10.25] === 5);
|
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-005.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-005.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 = {
|
||||
prop1: 1,
|
||||
prop2: 2
|
||||
};
|
||||
|
||||
assert(a.prop1 === 1 && a.prop2 === 2);
|
21
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-006.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-006.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 a = {
|
||||
get a() {
|
||||
return 3;
|
||||
}
|
||||
};
|
||||
|
||||
assert(a.a === 3);
|
25
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-007.js
vendored
Normal file
25
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-007.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 a = {
|
||||
_a: 3,
|
||||
get a() {
|
||||
return this._a;
|
||||
}
|
||||
};
|
||||
|
||||
a._a = 5;
|
||||
|
||||
assert(a.a === 5);
|
||||
|
29
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-008.js
vendored
Normal file
29
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-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 a = {
|
||||
_a: 3,
|
||||
get a() {
|
||||
return this._a;
|
||||
},
|
||||
set a(newa) {
|
||||
this._a = newa;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
a.a = 5;
|
||||
|
||||
assert(a.a === 5);
|
||||
|
23
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-001.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-001.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 = [1, 2, 4];
|
||||
var cnt = 0;
|
||||
|
||||
for (var i = (0 in a) ? 1 : 2; i < 10; ++i)
|
||||
{
|
||||
++cnt;
|
||||
}
|
||||
|
||||
assert(cnt == 9);
|
17
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-002.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-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 a = 1;
|
||||
var b = 2;
|
||||
assert(a + b === (a + b));
|
18
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-003.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.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 a = 2;
|
||||
var b = 3;
|
||||
|
||||
assert((a) + (b) === (a + b));
|
28
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-004.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-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.
|
||||
|
||||
a = {
|
||||
n: Number,
|
||||
s: String
|
||||
};
|
||||
b = {
|
||||
n: Number,
|
||||
s: String
|
||||
};
|
||||
a.n = 1;
|
||||
b.n = 2;
|
||||
a.s = "qwe";
|
||||
b.s = "rty";
|
||||
|
||||
assert(((a).n + (b).n === 3) && ((a).s + (b).s === "qwerty"));
|
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-005.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-005.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.
|
||||
|
||||
a = {
|
||||
n: Number,
|
||||
s: String
|
||||
}
|
||||
|
||||
assert(delete(a.n) === true);
|
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-006.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-006.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.
|
||||
|
||||
a = {
|
||||
n: Number,
|
||||
s: String
|
||||
}
|
||||
|
||||
assert(typeof (a.property) === "undefined");
|
15
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-009.js
vendored
Normal file
15
third_party/jerryscript/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-009.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 (a) === "undefined");
|
17
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-001.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-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 = {name: "name", value: "1"};
|
||||
|
||||
assert(a.name !== "nameeeeeeeeeee");
|
18
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-002.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.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 = {name: "name", value: "1"};
|
||||
var b = {name: "b", value: "1"};
|
||||
|
||||
assert((a.name == b.name) || (a.value == b.value));
|
17
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-003.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-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 = {name: "name", value: "1"};
|
||||
|
||||
assert(a[1] !== "nameeeeeeeeeee");
|
18
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-004.js
vendored
Normal file
18
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-004.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 name = "name"
|
||||
var a = {name: "name", value: "1"};
|
||||
|
||||
assert(a[name] == "name");
|
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-007.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.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.
|
||||
|
||||
var a = {name: "a", value: "1"};
|
||||
var b = {name: "b", value: "1"};
|
||||
assert(plus(a, b) !== 2)
|
||||
|
||||
function plus(a, b)
|
||||
{
|
||||
return a.value + b.value;
|
||||
}
|
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-008.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-008.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 = {name: "a", value: "1"};
|
||||
var b = {name: "b", value: "1"};
|
||||
|
||||
assert(isNaN(plus(a, b)));
|
||||
|
||||
function plus(a, b)
|
||||
{
|
||||
return a.value * b.name;
|
||||
}
|
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-009.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-009.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 = {name: "a", value: "1"};
|
||||
var b = {name: "b", value: "1"};
|
||||
|
||||
assert(plus(a, b) === "11");
|
||||
|
||||
function plus(a, b)
|
||||
{
|
||||
return a.value + b.value;
|
||||
}
|
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-010.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-010.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 = {name: "a", value: "1"};
|
||||
var b = {name: "b", value: 1};
|
||||
|
||||
assert(plus(a, b) === "11");
|
||||
|
||||
function plus(a, b)
|
||||
{
|
||||
return a.value + b.value;
|
||||
}
|
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-011.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-011.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 = {name: "a", value: 1};
|
||||
var b = {name: "b", value: 1};
|
||||
|
||||
assert(plus(a, b) === 2);
|
||||
|
||||
function plus(a, b)
|
||||
{
|
||||
return a.value + b.value;
|
||||
}
|
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-001.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-001.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.
|
||||
|
||||
function Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
}
|
||||
|
||||
var animal = new Animal("animal");
|
||||
assert(animal.name === "animal");
|
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-002.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-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.
|
||||
|
||||
function Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
}
|
||||
|
||||
var animal = new Animal("animal");
|
||||
assert(animal.name == "animal");
|
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-003.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-003.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.
|
||||
|
||||
function Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
}
|
||||
|
||||
var animal = new Animal("animal");
|
||||
assert(animal.name != "insect");
|
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-004.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-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.
|
||||
|
||||
function Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
}
|
||||
|
||||
var animal = new Animal("animal");
|
||||
assert(animal.someparameter != "insect");
|
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-005.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-005.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.
|
||||
|
||||
function Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
}
|
||||
|
||||
var animal = new Animal("animal");
|
||||
assert(animal[1] != "animal");
|
27
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-006.js
vendored
Normal file
27
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-006.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 Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
if (name == "bird")
|
||||
{
|
||||
this.canFly = true;
|
||||
}
|
||||
}
|
||||
|
||||
var animal = new Animal("animal");
|
||||
var bird = new Animal("bird");
|
||||
assert(animal.canFly !== bird.canFly);
|
32
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-007.js
vendored
Normal file
32
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-007.js
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
// 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 Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
if (name == "bird")
|
||||
{
|
||||
this.canFly = true;
|
||||
}
|
||||
}
|
||||
|
||||
var animal = new Animal("animal");
|
||||
var bird = new Animal("bird");
|
||||
|
||||
assert(animal.canWalk === true);
|
||||
assert(bird.canWalk === true);
|
||||
assert(animal.canFly === undefined);
|
||||
assert(bird.canFly === true);
|
||||
|
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-008.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-008.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.
|
||||
|
||||
function Animal(name)
|
||||
{
|
||||
this.name = name
|
||||
this.canWalk = true
|
||||
}
|
||||
|
||||
var animal = new Animal();
|
||||
|
||||
assert(animal.canWalk);
|
17
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-009.js
vendored
Normal file
17
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-009.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 = {};
|
||||
a.b = true;
|
||||
assert(typeof a == "object" && a.b == 1);
|
16
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-006.js
vendored
Normal file
16
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-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 = {};
|
||||
a.toString();
|
19
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-007.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-007.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.
|
||||
|
||||
function foo()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
assert(foo() === 1);
|
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-008.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-008.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;
|
||||
}
|
||||
}
|
||||
|
||||
assert(a.foo() === 1);
|
25
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-017.js
vendored
Normal file
25
third_party/jerryscript/tests/jerry-test-suite/11/11.02/11.02.03/11.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 obj = {
|
||||
field: Number,
|
||||
foo: function () {
|
||||
this.field++;
|
||||
}
|
||||
}
|
||||
|
||||
obj.field = 3;
|
||||
obj.foo();
|
||||
|
||||
assert(obj.field === 4);
|
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