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

Side by Side Diff: test/mjsunit/string-fromcharcode.js

Issue 2006263003: Version 5.0.71.53 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: Created 4 years, 7 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
« no previous file with comments | « test/mjsunit/regress/regress-seqstrsetchar-ex2.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 assertEquals(expected, fcc2(0x20)); 96 assertEquals(expected, fcc2(0x20));
97 assertEquals(expected, fcc2(0x20 - 0x10000)); 97 assertEquals(expected, fcc2(0x20 - 0x10000));
98 assertEquals(expected, fcc2(0x20 + 0.5)); 98 assertEquals(expected, fcc2(0x20 + 0.5));
99 } 99 }
100 100
101 // Use loop to test the custom IC. 101 // Use loop to test the custom IC.
102 for (var i = 0; i < 10; i++) { 102 for (var i = 0; i < 10; i++) {
103 test(i); 103 test(i);
104 } 104 }
105 105
106 assertEquals("AAAA", String.fromCharCode(65, 65, 65, 65));
107 assertEquals("AAAA", String.fromCharCode(65, 65, 65, 65));
108 %OptimizeFunctionOnNextCall(String.fromCharCode);
109 assertEquals("AAAA", String.fromCharCode(65, 65, 65, 65));
110
111 // Test the custom IC works correctly when the map changes. 106 // Test the custom IC works correctly when the map changes.
112 for (var i = 0; i < 10; i++) { 107 for (var i = 0; i < 10; i++) {
113 var expected = (i < 5) ? " " : 42; 108 var expected = (i < 5) ? " " : 42;
114 if (i == 5) String.fromCharCode = function() { return 42; }; 109 if (i == 5) String.fromCharCode = function() { return 42; };
115 assertEquals(expected, String.fromCharCode(0x20)); 110 assertEquals(expected, String.fromCharCode(0x20));
116 } 111 }
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-seqstrsetchar-ex2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698