mirror of
https://github.com/google/pebble.git
synced 2025-11-24 16:22:25 -05:00
Import of the watch repository from Pebble
This commit is contained in:
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);
|
||||
Reference in New Issue
Block a user