mirror of
https://github.com/google/pebble.git
synced 2025-06-26 19:06:17 +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
26
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-001.js
vendored
Normal file
26
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-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 sum = 0;
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
if (i === 5)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
sum += i;
|
||||
}
|
||||
|
||||
assert(sum === 40);
|
25
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-002.js
vendored
Normal file
25
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-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 sum = 0;
|
||||
for (var i = 0; i < 10; i++)
|
||||
for (var j = 0; j < 20; j++)
|
||||
{
|
||||
if (j > 9)
|
||||
continue;
|
||||
|
||||
sum += 1;
|
||||
}
|
||||
|
||||
assert(sum === 100);
|
38
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-003.js
vendored
Normal file
38
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-003.js
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT 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 = {p1: 1, p2: 2, p3: {p1: 100, p2: 200, p3: 100}, p4: 4, p5: 5}, sum = 0;
|
||||
|
||||
top:
|
||||
for (var p in o)
|
||||
{
|
||||
if (p === "p2")
|
||||
continue;
|
||||
|
||||
if (typeof (o[p]) === "object")
|
||||
{
|
||||
for (var pp in o[p])
|
||||
{
|
||||
if (pp === "p2")
|
||||
continue top;
|
||||
|
||||
sum += o[p][pp];
|
||||
}
|
||||
}
|
||||
|
||||
sum += 20;
|
||||
|
||||
}
|
||||
|
||||
assert(sum === 160);
|
25
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-004.js
vendored
Normal file
25
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-004.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 o = {a: 1, b: 2, c: 3};
|
||||
|
||||
ForLabel:
|
||||
for (var p in o)
|
||||
{
|
||||
if (p === "b")
|
||||
continue ForLabel;
|
||||
o[p] += 4;
|
||||
}
|
||||
|
||||
assert(o.a === 5 && o.b === 2 && o.c === 7);
|
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-005.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-005.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 sum = 0;
|
||||
|
||||
ForLabel:
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
if (i === 5)
|
||||
{
|
||||
continue ForLabel;
|
||||
}
|
||||
|
||||
sum += i;
|
||||
}
|
||||
|
||||
assert(sum === 40);
|
30
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-006.js
vendored
Normal file
30
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-006.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 sum = 0;
|
||||
top:
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
for (var j = 0; j < 20; j++)
|
||||
{
|
||||
if (j > 9 && i % 2)
|
||||
continue top;
|
||||
|
||||
sum += 1;
|
||||
}
|
||||
|
||||
sum += 1;
|
||||
}
|
||||
|
||||
assert(sum === 155);
|
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-007.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-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 mask = 0xff0f;
|
||||
var numZeroes = 0;
|
||||
|
||||
while (mask)
|
||||
{
|
||||
mask >>= 1;
|
||||
|
||||
if (mask & 1)
|
||||
continue;
|
||||
|
||||
numZeroes++;
|
||||
}
|
||||
|
||||
assert(numZeroes === 5);
|
33
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-008.js
vendored
Normal file
33
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-008.js
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var i = 10;
|
||||
var cnt = 0;
|
||||
|
||||
while (i-- > 0)
|
||||
{
|
||||
if (i % 2)
|
||||
continue;
|
||||
|
||||
var j = 0;
|
||||
while (j++ < 20)
|
||||
{
|
||||
if (j % 2 === 0)
|
||||
continue;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
assert(cnt === 50);
|
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-009.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-009.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 sum = 0, i = 0;
|
||||
|
||||
WhileLabel:
|
||||
while (++i < 10)
|
||||
{
|
||||
if (i === 5)
|
||||
{
|
||||
continue WhileLabel;
|
||||
}
|
||||
|
||||
sum += i;
|
||||
}
|
||||
|
||||
assert(sum === 40);
|
32
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-010.js
vendored
Normal file
32
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-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 sum = 0;
|
||||
var i = 0, j = 0;
|
||||
top:
|
||||
while (i++ < 10)
|
||||
{
|
||||
j = 0;
|
||||
while (j++ < 20)
|
||||
{
|
||||
if (j > 9 && i % 2)
|
||||
continue top;
|
||||
|
||||
sum += 1;
|
||||
}
|
||||
|
||||
sum += 1;
|
||||
}
|
||||
|
||||
assert(sum === 150);
|
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-011.js
vendored
Normal file
28
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-011.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 mask = 0xff0f;
|
||||
var numZeroes = 0;
|
||||
|
||||
do
|
||||
{
|
||||
mask >>= 1;
|
||||
|
||||
if (mask & 1)
|
||||
continue;
|
||||
|
||||
numZeroes++;
|
||||
} while (mask);
|
||||
|
||||
assert(numZeroes === 5);
|
34
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-012.js
vendored
Normal file
34
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-012.js
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT 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 = 10;
|
||||
var cnt = 0;
|
||||
|
||||
do
|
||||
{
|
||||
if (i % 2)
|
||||
continue;
|
||||
|
||||
var j = 0;
|
||||
do
|
||||
{
|
||||
if (j % 2 === 0)
|
||||
continue;
|
||||
cnt++;
|
||||
}
|
||||
while (j++ < 20)
|
||||
}
|
||||
while (i-- > 0);
|
||||
|
||||
assert(cnt === 60);
|
29
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-013.js
vendored
Normal file
29
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-013.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 sum = 0, i = 0;
|
||||
|
||||
DoWhileLabel:
|
||||
do
|
||||
{
|
||||
if (i === 5)
|
||||
{
|
||||
continue DoWhileLabel;
|
||||
}
|
||||
|
||||
sum += i;
|
||||
}
|
||||
while (++i < 10);
|
||||
|
||||
assert(sum === 40);
|
35
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-014.js
vendored
Normal file
35
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-014.js
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
var sum = 0;
|
||||
var i = 0, j = 0;
|
||||
top:
|
||||
do
|
||||
{
|
||||
j = 0;
|
||||
|
||||
do
|
||||
{
|
||||
if (j > 9 && i % 2)
|
||||
continue top;
|
||||
|
||||
sum += 1;
|
||||
}
|
||||
while (j++ < 20);
|
||||
|
||||
sum += 1;
|
||||
}
|
||||
while (i++ < 10);
|
||||
|
||||
assert(sum === 182);
|
26
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-015.js
vendored
Normal file
26
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-015.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 = {p1: 1, p2: 2, p3: 3, p4: 4, p5: 5}, sum = 0;
|
||||
for (var p in o)
|
||||
{
|
||||
if (p == "p3")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
sum += o[p];
|
||||
}
|
||||
|
||||
assert(sum == 12)
|
36
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-016.js
vendored
Normal file
36
third_party/jerryscript/tests/jerry-test-suite/12/12.07/12.07-016.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 o = {p1: 1, p2: 2, p3: {p1: 100, p2: 200}, p4: 4, p5: 5}, sum = 0;
|
||||
for (var p in o)
|
||||
{
|
||||
if (p === "p2")
|
||||
continue;
|
||||
|
||||
if (typeof (o[p]) === "object")
|
||||
{
|
||||
for (var pp in o[p])
|
||||
{
|
||||
if (pp === "p2")
|
||||
continue;
|
||||
|
||||
sum += o[p][pp];
|
||||
}
|
||||
}
|
||||
else {
|
||||
sum += o[p];
|
||||
}
|
||||
}
|
||||
|
||||
assert(sum === 110);
|
Loading…
Add table
Add a link
Reference in a new issue