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

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

Issue 2805783003: [csa] Fix CSA::ToUint32 rounding for negative HeapNumbers (Closed)
Patch Set: Fix Smi::IsValid test Created 3 years, 8 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/cctest/test-code-stub-assembler.cc ('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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 return "abc"; }}; 160 return "abc"; }};
161 separator = { toString: function() { assertEquals(1, counter); 161 separator = { toString: function() { assertEquals(1, counter);
162 counter++; 162 counter++;
163 return "b"; }}; 163 return "b"; }};
164 164
165 assertEquals(["a", "c"], String.prototype.split.call(subject, separator)); 165 assertEquals(["a", "c"], String.prototype.split.call(subject, separator));
166 assertEquals(2, counter); 166 assertEquals(2, counter);
167 167
168 // Check ToUint32 conversion of limit. 168 // Check ToUint32 conversion of limit.
169 assertArrayEquals(["a"], "a,b,c,d,e,f".split(/,/, -4294967295)); 169 assertArrayEquals(["a"], "a,b,c,d,e,f".split(/,/, -4294967295));
170 assertArrayEquals(["a"], "a,b,c,d,e,f".split(/,/, -4294967294.5)); 170 assertArrayEquals(["a", "b"], "a,b,c,d,e,f".split(/,/, -4294967294.001));
171 assertArrayEquals(["a", "b"], "a,b,c,d,e,f".split(/,/, -4294967294.5));
172 assertArrayEquals(["a", "b"], "a,b,c,d,e,f".split(/,/, -4294967294.999));
171 assertArrayEquals(["a", "b"], "a,b,c,d,e,f".split(/,/, -4294967294)); 173 assertArrayEquals(["a", "b"], "a,b,c,d,e,f".split(/,/, -4294967294));
172 assertArrayEquals(["a", "b", "c"], "a,b,c,d,e,f".split(/,/, -4294967293)); 174 assertArrayEquals(["a", "b", "c"], "a,b,c,d,e,f".split(/,/, -4294967293));
173 assertArrayEquals(["a", "b", "c", "d"], "a,b,c,d,e,f".split(/,/, -4294967292)); 175 assertArrayEquals(["a", "b", "c", "d"], "a,b,c,d,e,f".split(/,/, -4294967292));
174 assertArrayEquals(["a", "b", "c", "d", "e", "f"], "a,b,c,d,e,f".split(/,/, -1)); 176 assertArrayEquals(["a", "b", "c", "d", "e", "f"], "a,b,c,d,e,f".split(/,/, -1));
OLDNEW
« no previous file with comments | « test/cctest/test-code-stub-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698