From f2760fdac62bee6d63119125d8308ce09f3de46c Mon Sep 17 00:00:00 2001 From: "e.gavrin" Date: Wed, 8 Oct 2014 15:05:37 +0400 Subject: [PATCH] Add test from chapter 11. Part2. --- tests/jerry-test-suite/11/11.12/11.12-001.js | 20 +++++++++++++++ tests/jerry-test-suite/11/11.12/11.12-002.js | 23 +++++++++++++++++ tests/jerry-test-suite/11/11.12/11.12-003.js | 23 +++++++++++++++++ tests/jerry-test-suite/11/11.12/11.12-004.js | 24 ++++++++++++++++++ tests/jerry-test-suite/11/11.12/11.12-005.js | 24 ++++++++++++++++++ tests/jerry-test-suite/11/11.12/11.12-008.js | 24 ++++++++++++++++++ tests/jerry-test-suite/11/11.12/11.12-012.js | 24 ++++++++++++++++++ .../11/11.13/11.13.01/11.13.01-001.js | 19 ++++++++++++++ .../11/11.13/11.13.02/11.13.02-001.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-002.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-003.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-004.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-005.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-006.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-007.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-008.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-009.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-010.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-011.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-012.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-013.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-014.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-039.js | 18 +++++++++++++ .../11/11.13/11.13.02/11.13.02-040.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-041.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-042.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-043.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-044.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-045.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-046.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-047.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-048.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-049.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-050.js | 25 +++++++++++++++++++ .../11/11.13/11.13.02/11.13.02-051.js | 25 +++++++++++++++++++ tests/jerry-test-suite/11/11.14/11.14-001.js | 17 +++++++++++++ tests/jerry-test-suite/11/11.14/11.14-002.js | 19 ++++++++++++++ 37 files changed, 787 insertions(+) create mode 100644 tests/jerry-test-suite/11/11.12/11.12-001.js create mode 100644 tests/jerry-test-suite/11/11.12/11.12-002.js create mode 100644 tests/jerry-test-suite/11/11.12/11.12-003.js create mode 100644 tests/jerry-test-suite/11/11.12/11.12-004.js create mode 100644 tests/jerry-test-suite/11/11.12/11.12-005.js create mode 100644 tests/jerry-test-suite/11/11.12/11.12-008.js create mode 100644 tests/jerry-test-suite/11/11.12/11.12-012.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.01/11.13.01-001.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-001.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-002.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-003.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-004.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-005.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-006.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-007.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-008.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-009.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-010.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-011.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-012.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-013.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-014.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-039.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-040.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-041.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-042.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-043.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-044.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-045.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-046.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-047.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-048.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-049.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-050.js create mode 100644 tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-051.js create mode 100644 tests/jerry-test-suite/11/11.14/11.14-001.js create mode 100644 tests/jerry-test-suite/11/11.14/11.14-002.js diff --git a/tests/jerry-test-suite/11/11.12/11.12-001.js b/tests/jerry-test-suite/11/11.12/11.12-001.js new file mode 100644 index 000000000..4f528bf2d --- /dev/null +++ b/tests/jerry-test-suite/11/11.12/11.12-001.js @@ -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 = 5; +var b = 3; + +var c = (a > b) ? 12 : 14; + +assert(c == 12) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.12/11.12-002.js b/tests/jerry-test-suite/11/11.12/11.12-002.js new file mode 100644 index 000000000..7d08daaed --- /dev/null +++ b/tests/jerry-test-suite/11/11.12/11.12-002.js @@ -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; +var b = 2; +var c = 3; + +var d; + +d = a < b ? b < c ? 5 : 10 : 15; + +assert(d == 5) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.12/11.12-003.js b/tests/jerry-test-suite/11/11.12/11.12-003.js new file mode 100644 index 000000000..b2c65ae87 --- /dev/null +++ b/tests/jerry-test-suite/11/11.12/11.12-003.js @@ -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; +var b = 2; +var c = 3; + +var d; + +d = a > b ? 5 : b < c ? 10 : 15; + +assert(d == 10) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.12/11.12-004.js b/tests/jerry-test-suite/11/11.12/11.12-004.js new file mode 100644 index 000000000..c0892fe7b --- /dev/null +++ b/tests/jerry-test-suite/11/11.12/11.12-004.js @@ -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 a = 1; +var b = 2; +var c = 1; +var d = 1; + +var e; + +e = (a < b) ? (c = 100) : (d = 10); + +assert(c == 100 && e == 100 && d == 1) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.12/11.12-005.js b/tests/jerry-test-suite/11/11.12/11.12-005.js new file mode 100644 index 000000000..3194183fd --- /dev/null +++ b/tests/jerry-test-suite/11/11.12/11.12-005.js @@ -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 a = 1; +var b = 2; +var c = 1; +var d = 1; + +var e; + +e = (a > b) ? (c = 100) : (d = 10); + +assert(c == 1 && e == 10 && d == 10) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.12/11.12-008.js b/tests/jerry-test-suite/11/11.12/11.12-008.js new file mode 100644 index 000000000..f948e8da0 --- /dev/null +++ b/tests/jerry-test-suite/11/11.12/11.12-008.js @@ -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 cond = 23; +var a = [1, 2, 4]; +var cnt = 0; + +for (var i = (cond < 24) ? 0 in a : 2; i < 10; ++i) +{ + ++cnt; +} + +assert(cnt == 9) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.12/11.12-012.js b/tests/jerry-test-suite/11/11.12/11.12-012.js new file mode 100644 index 000000000..e2b817d7e --- /dev/null +++ b/tests/jerry-test-suite/11/11.12/11.12-012.js @@ -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 cond = 12; +var res; + +res = (cond < 13) + ? + 1 + : + 2; + +assert(res == 1) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.01/11.13.01-001.js b/tests/jerry-test-suite/11/11.13/11.13.01/11.13.01-001.js new file mode 100644 index 000000000..879c8ab9a --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.01/11.13.01-001.js @@ -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 = 5; +var b; + +b = a; +assert(b == 5) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-001.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-001.js new file mode 100644 index 000000000..772e5ac9c --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-001.js @@ -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 = 1; +var b = 2; +a += b; +assert(a === 3); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-002.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-002.js new file mode 100644 index 000000000..7ccc8780a --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-002.js @@ -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 = 1; +var b = "2"; +a += b; +assert(a === "12") \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-003.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-003.js new file mode 100644 index 000000000..7d827bf9c --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-003.js @@ -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 = "1"; +var b = 2; +a += b; +assert(a === "12") diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-004.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-004.js new file mode 100644 index 000000000..f8bbb4d0b --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-004.js @@ -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 = "1"; +var b = "2"; +a += b; +assert(a === "12") \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-005.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-005.js new file mode 100644 index 000000000..2f56280ed --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-005.js @@ -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 = true; +var b = false; +a += b; +assert(a === 1) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-006.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-006.js new file mode 100644 index 000000000..85b7e9e4a --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-006.js @@ -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 = 1; +var b = null; +a += b; +assert(a === 1) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-007.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-007.js new file mode 100644 index 000000000..a92fc5e11 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-007.js @@ -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 = 3; +var _a = a; +var b = 7; +assert((a += b) === (_a + b)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-008.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-008.js new file mode 100644 index 000000000..b907fd760 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-008.js @@ -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 = 5; +var _a = a; +var b = 10; +assert((a -= b) === (_a - b)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-009.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-009.js new file mode 100644 index 000000000..82494eddf --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-009.js @@ -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 = 10; +var _a = a; +var b = 1.5; +assert((a *= b) === (_a * b)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-010.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-010.js new file mode 100644 index 000000000..d1f308042 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-010.js @@ -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 = 1; +var _a = a; +var b = 10.6; +assert((a /= b) === (_a / b)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-011.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-011.js new file mode 100644 index 000000000..aca1fb66c --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-011.js @@ -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 = 102; +var _a = a; +var b = 10; +assert(((a %= b) === (_a % b)) && (a === (_a % b))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-012.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-012.js new file mode 100644 index 000000000..40e207e5e --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-012.js @@ -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 = 0xffffffff; +var _a = a; +var b = 4; +assert(a >>= b === _a >> b) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-013.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-013.js new file mode 100644 index 000000000..7fc558199 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-013.js @@ -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 = 0xffffffff; +var _a = a; +var b = 4; +assert(a <<= b === _a << b) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-014.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-014.js new file mode 100644 index 000000000..aed074751 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-014.js @@ -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 = 0xffffffff; +var _a = a; +var b = 4; +assert(a >>>= b === _a >>> b) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-039.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-039.js new file mode 100644 index 000000000..f7bc4ca40 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-039.js @@ -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 = 4; +var _a = a; +var b = 10; +assert((a %= b) === (_a % b)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-040.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-040.js new file mode 100644 index 000000000..13cd5ef02 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-040.js @@ -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. + +object = { + valueOf: function () { + return 1 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object *= 2) === (copyObject * 2)) && (object === (copyObject * 2))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-041.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-041.js new file mode 100644 index 000000000..12d1e416f --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-041.js @@ -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. + +object = { + valueOf: function () { + return 1 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object += 2) === (copyObject + 2)) && (object === (copyObject + 2))) diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-042.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-042.js new file mode 100644 index 000000000..89cf0b01b --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-042.js @@ -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. + +object = { + valueOf: function () { + return 15 + }, + toString: function () { + return "" + } +} + +copyObject = object; +assert(((object -= 2) === (copyObject - 2)) && (object === (copyObject - 2))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-043.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-043.js new file mode 100644 index 000000000..6bd96e34a --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-043.js @@ -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. + +object = { + valueOf: function () { + return 178 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object /= 2) === (copyObject / 2)) && (object === (copyObject / 2))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-044.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-044.js new file mode 100644 index 000000000..c3e770bc3 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-044.js @@ -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. + +object = { + valueOf: function () { + return 1345 + }, + toString: function () { + return "foo" + } +} + +copyObject = object; +assert(((object %= 2) === (copyObject % 2)) && (object === (copyObject % 2))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-045.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-045.js new file mode 100644 index 000000000..b53fc8510 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-045.js @@ -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. + +object = { + valueOf: function () { + return 16 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object <<= 2) === (copyObject << 2)) && (object === (copyObject << 2))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-046.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-046.js new file mode 100644 index 000000000..0208dd756 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-046.js @@ -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. + +object = { + valueOf: function () { + return 16 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object >>= 2) === (copyObject >> 2)) && (object === (copyObject >> 2))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-047.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-047.js new file mode 100644 index 000000000..58ad00ec2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-047.js @@ -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. + +object = { + valueOf: function () { + return 16 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object >>>= 2) === (copyObject >>> 2)) && (object === (copyObject >>> 2))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-048.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-048.js new file mode 100644 index 000000000..f8cb22ba6 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-048.js @@ -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. + +object = { + valueOf: function () { + return 1 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object &= 1) === (copyObject & 1)) && (object === (copyObject & 1))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-049.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-049.js new file mode 100644 index 000000000..50ebfdac3 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-049.js @@ -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. + +object = { + valueOf: function () { + return 1 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object |= 1) === (copyObject | 1)) && (object === (copyObject | 1))) diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-050.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-050.js new file mode 100644 index 000000000..b66e89ead --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-050.js @@ -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. + +object = { + valueOf: function () { + return 1 + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object ^= 1) === (copyObject ^ 1)) && (object === (copyObject ^ 1))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-051.js b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-051.js new file mode 100644 index 000000000..be40683a2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.13/11.13.02/11.13.02-051.js @@ -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. + +object = { + valueOf: function () { + return "12" + }, + toString: function () { + return 0 + } +} + +copyObject = object; +assert(((object += 3) === (copyObject + 3)) && (object === (copyObject + 3))) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.14/11.14-001.js b/tests/jerry-test-suite/11/11.14/11.14-001.js new file mode 100644 index 000000000..bb0298bed --- /dev/null +++ b/tests/jerry-test-suite/11/11.14/11.14-001.js @@ -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 res = (33, false, 73.234, 100); + +assert(res == 100); diff --git a/tests/jerry-test-suite/11/11.14/11.14-002.js b/tests/jerry-test-suite/11/11.14/11.14-002.js new file mode 100644 index 000000000..133bfd496 --- /dev/null +++ b/tests/jerry-test-suite/11/11.14/11.14-002.js @@ -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, c, res; + +res = (a = 39, b = null, c = 12.5); + +assert(a == 39 && b == null && c == 12.5 && res == 12.5)