mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2026-01-29 07:36:26 +00:00
Add regression tests for recently closed issues
Related issues: #123, #354, #358, #384, #447, #680, #738, #739, #743, #781, #785, #786 JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
parent
0f378281ba
commit
ca01412848
20
tests/jerry/fail/1/regression-test-issue-358.js
Normal file
20
tests/jerry/fail/1/regression-test-issue-358.js
Normal file
@ -0,0 +1,20 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
label_0:
|
||||
if (false)
|
||||
do {
|
||||
continue label_0;
|
||||
} while (false);
|
||||
29
tests/jerry/fail/1/regression-test-issue-384.js
Normal file
29
tests/jerry/fail/1/regression-test-issue-384.js
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
// Copyrnse.
|
||||
|
||||
'use stricto
|
||||
// C_pyrnsq.
|
||||
|
||||
'use strictI
|
||||
// Copyrnse. Functionn f_0(){
|
||||
'use strictT
|
||||
// Copyrnse.
|
||||
|
||||
'use strict)
|
||||
// Copyrnse.
|
||||
|
||||
'use strict;
|
||||
24
tests/jerry/regression-test-issue-123.js
Normal file
24
tests/jerry/regression-test-issue-123.js
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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 v_1 = (1 + (1 + (1 +
|
||||
(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 +
|
||||
(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 +
|
||||
(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 +
|
||||
1
|
||||
)) )) )) )) )) )) )) )) )) ))
|
||||
)) )) )) )) )) )) )) )) )) ))
|
||||
)) )) )) )) )) )) )) )) )) ))
|
||||
)) );
|
||||
50
tests/jerry/regression-test-issue-354.js
Normal file
50
tests/jerry/regression-test-issue-354.js
Normal file
@ -0,0 +1,50 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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 data = {
|
||||
'1': '', '2': '', '3': '', '4': '', '5': '', '6': '', '7': '', '8': '',
|
||||
'9': '', '10': '', '11': '', '12': '', '13': '', '14': '', '15': '', '16': '',
|
||||
'17': '', '18': '', '19': '', '20': '', '21': '', '22': '', '23': '', '24': '',
|
||||
'25': '', '26': '', '27': '', '28': '', '29': '', '30': '', '31': '', '32': '',
|
||||
'33': '', '34': '', '35': '', '36': '', '37': '', '38': '', '39': '', '40': '',
|
||||
'41': '', '42': '', '43': '', '44': '', '45': '', '46': '', '47': '', '48': '',
|
||||
'49': '', '50': '', '51': '', '52': '', '53': '', '54': '', '55': '', '56': '',
|
||||
'57': '', '58': '', '59': '', '60': '', '61': '', '62': '', '63': '', '64': '',
|
||||
'65': '', '66': '', '67': '', '68': '', '69': '', '70': '', '71': '', '72': '',
|
||||
'73': '', '74': '', '75': '', '76': '', '77': '', '78': '', '79': '', '80': '',
|
||||
'81': '', '82': '', '83': '', '84': '', '85': '', '86': '', '87': '', '88': '',
|
||||
'89': '', '90': '', '91': '', '92': '', '93': '', '94': '', '95': '', '96': '',
|
||||
'97': '', '98': '', '99': '', '100': '', '101': '', '102': '', '103': '', '104': '',
|
||||
'105': '', '106': '', '107': '', '108': '', '109': '', '110': '', '111': '', '112': '',
|
||||
'113': '', '114': '', '115': '', '116': '', '117': '', '118': '', '119': '', '120': '',
|
||||
'121': '', '122': '', '123': '', '124': '', '125': '', '126': '', '127': '', '128': '',
|
||||
'129': '', '130': '', '131': '', '132': '', '133': '', '134': '', '135': '', '136': '',
|
||||
'137': '', '138': '', '139': '', '140': '', '141': '', '142': '', '143': '', '144': '',
|
||||
'145': '', '146': '', '147': '', '148': '', '149': '', '150': '', '151': '', '152': '',
|
||||
'153': '', '154': '', '155': '', '156': '', '157': '', '158': '', '159': '', '160': '',
|
||||
'161': '', '162': '', '163': '', '164': '', '165': '', '166': '', '167': '', '168': '',
|
||||
'169': '', '170': '', '171': '', '172': '', '173': '', '174': '', '175': '', '176': '',
|
||||
'177': '', '178': '', '179': '', '180': '', '181': '', '182': '', '183': '', '184': '',
|
||||
'185': '', '186': '', '187': '', '188': '', '189': '', '190': '', '191': '', '192': '',
|
||||
'193': '', '194': '', '195': '', '196': '', '197': '', '198': '', '199': '', '200': '',
|
||||
'201': '', '202': '', '203': '', '204': '', '205': '', '206': '', '207': '', '208': '',
|
||||
'209': '', '210': '', '211': '', '212': '', '213': '', '214': '', '215': '', '216': '',
|
||||
'217': '', '218': '', '219': '', '220': '', '221': '', '222': '', '223': '', '224': '',
|
||||
'225': '', '226': '', '227': '', '228': '', '229': '', '230': '', '231': '', '232': '',
|
||||
'233': '', '234': '', '235': '', '236': '', '237': '', '238': '', '239': '', '240': '',
|
||||
'241': '', '242': '', '243': '', '244': '', '245': '', '246': '', '247': '', '248': '',
|
||||
'249': '', '250': '', '251': '', '252': '', '253': '', '254': '', '255': '',
|
||||
'256': '',
|
||||
};
|
||||
25
tests/jerry/regression-test-issue-447.js
Normal file
25
tests/jerry/regression-test-issue-447.js
Normal file
@ -0,0 +1,25 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
try
|
||||
{
|
||||
for (v_0 in v_1) {};
|
||||
f_0(v_2.v_3 === 5);
|
||||
assert (false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert (e instanceof ReferenceError);
|
||||
}
|
||||
28
tests/jerry/regression-test-issue-680.js
Normal file
28
tests/jerry/regression-test-issue-680.js
Normal file
@ -0,0 +1,28 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
try
|
||||
{
|
||||
f1(function(a1){});
|
||||
assert (false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert (e instanceof ReferenceError);
|
||||
}
|
||||
|
||||
var x = {
|
||||
foo: function () { throw new TypeError("bar"); }
|
||||
};
|
||||
16
tests/jerry/regression-test-issue-738.js
Normal file
16
tests/jerry/regression-test-issue-738.js
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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 g() {};for (B in Boolean) print(f);
|
||||
42
tests/jerry/regression-test-issue-739.js
Normal file
42
tests/jerry/regression-test-issue-739.js
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
try {
|
||||
var res = RegExp.prototyj_l;
|
||||
obj_l = obj;
|
||||
|
||||
for (var k = 0; k < 1500; k++)
|
||||
{
|
||||
obj_l.prop = {};
|
||||
obj_l = obj_l.prop;
|
||||
}
|
||||
|
||||
function f (f, i) {
|
||||
if (--i > 0) {
|
||||
f ({a:o, b:o}, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < 100; i++)
|
||||
{
|
||||
({} + f ({}, 12));
|
||||
}
|
||||
|
||||
assert (false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert (e instanceof ReferenceError);
|
||||
}
|
||||
16
tests/jerry/regression-test-issue-743.js
Normal file
16
tests/jerry/regression-test-issue-743.js
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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 Error(Error) { }
|
||||
26
tests/jerry/regression-test-issue-781.js
Normal file
26
tests/jerry/regression-test-issue-781.js
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
try
|
||||
{
|
||||
Function (Array.isArray);
|
||||
assert (false);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
assert (e instanceof SyntaxError);
|
||||
}
|
||||
|
||||
try { Function(TypeError.prototype) } catch (err) { }
|
||||
19
tests/jerry/regression-test-issue-785.js
Normal file
19
tests/jerry/regression-test-issue-785.js
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
try { RegExp.prototype.toString() } catch (err) { }
|
||||
try { isNaN.apply(unescape, JSON.stringify) } catch (err) { }
|
||||
try { Array.prototype.forEach(eval) } catch (err) { }
|
||||
try { RegExp.prototype.compile(RegExp.prototype) } catch (err) { }
|
||||
43
tests/jerry/regression-test-issue-786.js
Normal file
43
tests/jerry/regression-test-issue-786.js
Normal file
@ -0,0 +1,43 @@
|
||||
// Copyright 2016 Samsung Electronics Co., Ltd.
|
||||
// Copyright 2016 University of Szeged.
|
||||
//
|
||||
// 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.
|
||||
|
||||
try { RegExp.prototype.toString() } catch (err) { }
|
||||
try { Date.prototype.toTimeString() } catch (err) { }
|
||||
try { Boolean.prototype.toString() } catch (err) { }
|
||||
try { String.prototype.match(isNaN) } catch (err) { }
|
||||
try { Math.round(Math.atan) } catch (err) { }
|
||||
try { Date.prototype.getUTCDay() } catch (err) { }
|
||||
try { toLocaleString() } catch (err) { }
|
||||
try { Array.prototype.join(String.prototype.split) } catch (err) { }
|
||||
try { Date.prototype.getSeconds() } catch (err) { }
|
||||
try { isNaN.apply(Date.prototype.toISOString, String.prototype.split) } catch (err) { }
|
||||
try { Math.cos(Object) } catch (err) { }
|
||||
try { Math.floor(Date.prototype.getUTCSeconds) } catch (err) { }
|
||||
try { isNaN.apply(assert, JSON.stringify) } catch (err) { }
|
||||
try { Number.prototype.toLocaleString() } catch (err) { }
|
||||
try { Date.prototype.getTimezoneOffset() } catch (err) { }
|
||||
try { Date.prototype.setMinutes(Object.getOwnPropertyDescriptor, Object.getOwnPropertyNames) } catch (err) { }
|
||||
try { Math.log(String.prototype.search) } catch (err) { }
|
||||
try { ReferenceError(Object.defineProperty) } catch (err) { }
|
||||
try { Array.prototype.filter(Number.prototype.toLocaleString) } catch (err) { }
|
||||
try { Array.prototype.forEach(Date.prototype.getDay) } catch (err) { }
|
||||
try { Object.defineProperty(SyntaxError.prototype, Date.prototype.setUTCMinutes, Math.max) } catch (err) { }
|
||||
try { Date.prototype.setMilliseconds(String.prototype.localeCompare) } catch (err) { }
|
||||
try { Math.asin(Date.prototype.getDay) } catch (err) { }
|
||||
try { Array.prototype.some(Date.prototype.getDay) } catch (err) { }
|
||||
try { String.prototype.charCodeAt(toString) } catch (err) { }
|
||||
try { isPrototypeOf(Math.tan) } catch (err) { }
|
||||
try { Object.isFrozen(print) } catch (err) { }
|
||||
try { RegExp.prototype.compile(RegExp.prototype) } catch (err) { }
|
||||
Loading…
x
Reference in New Issue
Block a user