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

Unified Diff: test/mjsunit/regress/regress-319722-ArrayBuffer.js

Issue 80653002: Merged r17800, r17801 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-319722-TypedArrays.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-319722-ArrayBuffer.js
diff --git a/test/cctest/test-cpu-x64.cc b/test/mjsunit/regress/regress-319722-ArrayBuffer.js
similarity index 78%
copy from test/cctest/test-cpu-x64.cc
copy to test/mjsunit/regress/regress-319722-ArrayBuffer.js
index a2c45cf8621e7aabb1879620b7a897f5a5ca56b8..c8aed9e38cf7647836b68ce0428c98b7ba374d6d 100644
--- a/test/cctest/test-cpu-x64.cc
+++ b/test/mjsunit/regress/regress-319722-ArrayBuffer.js
@@ -25,20 +25,23 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "v8.h"
+// Flags: --nostress-opt --allow-natives-syntax
+var maxSize = %MaxSmi() + 1;
+var ab = new ArrayBuffer(maxSize);
-#include "cctest.h"
-#include "cpu.h"
-
-using namespace v8::internal;
+function TestArray(constr) {
+ assertThrows(function() {
+ new constr(ab, 0, maxSize);
+ }, RangeError);
+}
+TestArray(Uint8Array);
+TestArray(Int8Array);
+TestArray(Uint16Array);
+TestArray(Int16Array);
+TestArray(Uint32Array);
+TestArray(Int32Array);
+TestArray(Float32Array);
+TestArray(Float64Array);
+TestArray(Uint8ClampedArray);
-TEST(RequiredFeaturesX64) {
- // Test for the features required by every x64 CPU.
- CPU cpu;
- CHECK(cpu.has_fpu());
- CHECK(cpu.has_cmov());
- CHECK(cpu.has_mmx());
- CHECK(cpu.has_sse());
- CHECK(cpu.has_sse2());
-}
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-319722-TypedArrays.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698