mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
JavaScript Tests - regression tests for bug 368516, 371636, by Brendan Eich, Igor Bukanov, not part of the build
This commit is contained in:
parent
1346da4f8b
commit
0baef6e1a8
77
js/tests/ecma_3/extensions/regress-368516.js
Executable file
77
js/tests/ecma_3/extensions/regress-368516.js
Executable file
@ -0,0 +1,77 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (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.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is JavaScript Engine testing utilities.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Brendan Eich
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var gTestfile = 'regress-368516.js';
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 368516;
|
||||
var summary = 'Ignore unicode BOM characters';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
test();
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function test()
|
||||
{
|
||||
enterFunc ('test');
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
var bomchars = ['\uFFFE',
|
||||
'\uFEFF'];
|
||||
|
||||
for (var i = 0; i < bomchars.length; i++)
|
||||
{
|
||||
expect = 'No Error';
|
||||
actual = 'No Error';
|
||||
|
||||
try
|
||||
{
|
||||
eval("hi" + bomchars[i] + "there = 'howdie';");
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary + ': ' + i);
|
||||
}
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
88
js/tests/js1_5/extensions/regress-371636.js
Executable file
88
js/tests/js1_5/extensions/regress-371636.js
Executable file
@ -0,0 +1,88 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (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.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is JavaScript Engine testing utilities.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Foundation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s): Igor Bukanov
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
var gTestfile = 'regress-371636.js';
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 371636;
|
||||
var summary = 'Numeric sort performance';
|
||||
var actual = false;
|
||||
var expect = '(tint/tstr < 3)=true';
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
test();
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function test()
|
||||
{
|
||||
enterFunc ('test');
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
function testint(power)
|
||||
{
|
||||
var N = 1 << power;
|
||||
var a = new Array(N);
|
||||
for (var i = 0; i != N; ++i)
|
||||
a[i] = (N-1) & (0x9E3779B9 * i);
|
||||
var now = Date.now;
|
||||
var t = now();
|
||||
a.sort();
|
||||
return now() - t;
|
||||
}
|
||||
|
||||
function teststr(power)
|
||||
{
|
||||
var N = 1 << power;
|
||||
var a = new Array(N);
|
||||
for (var i = 0; i != N; ++i)
|
||||
a[i] = String((N-1) & (0x9E3779B9 * i));
|
||||
var now = Date.now;
|
||||
var t = now();
|
||||
a.sort();
|
||||
return now() - t;
|
||||
}
|
||||
|
||||
var tint = testint(18);
|
||||
var tstr = teststr(18);
|
||||
print('int: ' + tint, 'str: ' + tstr, 'int/str: ' + (tint/tstr).toFixed(2));
|
||||
|
||||
actual = '(tint/tstr < 3)=' + (tint/tstr < 3);
|
||||
reportCompare(expect, actual, summary);
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
@ -133,6 +133,7 @@ TEST_ID=ecma_3/RegExp/regress-375715-04.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILE
|
||||
TEST_ID=ecma_3/RegExp/regress-375715-04.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=shell, TEST_OS=(linux|mac), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION= expected: Expected exit 0 actual: Actual exit 0, signal `[`1`-`9`]``[`0`-`9`]``*` reason: Assertion failure: (c2 <= cs->length) && (c1 <= c2), at jsregexp.c:`[`0`-`9`]``+`
|
||||
TEST_ID=ecma_3/RegExp/regress-375715-04.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION= expected: Expected exit 0 actual: Actual exit 3, signal 0 reason: Testcase produced no output!
|
||||
TEST_ID=ecma_3/extensions/regress-274152.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Do not ignore unicode format-control characters: `[`0`-`2`]` expected: SyntaxError: illegal character actual: reason: Expected value 'SyntaxError: illegal character', Actual value ''
|
||||
TEST_ID=ecma_3/extensions/regress-368516.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Ignore unicode BOM characters: `[`0`-`1`]` expected: No Error actual: SyntaxError: illegal character reason: Expected value 'No Error', Actual value 'SyntaxError: illegal character'
|
||||
TEST_ID=js1_2/function/regexparg-1.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=typeof f(/abc/) expected: object actual: function reason: wrong value
|
||||
TEST_ID=js1_2/function/regexparg-1.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=typeof new f(/abc/) expected: object actual: function reason: wrong value
|
||||
TEST_ID=js1_5/Array/11.1.4.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Elisons in Array literals should not be enumed Section 1 of test - [,1] expected: 1 actual: 01 reason: Expected value '1', Actual value '01'
|
||||
@ -229,6 +230,8 @@ TEST_ID=js1_5/extensions/regress-365869.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILE
|
||||
TEST_ID=js1_5/extensions/regress-367589.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=BUGNUMBER: 367589; STATUS: Do not assert !SPROP_HAS_STUB_SETTER(sprop) || (sprop->attrs & JSPROP_GETTER); PASSED! Do not assert !SPROP_HAS_STUB_SETTER(sprop) || (sprop->attrs & JSPROP_GETTER)
|
||||
TEST_ID=js1_5/extensions/regress-367923.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=strict warning for variable redeclares argument expected: TypeError: variable v redeclares argument actual: TypeError: variable v hides argument reason: Expected value 'TypeError: variable v redeclares argument', Actual value 'TypeError: variable v hides argument'
|
||||
TEST_ID=js1_5/extensions/regress-369404.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=BUGNUMBER: 369404; STATUS: Do not assert: !SPROP_HAS_STUB_SETTER(sprop) || (sprop->attrs & JSPROP_GETTER); PASSED! Do not assert: !SPROP_HAS_STUB_SETTER(sprop) || (sprop->attrs & JSPROP_GETTER)
|
||||
TEST_ID=js1_5/extensions/regress-371636.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Numeric sort performance expected: (tint/tstr < 3)=true actual: (tint/tstr < 3)=false
|
||||
TEST_ID=js1_5/extensions/regress-371636.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`out of memory
|
||||
TEST_ID=js1_5/extensions/regress-375801.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=uneval should use "(void 0)" instead of "undefined": uneval expected: ( { a : ( void 0 ) } ) actual: ( { a : undefined } ) reason: Expected value ' ( { a : ( void 0 ) } ) ', Actual value ' ( { a : undefined } ) '
|
||||
TEST_ID=js1_5/extensions/regress-376052.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=javascript.options.anonfunfix to allow function (){} expressions: 3 expected: SyntaxError: syntax error actual: No Error reason: Expected value 'SyntaxError: syntax error', Actual value 'No Error'
|
||||
TEST_ID=js1_5/extensions/regress-380831.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=uneval trying to output a getter function that is a sharp definition expected: ( { b getter : # 1 = ( function ( ) { } ) , c getter : # 1 # } ) actual: ( { b getter : # 1 = ( ) { } , c getter : # 1 # } ) reason: Expected value ' ( { b getter : # 1 = ( function ( ) { } ) , c getter : # 1 # } ) ', Actual value ' ( { b getter : # 1 = ( ) { } , c getter : # 1 # } ) '
|
||||
|
Loading…
Reference in New Issue
Block a user