mirror of
https://github.com/google/pebble.git
synced 2025-06-23 17:46:16 +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
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-001.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-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 cnt = 1;
|
||||
do
|
||||
cnt++;
|
||||
while (cnt < 10);
|
||||
|
||||
assert(cnt === 10);
|
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-002.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-002.js
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var cnt = 1;
|
||||
do
|
||||
{
|
||||
cnt++;
|
||||
if (cnt === 42) {
|
||||
break;
|
||||
}
|
||||
} while (true);
|
24
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-003.js
vendored
Normal file
24
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-003.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var cnt = 1;
|
||||
do {
|
||||
cnt++;
|
||||
|
||||
if (cnt === 10)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (0, 1);
|
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-004.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-004.js
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var obj = new Object();
|
||||
obj.x = "defined";
|
||||
do
|
||||
{
|
||||
delete obj.x;
|
||||
}
|
||||
while (obj.x !== undefined);
|
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-005.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-005.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 x = 1 / 3;
|
||||
do
|
||||
{
|
||||
x = 1;
|
||||
}
|
||||
while (x === 3 / 9);
|
||||
assert (x === 1);
|
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-006.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-006.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 cnt = 1;
|
||||
do
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
while (false);
|
||||
|
||||
assert(cnt === 2);
|
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-007.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.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 cnt = 1;
|
||||
do
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
while (!"string");
|
||||
|
||||
assert(cnt === 2);
|
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-008.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-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 cnt = 0;
|
||||
do
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
while (!(cnt & 0x8000));
|
||||
|
||||
assert(cnt == 32768);
|
25
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-009.js
vendored
Normal file
25
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-009.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 cnt = 0;
|
||||
do
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
while
|
||||
(cnt < 10
|
||||
);
|
||||
|
||||
assert(cnt === 10);
|
||||
|
32
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-010.js
vendored
Normal file
32
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.01/12.06.01-010.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 cnt = 0;
|
||||
|
||||
function test()
|
||||
{
|
||||
do
|
||||
{
|
||||
cnt++;
|
||||
if (cnt === 8)
|
||||
return 1;
|
||||
}
|
||||
while (cnt < 10);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
var r = test();
|
||||
|
||||
assert(cnt === 8 && r === 1);
|
19
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-001.js
vendored
Normal file
19
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-001.js
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var cnt = 25;
|
||||
while (cnt)
|
||||
cnt--;
|
||||
|
||||
assert(cnt === 0);
|
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-002.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-002.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 cnt = 0;
|
||||
|
||||
while (1) {
|
||||
cnt++;
|
||||
if (cnt === 10)
|
||||
break;
|
||||
}
|
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-003.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.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.
|
||||
|
||||
var cnt = 0;
|
||||
while ((1234 - 34) % 23 - 1234 * 23.222)
|
||||
{
|
||||
cnt++;
|
||||
if (cnt === 10)
|
||||
break;
|
||||
}
|
||||
|
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-004.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-004.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 cnt = 33;
|
||||
|
||||
while ("")
|
||||
cnt /= 2;
|
||||
|
||||
assert(cnt === 33);
|
23
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-005.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-005.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var bVal = true;
|
||||
var val = "test";
|
||||
|
||||
while (!bVal)
|
||||
{
|
||||
val += " of while";
|
||||
}
|
||||
|
||||
assert(val === "test");
|
23
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-006.js
vendored
Normal file
23
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-006.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var bitField = 0x1000000;
|
||||
var cnt = 0;
|
||||
|
||||
while (bitField >>= 1)
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
|
||||
assert(cnt === 24);
|
28
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-007.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-007.js
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
var bitField = 0x1000000;
|
||||
var cnt = 0;
|
||||
|
||||
while
|
||||
(
|
||||
bitField >>= 1 &&
|
||||
true
|
||||
)
|
||||
{
|
||||
cnt++;
|
||||
}
|
||||
|
||||
assert(cnt === 24);
|
30
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-008.js
vendored
Normal file
30
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.02/12.06.02-008.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 cnt = 25;
|
||||
|
||||
function test()
|
||||
{
|
||||
while (cnt)
|
||||
{
|
||||
cnt--;
|
||||
if (cnt === 3)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = test();
|
||||
|
||||
assert(cnt === 3 && r === 1);
|
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-001.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-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 cnt = 1;
|
||||
|
||||
for (var i = 0; i < 10; i++)
|
||||
cnt++;
|
||||
|
||||
assert(cnt === 11 && i === 10);
|
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-002.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-002.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 cond = 1.999;
|
||||
var cnt = 0;
|
||||
|
||||
for (; cond < 10.333; cond += 1.121)
|
||||
cnt++;
|
||||
|
||||
assert(cnt == 8);
|
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-003.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-003.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 i;
|
||||
|
||||
for (i = 0; ; i += 5)
|
||||
{
|
||||
if (i === 100)
|
||||
break;
|
||||
}
|
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-004.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-004.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 i;
|
||||
|
||||
for (i = 1; i < 20; )
|
||||
i *= 2;
|
||||
|
||||
assert(i === 32);
|
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-005.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-005.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 i = 0;
|
||||
for (; ; )
|
||||
{
|
||||
if (i++ === 100)
|
||||
break;
|
||||
}
|
||||
|
24
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-006.js
vendored
Normal file
24
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-006.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var sum = 0;
|
||||
for (var i = 1; i <= 10; i++)
|
||||
{
|
||||
for (var j = 1; j <= 5; j++)
|
||||
{
|
||||
sum += i * j;
|
||||
}
|
||||
}
|
||||
|
||||
assert(sum === 825);
|
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-007.js
vendored
Normal file
21
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-007.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 sum = 0;
|
||||
for (var i = 1, j = 1, k = 1; i + j + k <= 100; i++, j += 2, k += 3)
|
||||
{
|
||||
sum += i + j + k;
|
||||
}
|
||||
|
||||
assert(sum == 867);
|
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-008.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-008.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 sum = 1;
|
||||
|
||||
for (var i = 0; i < 10; i++, sum *= i)
|
||||
;
|
||||
|
||||
assert(sum === 3628800);
|
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-009.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-009.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 init;
|
||||
|
||||
for (init = (129 - 8) / 11; init != 11; )
|
||||
{
|
||||
init = 33;
|
||||
}
|
||||
|
||||
assert(init == 11);
|
27
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-010.js
vendored
Normal file
27
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-010.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.
|
||||
|
||||
for
|
||||
(
|
||||
var i = 0
|
||||
;
|
||||
i < 10
|
||||
;
|
||||
i++
|
||||
)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
||||
assert(i == 10);
|
30
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-011.js
vendored
Normal file
30
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.03/12.06.03-011.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 i;
|
||||
|
||||
function test()
|
||||
{
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
if (i === 4)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
var r = test();
|
||||
|
||||
assert(r === 1 && i === 4);
|
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-001.js
vendored
Normal file
22
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-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.
|
||||
|
||||
var o = {a: 1, b: 2, c: 3};
|
||||
|
||||
for (var p in o)
|
||||
{
|
||||
o[p] += 4;
|
||||
}
|
||||
|
||||
assert(o.a === 5 && o.b === 6 && o.c === 7);
|
25
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-002.js
vendored
Normal file
25
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-002.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 = new Array(1, 2, 3, 4, 5, 6, 7);
|
||||
a.eight = 8;
|
||||
|
||||
var p;
|
||||
for (p in a)
|
||||
{
|
||||
a[p] += 1;
|
||||
}
|
||||
|
||||
assert(a[0] === 2 && a[1] === 3 && a[2] === 4 && a[3] === 5 &&
|
||||
a[4] === 6 && a[5] === 7 && a[6] === 8 && a['eight'] === 9);
|
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-003.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-003.js
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var a = null;
|
||||
|
||||
for (var p in a)
|
||||
{
|
||||
assert(false);
|
||||
}
|
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-004.js
vendored
Normal file
20
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-004.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;
|
||||
|
||||
for (var p in a)
|
||||
{
|
||||
assert(false);
|
||||
}
|
31
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-005.js
vendored
Normal file
31
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-005.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 b = {basep: "base"};
|
||||
|
||||
function dConstr()
|
||||
{
|
||||
this.derivedp = "derived";
|
||||
}
|
||||
dConstr.prototype = b;
|
||||
|
||||
var d = new dConstr();
|
||||
|
||||
for (var p in d)
|
||||
{
|
||||
d[p] += "A";
|
||||
}
|
||||
|
||||
assert(d.basep === "baseA" && d.derivedp === "derivedA");
|
26
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-006.js
vendored
Normal file
26
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-006.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 o = {a: 1, b: 2, c: 3};
|
||||
|
||||
for
|
||||
(
|
||||
var
|
||||
p in o
|
||||
)
|
||||
{
|
||||
o[p] += 4;
|
||||
}
|
||||
|
||||
assert(o.a === 5 && o.b === 6 && o.c === 7);
|
32
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-007.js
vendored
Normal file
32
third_party/jerryscript/tests/jerry-test-suite/12/12.06/12.06.04/12.06.04-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.
|
||||
|
||||
var o = {a: 1, b: 2, c: 3, d: 4, e: 5};
|
||||
|
||||
function test()
|
||||
{
|
||||
for (var p in o)
|
||||
{
|
||||
if (p === 'c')
|
||||
return 1;
|
||||
|
||||
o[p] += 4;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
var r = test();
|
||||
|
||||
assert(((o.a === 5 && o.b === 6 && o.c === 3) ||
|
||||
(o.c === 3 && o.d === 8 && o.e === 9)) && r === 1);
|
Loading…
Add table
Add a link
Reference in a new issue