Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: mozilla-tests/ecma/String/15.5.4.5-5.js

Issue 2865028: Update the mozilla tests to new version (as of 2010-06-29). (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mozilla-tests/ecma/String/15.5.4.5-3.js ('k') | mozilla-tests/ecma/TypeConversion/9.3.1-3.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK ***** 2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * 4 *
5 * The contents of this file are subject to the Mozilla Public License Version 5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with 6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at 7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/ 8 * http://www.mozilla.org/MPL/
9 * 9 *
10 * Software distributed under the License is distributed on an "AS IS" basis, 10 * Software distributed under the License is distributed on an "AS IS" basis,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 2. Call ToInteger(pos) 53 2. Call ToInteger(pos)
54 3. Compute the number of characters in result(1). 54 3. Compute the number of characters in result(1).
55 4. If Result(2) is less than 0 or is not less than 55 4. If Result(2) is less than 0 or is not less than
56 Result(3), return NaN. 56 Result(3), return NaN.
57 5. Return a value of Number type, of positive sign, whose 57 5. Return a value of Number type, of positive sign, whose
58 magnitude is the Unicode encoding of one character 58 magnitude is the Unicode encoding of one character
59 from result 1, namely the characer at position Result 59 from result 1, namely the characer at position Result
60 (2), where the first character in Result(1) is 60 (2), where the first character in Result(1) is
61 considered to be at position 0. 61 considered to be at position 0.
62 62
63 Note that the charCodeAt funciton is intentionally 63 Note that the charCodeAt function is intentionally
64 generic; it does not require that its this value be a 64 generic; it does not require that its this value be a
65 String object. Therefore it can be transferred to other 65 String object. Therefore it can be transferred to other
66 kinds of objects for use as a method. 66 kinds of objects for use as a method.
67 67
68 Author: christine@netscape.com 68 Author: christine@netscape.com
69 Date: 2 october 1997 69 Date: 2 october 1997
70 */ 70 */
71 var SECTION = "15.5.4.5-5"; 71 var SECTION = "15.5.4.5-5";
72 var VERSION = "ECMA_1"; 72 var VERSION = "ECMA_1";
73 startTest(); 73 startTest();
(...skipping 23 matching lines...) Expand all
97 97
98 new TestCase( SECTION, "x = new String(); x.charCodeAt(NaN)", Number.NaN, eval("x=new String();x.charCodeAt(Number.NaN)") ); 98 new TestCase( SECTION, "x = new String(); x.charCodeAt(NaN)", Number.NaN, eval("x=new String();x.charCodeAt(Number.NaN)") );
99 new TestCase( SECTION, "x = new String(); x.charCodeAt(Number.POSITIVE_INFIN ITY)", Number.NaN, eval("x=new String();x.charCodeAt(Number.POSITIVE_INFIN ITY)") ); 99 new TestCase( SECTION, "x = new String(); x.charCodeAt(Number.POSITIVE_INFIN ITY)", Number.NaN, eval("x=new String();x.charCodeAt(Number.POSITIVE_INFIN ITY)") );
100 new TestCase( SECTION, "x = new String(); x.charCodeAt(Number.NEGATIVE_INFIN ITY)", Number.NaN, eval("x=new String();x.charCodeAt(Number.NEGATIVE_INFIN ITY)") ); 100 new TestCase( SECTION, "x = new String(); x.charCodeAt(Number.NEGATIVE_INFIN ITY)", Number.NaN, eval("x=new String();x.charCodeAt(Number.NEGATIVE_INFIN ITY)") );
101 101
102 for ( var j = 0; j < 255; j++ ) { 102 for ( var j = 0; j < 255; j++ ) {
103 new TestCase( SECTION, "TEST_STRING.charCodeAt("+j+")", j, TEST_STRING .charCodeAt(j) ); 103 new TestCase( SECTION, "TEST_STRING.charCodeAt("+j+")", j, TEST_STRING .charCodeAt(j) );
104 } 104 }
105 105
106 test(); 106 test();
OLDNEW
« no previous file with comments | « mozilla-tests/ecma/String/15.5.4.5-3.js ('k') | mozilla-tests/ecma/TypeConversion/9.3.1-3.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698