diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-001.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-001.js new file mode 100644 index 000000000..1991f571e --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-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 = { + b: 5 +}; + +assert(a.b === 5); + diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-002.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-002.js new file mode 100644 index 000000000..716eaea8b --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-002.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 = { + "b": 5 +}; + +assert(a.b === 5); + diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-003.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-003.js new file mode 100644 index 000000000..f22ae9b58 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-003.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 = { + 10: 5 +}; + +assert(a[10] === 5); + diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-004.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-004.js new file mode 100644 index 000000000..705ebcae7 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-004.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 = { + 10.25: 5 +}; + +assert(a[10.25] === 5); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-005.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-005.js new file mode 100644 index 000000000..79f2d4f65 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-005.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 = { + prop1: 1, + prop2: 2 +}; + +assert(a.prop1 === 1 && a.prop2 === 2); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-006.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-006.js new file mode 100644 index 000000000..958cff8e4 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-006.js @@ -0,0 +1,21 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = { + get a() { + return 3; + } +}; + +assert(a.a === 3); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-007.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-007.js new file mode 100644 index 000000000..f2af96bcb --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-007.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. + +var a = { + _a: 3, + get a() { + return this._a; + } +}; + +a._a = 5; + +assert(a.a === 5); + diff --git a/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-008.js b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-008.js new file mode 100644 index 000000000..90146b69b --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.05/11.01.05-008.js @@ -0,0 +1,29 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = { + _a: 3, + get a() { + return this._a; + }, + set a(newa) { + this._a = newa; + } + +}; + +a.a = 5; + +assert(a.a === 5); + diff --git a/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-001.js b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-001.js new file mode 100644 index 000000000..d5b4d1485 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-001.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, 2, 4]; +var cnt = 0; + +for (var i = (0 in a) ? 1 : 2; i < 10; ++i) +{ + ++cnt; +} + +assert(cnt == 9); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-002.js b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-002.js new file mode 100644 index 000000000..25a1254fa --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-002.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 a = 1; +var b = 2; +assert(a + b === (a + b)); diff --git a/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-003.js b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-003.js new file mode 100644 index 000000000..f95c37507 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-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 = 2; +var b = 3; + +assert((a) + (b) === (a + b)); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-004.js b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-004.js new file mode 100644 index 000000000..0aff93894 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-004.js @@ -0,0 +1,28 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +a = { + n: Number, + s: String +}; +b = { + n: Number, + s: String +}; +a.n = 1; +b.n = 2; +a.s = "qwe"; +b.s = "rty"; + +assert(((a).n + (b).n === 3) && ((a).s + (b).s === "qwerty")); diff --git a/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-005.js b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-005.js new file mode 100644 index 000000000..9e97fa14d --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-005.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. + +a = { + n: Number, + s: String +} + +assert(delete(a.n) === true); diff --git a/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-006.js b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-006.js new file mode 100644 index 000000000..721491741 --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-006.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. + +a = { + n: Number, + s: String +} + +assert(typeof (a.property) === "undefined"); diff --git a/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-009.js b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-009.js new file mode 100644 index 000000000..57f08c86b --- /dev/null +++ b/tests/jerry-test-suite/11/11.01/11.01.06/11.01.06-009.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof (a) === "undefined"); diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-001.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-001.js new file mode 100644 index 000000000..8e1c6896d --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-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 a = {name: "name", value: "1"}; + +assert(a.name !== "nameeeeeeeeeee"); diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-002.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-002.js new file mode 100644 index 000000000..2a03054de --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-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 = {name: "name", value: "1"}; +var b = {name: "b", value: "1"}; + +assert((a.name == b.name) || (a.value == b.value)); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-003.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-003.js new file mode 100644 index 000000000..7529401d3 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-003.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 a = {name: "name", value: "1"}; + +assert(a[1] !== "nameeeeeeeeeee"); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-004.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-004.js new file mode 100644 index 000000000..78033f625 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-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 name = "name" +var a = {name: "name", value: "1"}; + +assert(a[name] == "name"); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-007.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-007.js new file mode 100644 index 000000000..7356e33c2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-007.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = {name: "a", value: "1"}; +var b = {name: "b", value: "1"}; +assert(plus(a, b) !== 2) + +function plus(a, b) +{ + return a.value + b.value; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-008.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-008.js new file mode 100644 index 000000000..877160847 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-008.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 = {name: "a", value: "1"}; +var b = {name: "b", value: "1"}; + +assert(isNaN(plus(a, b))); + +function plus(a, b) +{ + return a.value * b.name; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-009.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-009.js new file mode 100644 index 000000000..b3b2314e8 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-009.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 = {name: "a", value: "1"}; +var b = {name: "b", value: "1"}; + +assert(plus(a, b) === "11"); + +function plus(a, b) +{ + return a.value + b.value; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-010.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-010.js new file mode 100644 index 000000000..35008c1da --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-010.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 = {name: "a", value: "1"}; +var b = {name: "b", value: 1}; + +assert(plus(a, b) === "11"); + +function plus(a, b) +{ + return a.value + b.value; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-011.js b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-011.js new file mode 100644 index 000000000..b865d9049 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.01/11.02.01-011.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 = {name: "a", value: 1}; +var b = {name: "b", value: 1}; + +assert(plus(a, b) === 2); + +function plus(a, b) +{ + return a.value + b.value; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-001.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-001.js new file mode 100644 index 000000000..7e93297d4 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-001.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function Animal(name) +{ + this.name = name + this.canWalk = true +} + +var animal = new Animal("animal"); +assert(animal.name === "animal"); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-002.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-002.js new file mode 100644 index 000000000..5e6dded6d --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-002.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function Animal(name) +{ + this.name = name + this.canWalk = true +} + +var animal = new Animal("animal"); +assert(animal.name == "animal"); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-003.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-003.js new file mode 100644 index 000000000..57c141085 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-003.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function Animal(name) +{ + this.name = name + this.canWalk = true +} + +var animal = new Animal("animal"); +assert(animal.name != "insect"); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-004.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-004.js new file mode 100644 index 000000000..cc5aea0c2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-004.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function Animal(name) +{ + this.name = name + this.canWalk = true +} + +var animal = new Animal("animal"); +assert(animal.someparameter != "insect"); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-005.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-005.js new file mode 100644 index 000000000..d737502bf --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-005.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function Animal(name) +{ + this.name = name + this.canWalk = true +} + +var animal = new Animal("animal"); +assert(animal[1] != "animal"); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-006.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-006.js new file mode 100644 index 000000000..dd2086d4c --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-006.js @@ -0,0 +1,27 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function Animal(name) +{ + this.name = name + this.canWalk = true + if (name == "bird") + { + this.canFly = true; + } +} + +var animal = new Animal("animal"); +var bird = new Animal("bird"); +assert(animal.canFly !== bird.canFly); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-007.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-007.js new file mode 100644 index 000000000..0bcfb3c95 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-007.js @@ -0,0 +1,27 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function Animal(name) +{ + this.name = name + this.canWalk = true + if (name == "bird") + { + this.canFly = true; + } +} + +var animal = new Animal("animal"); +var bird = new Animal("bird"); +assert(animal.canFly == animal.name); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-008.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-008.js new file mode 100644 index 000000000..d332c7edf --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-008.js @@ -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. + +function Animal(name) +{ + this.name = name + this.canWalk = true +} + +assert(animal.canWalk); diff --git a/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-009.js b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-009.js new file mode 100644 index 000000000..59053109c --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.02/11.02.02-009.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 a = {}; +a.b = true; +assert(typeof a == "object" && a.b == 1); diff --git a/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-006.js b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-006.js new file mode 100644 index 000000000..9db8c5f44 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-006.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = {}; +a.toString(); diff --git a/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-007.js b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-007.js new file mode 100644 index 000000000..a2c88bf24 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-007.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. + +function foo() +{ + return 1; +} +assert(foo() === 1); diff --git a/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-008.js b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-008.js new file mode 100644 index 000000000..1ecef01ef --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-008.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = { + foo: function () + { + return 1; + } +} + +assert(a.foo() === 1); diff --git a/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-017.js b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-017.js new file mode 100644 index 000000000..acaf7ea80 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-017.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. + +var obj = { + field: Number, + foo: function () { + this.field++; + } +} + +obj.field = 3; +obj.foo(); + +assert(obj.field === 4); diff --git a/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-021.js b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-021.js new file mode 100644 index 000000000..08ed73d2e --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.03/11.02.03-021.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = 1; +var b = foo(); +function foo() +{ + return a; +} + +assert(b === 1); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-001.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-001.js new file mode 100644 index 000000000..15cbaa79f --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-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. + +assert(f_arg().length === 0); + +function f_arg() { + return arguments; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-002.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-002.js new file mode 100644 index 000000000..c22170a02 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-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. + +assert(f_arg()[0] === undefined); + +function f_arg() { + return arguments; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-003.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-003.js new file mode 100644 index 000000000..b8089d1b3 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-003.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. + +assert(f_arg().length === 0); + +function f_arg(x, y) { + return arguments; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-004.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-004.js new file mode 100644 index 000000000..1407691c8 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-004.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. + +assert(f_arg()[0] === undefined); + +function f_arg(x,y) { + return arguments; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-005.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-005.js new file mode 100644 index 000000000..9ce35b362 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-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. + +f_arg = function () +{ + return arguments +} + +assert(f_arg(1, 2).length === 2); + +f_arg = function () { + return arguments; +} diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-006.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-006.js new file mode 100644 index 000000000..58a2475b2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-006.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. + +f_arg = function () { + return arguments; +} + +assert(f_arg(1, 2, 3).length === 3); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-007.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-007.js new file mode 100644 index 000000000..ec6232fd5 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-007.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. + +f_arg = function () { + return arguments; +} + +assert(f_arg(1, 2, 3)[0] === 1); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-008.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-008.js new file mode 100644 index 000000000..9bf329ef8 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-008.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. + +f_arg = function () { + return arguments; +} + +assert(f_arg(1, 2, 3)[2] === 3); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-009.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-009.js new file mode 100644 index 000000000..fe033c7d5 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-009.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. + +f_arg = function () { + return arguments; +} + +assert(f_arg(1, 2, 3)[3] !== undefined); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-010.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-010.js new file mode 100644 index 000000000..fe033c7d5 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-010.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. + +f_arg = function () { + return arguments; +} + +assert(f_arg(1, 2, 3)[3] !== undefined); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-011.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-011.js new file mode 100644 index 000000000..549682517 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-011.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. + +f_arg = function(x,y) { + return arguments; +} + +assert(f_arg(1,2,3).length === 3); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-012.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-012.js new file mode 100644 index 000000000..6ad598cda --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-012.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. + +f_arg = function(x,y) { + return arguments; +} + +assert(f_arg(1)[0] === 1); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-013.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-013.js new file mode 100644 index 000000000..73d55c906 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-013.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. + +f_arg = function (x, y) { + return arguments; +} + +assert(f_arg(1, 2, 3)[2] === 3); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-014.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-014.js new file mode 100644 index 000000000..c7483f36f --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-014.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. + +f_arg = function(x,y) { + return arguments; +} + +assert(f_arg(1,2,3)[3] === undefined); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-016.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-016.js new file mode 100644 index 000000000..82724718d --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-016.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. + +function f_arg() { +} + +f_arg(x=1,x); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-017.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-017.js new file mode 100644 index 000000000..13c42ddd2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-017.js @@ -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. + +function f_arg() { +} + +try +{ + f_arg(x, x = 1); +} +catch (e) { + assert((e instanceof ReferenceError) === true); +} + + + + diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-018.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-018.js new file mode 100644 index 000000000..92fc685cb --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-018.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. + +function f_arg(x, y, z) { + return z; +} + +assert(f_arg(x = 1, y = x, x + y) === 2); diff --git a/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-019.js b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-019.js new file mode 100644 index 000000000..dc0340401 --- /dev/null +++ b/tests/jerry-test-suite/11/11.02/11.02.04/11.02.04-019.js @@ -0,0 +1,41 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +function f_arg() { +} + + +var x = function () { + throw "x"; +}; +var y = function () { + throw "y"; +}; +try +{ + f_arg(x(), y()); + assert(false); +} +catch (e) +{ + if (e === "y") + { + assert(false); + } else { + if (e !== "x") + { + assert(false); + } + } +} diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-005.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-005.js new file mode 100644 index 000000000..75b94eb20 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-005.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 a = 1; + +assert((a++ === 1) && (a === 2)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-006.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-006.js new file mode 100644 index 000000000..a2fe4b0b2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-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 = true; +var b = false; + +assert((a++ === 1) && (b++ === +0) && (a === 2) && (b === 1)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-007.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-007.js new file mode 100644 index 000000000..f2fc1e73f --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-007.js @@ -0,0 +1,21 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = { + valueOf: function () { + return 1; + } +} + +assert((a++ === 1) && (a === 2)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-008.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-008.js new file mode 100644 index 000000000..b74469746 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-008.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 a = null; + +assert((a++ == +0) && (a === 1)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-009.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-009.js new file mode 100644 index 000000000..d65d95fff --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-009.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 a = undefined; + +assert(isNaN(a++) && isNaN(a)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-010.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-010.js new file mode 100644 index 000000000..6036bbbe0 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-010.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 a = "1"; + +assert((a++ === 1) && (a === 2)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-011.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-011.js new file mode 100644 index 000000000..9b43cb48a --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-011.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = "blah"; +assert ( isNaN(a++) && isNaN(a) ); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-012.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-012.js new file mode 100644 index 000000000..8c57b1473 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-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 = "1e3"; + +assert((a++ === 1e3) && (a === 1001)); + \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-013.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-013.js new file mode 100644 index 000000000..364752899 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-013.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = ""; +assert((a++ === 0) && (a === 1)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-014.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-014.js new file mode 100644 index 000000000..d06bb256b --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-014.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = " "; +assert((a++ === 0) && (a === 1)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-015.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-015.js new file mode 100644 index 000000000..b01851aab --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-015.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 a = "Infinity"; + +assert((a++ === Infinity) && (a === Infinity)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-016.js b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-016.js new file mode 100644 index 000000000..f3051edb5 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.01/11.03.01-016.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = "0xa"; +assert((a++ === 0xa) && (a === 0xb)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-005.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-005.js new file mode 100644 index 000000000..5d256469c --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-005.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = 1; +assert((a-- === 1) && (a === 0)); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-006.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-006.js new file mode 100644 index 000000000..26a4e58b2 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-006.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 a = true; +var b = false; +assert((a-- === 1) && (b-- === +0) && (a === 0) && (b === -1)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-007.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-007.js new file mode 100644 index 000000000..4748c4f83 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-007.js @@ -0,0 +1,22 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = { + valueOf: function () { + return 1; + } +} + +assert((a-- === 1) && (a === 0)); + \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-008.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-008.js new file mode 100644 index 000000000..ff583c5da --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-008.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = null; +assert((a-- == +0) && (a === -1)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-009.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-009.js new file mode 100644 index 000000000..b8ba3b82b --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-009.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = undefined; +assert(isNaN(a--) && isNaN(a)); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-010.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-010.js new file mode 100644 index 000000000..fbca080f0 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-010.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = "1"; +assert((a-- === 1) && (a === 0)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-011.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-011.js new file mode 100644 index 000000000..c52531aef --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-011.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = "blah"; +assert(isNaN(a--) && isNaN(a)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-012.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-012.js new file mode 100644 index 000000000..d67f57773 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-012.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = "1e3"; +assert((a-- === 1e3) && (a === 999)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-013.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-013.js new file mode 100644 index 000000000..46f0b7e0b --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-013.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = ""; +assert((a-- === 0) && (a === -1)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-014.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-014.js new file mode 100644 index 000000000..1263c21b5 --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.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 = " "; + +assert((a-- === 0) && (a === -1)); + \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-015.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-015.js new file mode 100644 index 000000000..c3b6dc1bc --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-015.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = "Infinity"; +assert((a-- === Infinity) && (a === Infinity)); diff --git a/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-016.js b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-016.js new file mode 100644 index 000000000..f2ca705ca --- /dev/null +++ b/tests/jerry-test-suite/11/11.03/11.03.02/11.03.02-016.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +var a = "0xa"; +assert((a-- === 0xa) && (a === 9)); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-001.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-001.js new file mode 100644 index 000000000..ad3450a76 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-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. + +x = 42; + +assert ((delete x) == true); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-002.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-002.js new file mode 100644 index 000000000..121064731 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-002.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 y = 43; + +assert((delete y) == false && y == 43); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-003.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-003.js new file mode 100644 index 000000000..81800b1de --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-003.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 y = 43; + +assert((delete Math.PI) == false); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-004.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-004.js new file mode 100644 index 000000000..9d839cd70 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-004.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 myobj = { + h: 4, + k: 5 +}; + +assert((delete myobj.h) == true && myobj.h == undefined); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-005.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-005.js new file mode 100644 index 000000000..655680fb9 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-005.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. + + myobj = { + h: 4, + k: 5 + }; + +assert ((delete myobj) == true); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-006.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-006.js new file mode 100644 index 000000000..fd9394f28 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-006.js @@ -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. + +function Foo() { +} +Foo.prototype.bar = 42; +var foo = new Foo(); +if (!(delete foo.bar)) + assert(false) + +if (foo.bar != 42) + assert(false) + +if (!(delete Foo.prototype.bar)) + assert(false) diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-007.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-007.js new file mode 100644 index 000000000..ff05bcf6c --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-007.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 fruits = ['apple', 'banana', 'kiwi', 'pineapple']; + +delete fruits[3]; + +assert(!(3 in fruits) && fruits.length == 4); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-008.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-008.js new file mode 100644 index 000000000..0f67de37c --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-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. + +function x() { +} + +assert((delete x) == false && typeof x == "function"); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-009.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-009.js new file mode 100644 index 000000000..d9ce53c63 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-009.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. + +this.prop = "prop"; + +assert((delete this.prop) == true); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-010.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-010.js new file mode 100644 index 000000000..127b9c37b --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-010.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert((delete arguments) == false); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-011.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-011.js new file mode 100644 index 000000000..ecac73ab4 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-011.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. + +function test(arg) +{ + if ((delete arg) == false) + return 0; + else + return 1; +} + +assert(test("str")); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-012.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-012.js new file mode 100644 index 000000000..88caead22 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-012.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. + +this.test = function (arg) +{ + return 1; +} + +assert((delete test) == true); diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-013.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-013.js new file mode 100644 index 000000000..f85870df1 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-013.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. + +eval('var foo = 1;'); +assert((delete foo) == true && typeof foo == "undefined"); + diff --git a/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-017.js b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-017.js new file mode 100644 index 000000000..c46b3e2dc --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.01/11.04.01-017.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert((delete i_dont_exist) == true); diff --git a/tests/jerry-test-suite/11/11.04/11.04.02/11.04.02-001.js b/tests/jerry-test-suite/11/11.04/11.04.02/11.04.02-001.js new file mode 100644 index 000000000..ac1af61bf --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.02/11.04.02-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 a = void(5 / 2); + +assert(a == undefined); diff --git a/tests/jerry-test-suite/11/11.04/11.04.02/11.04.02-002.js b/tests/jerry-test-suite/11/11.04/11.04.02/11.04.02-002.js new file mode 100644 index 000000000..7f7f6d6ec --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.02/11.04.02-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 b = 1; + +var a = void(++b); + +assert(a == undefined && b == 2); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-001.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-001.js new file mode 100644 index 000000000..37f674803 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-001.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof 37 === 'number'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-002.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-002.js new file mode 100644 index 000000000..eabd3357b --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-002.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof 37 === 'number' && + typeof 3.14 === 'number'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-003.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-003.js new file mode 100644 index 000000000..0007892d9 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-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. + +assert(typeof Math.LN2 === 'number' && + typeof Infinity === 'number' && + typeof NaN === 'number' && + typeof Number(1) === 'number'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-004.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-004.js new file mode 100644 index 000000000..8e357165d --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-004.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof "" === 'string' && + typeof "str" === 'string'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-005.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-005.js new file mode 100644 index 000000000..671b031d9 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-005.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof (typeof 1) === 'string' && + typeof String("str") === 'string'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-006.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-006.js new file mode 100644 index 000000000..0a87a3f7c --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-006.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof true === 'boolean' && + typeof false === 'boolean'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-007.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-007.js new file mode 100644 index 000000000..027634cab --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-007.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof Boolean(true) === 'boolean'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-008.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-008.js new file mode 100644 index 000000000..461151628 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-008.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof undefined === 'undefined' && + typeof smth === 'undefined'); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-009.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-009.js new file mode 100644 index 000000000..025b5bcb8 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-009.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof {a: 1} === 'object' && + typeof [1, 2, 4] === 'object') \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-010.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-010.js new file mode 100644 index 000000000..abd3c0e4a --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-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. + +assert(typeof new Date() === 'object' && + typeof new Boolean(true) === 'object' && + typeof new Number(1) === 'object' && + typeof new String("abc") === 'object') \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-011.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-011.js new file mode 100644 index 000000000..49948d3c3 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-011.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert (typeof function(){} === 'function') \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-012.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-012.js new file mode 100644 index 000000000..aa63b3a85 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-012.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert (typeof Math.sin === 'function'); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-013.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-013.js new file mode 100644 index 000000000..546ef2fd4 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-013.js @@ -0,0 +1,15 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof null === 'object'); diff --git a/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-016.js b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-016.js new file mode 100644 index 000000000..8bcfb9142 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.03/11.04.03-016.js @@ -0,0 +1,16 @@ +// Copyright 2014 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +assert(typeof + 24 === 'number') \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-001.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-001.js new file mode 100644 index 000000000..41661bcf0 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-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 a = 25; + +assert(++a === 26); diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-002.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-002.js new file mode 100644 index 000000000..98ad1e06d --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-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 = 25, b = -1; +; + +assert(++a === ++b + 26); diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-004.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-004.js new file mode 100644 index 000000000..aff6241ea --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-004.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 a = 25; + +assert((++a) / 2 === 13); diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-005.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-005.js new file mode 100644 index 000000000..1abccbdd4 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-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 = 25; + +assert(++ + a === 26) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-006.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-006.js new file mode 100644 index 000000000..0633d38fe --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-006.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 a = 1.12; + +assert(++a === 2.12) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-007.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-007.js new file mode 100644 index 000000000..efd759862 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-007.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 a = true; + +assert(++a === 2); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-008.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-008.js new file mode 100644 index 000000000..adadacb41 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-008.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 a = {}; + +assert(isNaN(++a)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-009.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-009.js new file mode 100644 index 000000000..3bede12d4 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-009.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 a = undefined; + +assert(isNaN(++a)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-010.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-010.js new file mode 100644 index 000000000..7a9a97995 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-010.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 a = null; + +assert(++a === 1); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-011.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-011.js new file mode 100644 index 000000000..72eccaa16 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-011.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 a = "abc"; + +assert(isNaN(++a)); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-012.js b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-012.js new file mode 100644 index 000000000..8049cfc6c --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.04/11.04.04-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 = function () { +}; + +assert(isNaN(++a)); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-001.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-001.js new file mode 100644 index 000000000..cbc5d2df6 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-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 a = 25; + +assert(--a === 24) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-002.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-002.js new file mode 100644 index 000000000..43684a52a --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-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 = 25, b = 1; +; + +assert(--a === --b + 24) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-004.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-004.js new file mode 100644 index 000000000..2ba6d9325 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-004.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 a = 25; + +assert((--a) / 2 === 12) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-005.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-005.js new file mode 100644 index 000000000..7467036dc --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-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 = 25; + +assert(-- + a === 24) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-006.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-006.js new file mode 100644 index 000000000..73dcaab43 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-006.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 eps = 0.000000001; +var a = 1.12; + +assert(--a >= 0.12 - eps && + a <= 0.12 + eps) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-007.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-007.js new file mode 100644 index 000000000..bda96f8a5 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-007.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 a = true; + +assert(--a === 0) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-008.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-008.js new file mode 100644 index 000000000..dfe5dd3ab --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-008.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 a = {}; + +assert(isNaN(--a)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-009.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-009.js new file mode 100644 index 000000000..4d9b5a973 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-009.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 a = undefined; + +assert(isNaN(--a)) \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-010.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-010.js new file mode 100644 index 000000000..cb61d1976 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-010.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 a = null; + +assert(--a === -1); diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-011.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-011.js new file mode 100644 index 000000000..76cc106b5 --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-011.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 a = "abc"; + +assert(isNaN(--a)); \ No newline at end of file diff --git a/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-012.js b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-012.js new file mode 100644 index 000000000..fbd8fcede --- /dev/null +++ b/tests/jerry-test-suite/11/11.04/11.04.05/11.04.05-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 = function () { +}; + +assert(isNaN(--a));